index int64 0 20.3k | text stringlengths 0 1.3M | year stringdate 1987-01-01 00:00:00 2024-01-01 00:00:00 | No stringlengths 1 4 |
|---|---|---|---|
6,300 | Blind Attacks on Machine Learners Alex Beatson Department of Computer Science Princeton University abeatson@princeton.edu Zhaoran Wang Department of Operations Research and Financial Engineering Princeton University zhaoran@princeton.edu Han Liu Department of Operations Research and Financial Engineering Princeton University hanliu@princeton.edu Abstract The importance of studying the robustness of learners to malicious data is well established. While much work has been done establishing both robust estimators and effective data injection attacks when the attacker is omniscient, the ability of an attacker to provably harm learning while having access to little information is largely unstudied. We study the potential of a “blind attacker” to provably limit a learner’s performance by data injection attack without observing the learner’s training set or any parameter of the distribution from which it is drawn. We provide examples of simple yet effective attacks in two settings: firstly, where an “informed learner” knows the strategy chosen by the attacker, and secondly, where a “blind learner” knows only the proportion of malicious data and some family to which the malicious distribution chosen by the attacker belongs. For each attack, we analyze minimax rates of convergence and establish lower bounds on the learner’s minimax risk, exhibiting limits on a learner’s ability to learn under data injection attack even when the attacker is “blind”. 1 Introduction As machine learning becomes more widely adopted in security and in security-sensitive tasks, it is important to consider what happens when some aspect of the learning process or the training data is compromised [1–4]. Examples in network security are common and include tasks such as spam filtering [5, 6] and network intrusion detection [7, 8]; examples outside the realm of network security include statistical fraud detection [9] and link prediction using social network data or communications metadata for crime science and counterterrorism [10]. In a training set attack, an attacker either adds adversarial data points to the training set (“data injection”) or preturbs some of the points in the dataset so as to influence the concept learned by the learner, often with the aim of maximizing the learner’s risk. Training-set data injection attacks are one of the most practical means by which an attacker can influence learning, as in many settings an attacker which does not have insider access to the learner or its data collection or storage systems may still be able to carry out some activity which is monitored and the resulting data used in the learner’s training set [2, 6]. In a network security setting, an attacker might inject data into the training set for an anomaly detection system so that malicious traffic is classified as normal, thus making a network vulnerable to attack, or so that normal traffic is classified as malicious, thus harming network operation. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. A growing body of research focuses on game-theoretic approaches to the security of machine learning, analyzing both the ability of attackers to harm learning and effective strategies for learners to defend against attacks. This work often makes strong assumptions about the knowledge of the attacker. In a single-round game it is usually assumed that the attacker knows the algorithm used by the learner (e.g. SVM or PCA) and has knowledge of the training set either by observing the training data or the data-generating distribution [2, 5, 11]. This allows the construction of an optimal attack to be treated as an optimization problem. However, this assumption is often unrealistic as it requires insider knowledge of the learner or for the attacker to solve the same estimation problem the learner faces to identify the data-generating distribution. In an iterated-game setting it is usually assumed the attacker can query the learner and is thus able to estimate the learner’s current hypothesis in each round [12–14]. This assumption is reasonable in some settings, but in other scenarios the attacker may not receive immediate feedback from the learner, making the iterated-game setting inappropriate. We provide analysis which makes weaker assumptions than either of these bodies of work by taking a probabilistic approach in tackling the setting where a “blind attacker” has no knowledge of the training set, the learner’s algorithm or the learner’s hypothesis. Another motivation is provided by the field of privacy. Much work in the field of statistical privacy concerns disclosure risk: the probability that an entry in a dataset might be identified given statistics of the dataset released. This has been formalized by “differential privacy”, which provides bounds on the maximum disclosure risk [15]. However, differential privacy hinges on the benevolence of an organization to which you give your data: the privacy of individuals is preserved as long as organizations which collect and analyze data take necessary steps to enforce differential privacy. Many data are gathered without users’ deliberate consent or even knowledge. Organizations are also not yet under legal obligation to use differentially-private procedures. A user might wish to take action to preserve their own privacy without making any assumption of benevolence on the part of those that collect data arising from the user’s actions. For example, they may wish to prevent an online service from accurately estimating their income, ethnicity, or medical history. The user may have to submit some quantity of genuine data in order to gain a result from the service which addresses a specific query, and may not even observe all the data the service collects. They may wish to enforce the privacy of their information by also submitting fabricated data to the service or carrying out uncharacteristic activity. This is a data injection training set attack, and studying such attacks thus reveals the ability of a user to prevent a statistician or learner from making inferences from the user’s behavior. In this paper we address the problem of a one-shot data injection attack carried out by a blind attacker who does not observe the training set, the true distribution of interest, or the learner’s algorithm. We approach this problem from the perspective of minimax decision theory to provide an analysis of the rate of convergence of estimators on training sets subject to such attacks. We consider both an “informed learner” setting where the learner is aware of the exact distribution used by the attacker to inject malicious data, and a “blind learner” setting where the learner is unaware of the malicious distribution. In both settings we suggest attacks which aim to minimize an upper bound on the pairwise KL divergences between the distributions conditioned on particular hypotheses, and thus maximize a lower bound on the minimax risk of the learner. We provide lower bounds on the rate of convergence of any estimator under these attacks. 2 Setting and contributions 2.1 Setting A learner attempts to learn some parameter θ of a distribution of interest Fθ with density fθ and belonging to some family F = {Fθ, θ ∈Θ}, where Θ is a set of candidate hypotheses for the parameter. “Uncorrupted” data X1, ..., Xn ∈X are drawn i.i.d. from Fθ. The attacker chooses some malicious distribution Gφ with density gφ and from a family G = {Gφ : φ ∈Φ}, where Φ is a parameter set representing candidate attack strategies. “Malicious” data X′ 1, .., X′ n ∈X are drawn i.i.d from the malicious distribution. The observed dataset is made up of a fraction α of true examples and 1 −α of malicious examples. The learner observes a dataset Z1, ..., Zn ∈Z, where Zi = Xi with probability α X′ i with probability 1 −α. (1) 2 We denote the distribution of Z with P. P is clearly a mixture distribution with density: p(z) = αfθ(z) + (1 −α)gφ(z). The distribution of Z conditional on X is: p(z|x) = α1{z = x} + (1 −α)gφ(z). We consider two distinct settings based on the knowledge of the attacker and of the learner. First we consider the scenario where the learner knows the malicious distribution, Gφ and the fraction of inserted examples (“informed learner”). Second we consider the scenario where the learner knows only the family G to which Gφ belongs and fraction of inserted examples (“blind learner”). Our work assumes that the attacker knows only the family of distributions F to which the true distribution belongs (“blind attacker”). As such, the attacker designs an attack so as to maximally lower bound the learner’s minimax risk. We leave as future work a probabilistic treatment of the setting where the attacker knows the true Fθ but not the training set drawn from it (“informed attacker”). To our knowledge, our work is the first to consider the problem of learning in a setting where the training data is distributed according to a mixture of a distribution of interest and a malicious distribution chosen by an adversary without knowledge of the distribution of interest. 2.2 Related work Our paper has very strong connections to several problems which have previously been studied in the minimax framework. First is the extensive literature on robust statistics. Our framework is very similar to Huber’s ϵ-contamination model, where the observed data follows the distribution: (1 −ϵ)Pθ + ϵQ. Here ϵ controls the degree of corruption, Q is an arbitrary corruption distribution, and the learner attempts to estimate θ robust to the contamination. A general estimator which achieves the minimax optimal rate under Huber’s ϵ-contamination model was recently proposed by Chen, Gao and Ren[16]. Our work differs from the robust estimation literature in that rather than designing optimal estimators for the learner, we provide concrete examples of attack strategies which harm the learning rate of any estimator, even those which are optimal under Huber’s model. Unlike robust statistics, our attacker does not have complete information on the generating distribution, and must select an attack which is effective for any data-generating distribution drawn from some set. Our work has similar connections to the literature on minimax rates of convergence of estimators for mixture models [17] and minimax rates for mixed regression with multiple components [18], but differs in that we consider the problem of designing a corrupting distribution. There are also connections to the work on PAC learning with contaminated data [19]. Here the key difference, beyond the fact that we focus on strategies for a blind attacker as discussed earlier, is that we use information-theoretic proof techniques rather than reductions to computational hardness. This means that our bounds restrict all learning algorithms, not just polynomial-time learning algorithms. Our work has strong connections to the analysis of minimax lower bounds in local differential privacy. In [20] and [21], Duchi, Wainwright and Jordan establish lower bounds in the local differential privacy setting, where P(Zi|Xi = x), the likelihood of an observed data point Zi given Xi takes any value x, is no more than some constant factor greater than P(Zi|Xi = x′), the likelihood of Zi given Xi takes any other value x′. Our work can be seen as an adaptation of those ideas to a new setting: we perform very similar analysis but in a data injection attack setting rather than local differential privacy setting. Our analysis for the blind attacker, informed learner setting and our examples in Section 5 for both settings draw heavily from [21]. In fact, the blind attack setting is by nature locally differentially private with the likelihood ratio upper bounded by maxz αfθ(z)+(1−α)gφ(z) (1−α)gφ(z) , as in the blind attack setting only α of the data points are drawn from the distribution of interest F. This immediately suggests bounds on the minimax rates of convergence according to [20]. However, the rates we obtain by appropriate choice of Gφ by the attacker obtain lower bounds on the rate of convergence which are often much slower than the bounds due to differential privacy obtained by arbitrary choice of Gφ. The rest of this work proceeds as follows. Section 3.1 formalizes our notation. Section 3.2 introduces our minimax framework and the standard techniques of lower bounding the minimax risk by reduction 3 from parameter estimation to testing. Sections 3.3 and 3.4 discuss the “blind attacker; informed learner” and “blind attacker; blind learner” settings in this minimax framework. Section 3.5 briefly proposes how this framework could be extended to consider an “informed attacker” which observes the true distribution of interest Fθ. Section 4 provides a summary of the main results. In Section 5 we give examples of estimating a mean under blind attack in both the informed and blind learner setting and performing linear regression in the informed learner setting. In Section 6 we conclude. Proof of the main results is presented in the appendix. 3 Problem formulation 3.1 Notation We denote the “uncorrupted” data with the random variables X1:n. Fi is the distribution and fi the density of each Xi conditioning on θ = θi ∈Θ; Fθ and fθ are the generic distribution and density parametrized by θ. We denote malicious data with the random variables X′ 1:n. In the “informed learner” setting, G is the distribution and g the density from which each X′ i is drawn. In the “blind learner” setting, Gj and gj are the distribution and density of X′ i conditioning on φ = φj ∈Φ; Gφ and gφ are the generic distribution and density parametrized by φ. We denote the observed data Z1:n, which is distributed according to (1). Pi is the distribution and pi the density of each Zi, conditioning on θ = θi and φ = φi. Pθ or Pθ,φ is the parametrized form. We say that Pi = αFi + (1 −α)Gi, or equivalently pi(z) = αfi(z) + (1 −α)gi(z), to indicate that Pi is a weighted mixture of the distributions Fi and Gi. We assume that X, X′ and Z have the same support, denoted Z. Mn is the minimax risk of a learner. DKL(P1||P2) is the KL-divergence. ||P1 −P2||TV is the total variation distance. I(Z, V ) is the mutual information between the random variables Z and V . ˆθn : Zn →Θ denotes an arbitrary estimator for θ with a sample size of n; ˆψn : Zn →Ψ denotes an arbitrary estimator for an arbitrary parameter vector ψ with a sample size of n. 3.2 Minimax framework The minimax risk of estimating a parameter ψ ∈Ψ is equal to the risk of the estimator ˆψn which achieves smallest maximal risk across all ψ ∈Ψ: Mn = inf ˆ ψ sup ψ∈Ψ EZ1:n∼P n ψ L(ψ, ˆψn). The minimax risk thus provides a strong guarantee: the population risk of an estimator can be no worse than the minimax risk, no matter which ψ ∈Ψ happens to be the true parameter. Our analysis aims to build insight into how the minimax risk increases when the training set is subjected to blind data injection attacks. In the informed learner setting we fix some φ and Gφ, and consider Ψ = Θ, letting L(θ, ˆθn) be the squared ℓ2 distance ||θ −ˆθn||2 2. In the blind learner setting we account for there being two parameters unknown to the learner φ and θ by letting Ψ = Φ × Θ and considering a loss function which depends only on the value of θ and its estimator, L(ψ, ˆψn) = ||θ −ˆθn||2 2 We follow the standard approach to lower bounding the minimax risk [22], reducing the problem of estimating θ to that of testing the hypothesis H : V = Vj for Vj ∈V, where V ∼U(V), a uniform distribution across V. V ⊂Ψ is an appropriate finite packing of the parameter space. The Le Cam method provides lower bound on the minimax risk of the learner in terms of the KL divergence DKL(Pψ1||Pψ2) for ψ1, ψ2 ∈Ψ [22]: Mn ≥L(ψ1, ψ2) h1 2 − 1 2 √ 2 q nDKL(Pφ1||Pφ2) i . (2) The Fano method provides lower bounds on the minimax risk of the learner in terms of the mutual information I(Z, V ) between the observed data and V chosen uniformly at random from V, where L(Vi, Vj) ≥2δ ∀Vi, Vj ∈V [22]: Mn ≥δ h 1 −I(Z1:n; V ) + log 2 log |V| i . (3) 4 The mutual information is upper bounded by the pariwise KL divergences as I(Z1:n, V ) ≤ n |V|2 X i X j DKL(PVi||PVj). (4) 3.3 Blind attacker, informed learner In this setting we assume the attacker does not know Fθ but does know F. The learner knows both Gφ and α prior to picking an estimator. In this case, as Gφ is known, we do not need to consider a distribution over possible values of φ; instead, we consider some fixed p(z|x). The attacker chooses Gφ to attempt to maximally lower bound the minimax risk of the learner: φ∗= argmaxφMn = argmaxφ inf ˆθ sup θ∈Θ EZ1:n∼Pθ,ψL(θ, ˆθn), where L(θ, θ′) is the learner’s loss function; in our case the squared ℓ2 distance ||θ −θ′||2 2. The attacker chooses a malicious distribution G ˆφ which minimizes the sum of KL-divergences between the distributions indexed by V: ˆφ = argminφ X θi∈V X θj∈V DKL(Pθi,φ||Pθj,φ) ≥|V|2 n I(Zn; θ), where Pθi,φ = αFθi + (1 −α)Gφ. This directly provides lower bounds on the minimax risk of the learner via (2) and (3). 3.4 Blind attacker, blind learner In this setting, the learner does not know the specific malicious distribution Gφ used to inject points into the training set, but is allowed to know the family G = {Gφ : φ ∈Φ} from which the attacker picks this distribution. We propose that the minimax risk is thus with respect to the worst-case choice of both the true parameter of interest θ and the parameter of the malicious distribution φ: Mn = inf ˆθ sup (φ,θ)∈Φ×Θ EZ1:n∼Pθ,ψL(θ, ˆθn). That is, the minimax risk in this setting is taken over worst-case choice of the parameter pair (φ, θ) ∈Φ × Θ, but the loss L(θ, ˆθ) is with respect to only the true value of of θ and its estimator ˆθ. The attacker thus designs a family of malicious distributions G = {Gφ : φ ∈Φ} so as to maximally lower bound the minimax risk: G∗= argmax inf ˆθ sup (Fθ,Gφ)∈F×G EZ1:nL(θ, ˆθ). We use the Le Cam approach (2) in this setting. To accommodate the additional set of parameters Φ we consider nature picking (φ, θ) from Φ×Θ. The loss function is L (ψi, θi), (ψj, θj) = ||θi−θj||2 2, and thus only depends on θ. Therefore when constructing our hypothesis set we must choose wellseparated θ but may arbitrarily pick each element φ. The problem reduces from that of estimating θ to that of testing the hypothesis H : (φ, θ) = (φ, θ)j for (φ, θ)j ∈V, where nature chooses (φ, θ) ∼U(V). The attacker again lower bounds the minimax risk by choosing G to minimize an upper bound on the pairwise KL divergences. Unlike the informed learner setting where the KL divergence was between the distributions indexed by θi and θj with φ fixed, here the KL divergence is between the distributions indexed by appropriate choice of pairings (θi, φi) and (θj, φj): ˆG = argminG X (θi,φi)∈V X (θj,φj)∈V DKL(Pθi,φi||Pθj,φj) ≥|V|2 n I(Zn; θ), where Pθi,φi = αFθi + (1 −α)Gφi. 5 3.5 Informed attacker We leave this setting as future work, but briefly propose a formulation for completeness. In this setting the attacker knows Fθ prior to picking Gφ. We assume that the learner picks some ˆθ which is minimax-optimal over F and G as defined in Section 1.5 and 1.6 respectively. We denote the appropriate set of such estimators as ˆΘ. The attacker picks Gφ ∈G so as to maximally lower bound the risk for any ˆθ ∈Θ: Rθ,φ(ˆθ) = EZ1:n∼Pθ,φL(θ, ˆθn). This is similar to the setting in [11], with the modification that the learner can use any (potentially non-convex) algorithm and estimator. The attacker must therefore identify an optimal attack using information-theoretic techniques and knowledge of Fθ, rather than inverting the learner’s convex learning problem and using convex optimization to maximize the learner’s risk. 4 Main results 4.1 Informed learner, blind attacker In the informed learner setting, the attacker chooses a single malicious distribution (known to the learner) from which to draw malicious data. Theorem 1 (Uniform attack). The attacker picks gφ(z) := g uniform over Z in the informed learner setting. We assume that Z is compact and that G ≪Fi ≪Fj ∀θi, θj ∈Θ. Then: DKL(Pi||Pj) + DKL(Pj||Pi) ≤ α2 (1 −α)||Fi −Fj||2 TVVol(Z) ∀θi, θj ∈Θ. The proof modifies the analysis used to prove Theorem 1 in [21] and is presented in the appendix. By applying Le Cam’s method to P1 and P2 as described in the theorem, we find: Corollary 1.1 (Le Cam bound with uniform attack). Given a data injection attack as described in Theorem 1, the minimax risk of the learner is lower bounded by Mn ≥L(θ1, θ2) 1 2 − 1 2 √ 2 s α2 (1 −α)n||F1 −F2||2 TVVol(Z) . We turn to the local Fano method. Consider the traditional setting (Pθ = Fθ), and consider a packing set V of Θ which obeys L(θi, θj) ≥2δ ∀θi, θj ∈V, and where the KL divergences are bounded such that there exists some fixed τ fulfilling DKL(Fi||Fj) ≤δτ ∀θi, θj ∈V. We can use this inequality and the bound on mutual information in (4) to rewrite the Fano bound in (3) as: Mn ≥δ h 1 −nδτ + log 2 log |V| i . If we consider the uniform attack setting with the same packing set V of Θ, then by applying Theorem 1) in addition to the bound on mutual information in (4) to the standard fano bound in (3), we obtain: Corollary 1.2 (Local Fano bound with uniform attack). Given a data injection attack as described in Theorem 1, and given any packing V of Θ so such L(θi, θj) ≥2δ ∀θi, θj ∈V and DKL(Fi||Fj) ≤δτ ∀θi, θj ∈V, then the minimax risk of the learner is lower bounded by Mn ≥δ 1 − α2 (1−α)Vol(Z)nτδ + log 2 log |V | . Remarks. Comparing the two corollaries to the standard form of the Le Cam and Fano bounds shows that a uniform attack has the effect of upper-bounding the effective sample size at n α2 (1−α)Vol(Z). The range of α for which this bound results in a reduction in effective sample size beyond the trivial reduction to αn depends on Vol(Z). We illustrate the consequences of these corollaries for some classical estimation problems in Section 3. 6 4.2 Blind learner, blind attacker We begin with a lemma that shows that for α ≤1 2 the attacker can make learning impossible beyond permutation for higher rates of injection. Similar results have been shown in [18] among others, and this is included for completeness. Lemma 1 (Impossibility of learning beyond permutation for α ≤0.5). Consider any hypotheses θ1 and θ2, with F1 ≪F2 and F2 ≪F1. We construct V = {F, G}2 = {(F1, G1), (F2, G2)}. For all α ≤0.5, there exist choices of G1 and G2 such that DKL(P1||P2) + DKL(P2||P1) = 0. The proof progresses by considering g1(z) = αf2(z) (1−α) + c, g2(z) = αf1(z) (1−α) + c, such that ||P1 − P2||TV = 0. Full proof is provided in the appendix. It is unnecessary to further consider values of α less than 0.5. We proceed with an attack where the attacker chooses a family of malicious distributions G which mimics the family of candidate distributions of interest F, and show that this increases the lower bound on the learner’s minimax risk for 0.5 < α < 3 4. Theorem 2 (Mimic attack). Consider any hypotheses θ1 and θ2, with F1 ≪F2 and F2 ≪F1. The attacker picks G = F. We construct V = {F, G}2 = {(F1, G1), (F2, G2)} where G1 = F2 and G2 = F1. Then: DKL(P1||P2) + DKL(P2||P1) ≤(2α −1)2 1 −α ||F1 −F2||TV ≤4 α4 1 −α||F1 −F2||2 TV. The proof progresses by upper bounding | log p1(z) p2(z)| by log α 1−α, and consequently upper bounding the pairwise KL divergence in terms of the total variation distance. It is presented in the appendix. By applying the standard Le Cam bound with the the bound on KL divergence provided by the theorem, we obtain: Corollary 2.1 (Le Cam bound with mimic attack). Given a data injection attack as described in Theorem 2, the minimax risk of the learner is lower bounded by Mn ≥L(θ1, θ2) 1 2 −1 √ 2 r (2α −1)2 1 −α n||F1 −F2||2 TV . Remarks. For α ∈[0, 3 4], comparing the corollary to the standard form of the Le Cam bound shows that this attack reduces the effective sample size from n to (2α−1)2 1−α n. We illustrate the consequences of this corollary for estimating a mean in Section 3. There are two main differences in the result from the bound for the uniform attack. Firstly, the dependence on (2α −1)2 instead of α2 means that the KL divergence rapidly approaches zero as α →1 2, rather than as α →0 as in the uniform attack. Secondly, there is no dependence on the volume of the support of the data. 5 Minimax rates of convergence under blind attack We analyze the minimax risk in the settings of mean estimation and of fixed-design linear regression by showing how the blind attack forms of the Le Cam and Fano bounds modify the lower bounds on the minimax risk for each model. 5.1 Mean estimation In this section we address the simple problem of estimating a one-dimensional mean when the training set is subject to a blind attack. Consider the following family, where Θ is the interval [−1, 1]: F = {Fθ : EFθX = θ; EFθX2 ≤1; θ ∈Θ}. We apply Theorems 1 and 2 and the associated Le Cam bounds to obtain: Proposition 1 (Mean estimation under uniform attack — blind attacker, informed learner). If the attacker carries out a uniform attack as presented in theorem 1, then there exists a universal constant 0 < c < ∞such that the minimax risk is bounded as: Mn ≥c min h 1, r 21 −α α2n i . 7 The proof is direct by using the uniform-attack form of the Le Cam lower bound on minimax risk presented in corollary 1.1 in the proof of (20) in [21] in place of the differentially private form of the lower bound in equation (16) of that paper. Proposition 2 (Mean estimation under mimic attack — blind attacker, blind learner). If the attacker carries out a mimic attack as presented in theorem 2, then there exists a universal constant 0 < c < ∞ such that the minimax risk is bounded as: Mn ≥c min h 1, 1 2 −4α r 1 −α n i . The proof is direct by using the mimic-attack form of the Le Cam lower bound on minimax risk presented in corollary 2.1 in the proof of (20) in [21] in place of the differentially private form of the lower bound in equation (16) of that paper. 5.2 Linear regression with fixed design We now consider the minimax risk in a standard fixed-design linear regression problem. Consider a fixed design matrix X ∈Rn×d, and the standard linear model Y = Xθ∗+ ϵ, where ϵ ∈Rn is a vector of independent noise variables with each entry of the noise vector upper bounded as |ϵi| ≤σ < ∞∀i. We assume that the problem is appropriately scaled so that ||X||∞≤1, ||Y ||∞≤1, and so that it suffices to consider θ∗∈Θ, where Θ = Sd is the d-dimensional unit sphere. The loss function is the squared ℓ2 loss with respect to θ∗: L(ˆθn, θ∗) = ||ˆθn −θ∗||2 2. It is also assumed that X is full rank to make estimation of θ possible. Proposition 3 (Linear regression under uniform attack - blind attacker, informed learner). If the attacker carries out a uniform attack per Theorem 1, and si(A) is the ith singular value of A, then the minimax risk is bounded by Mn ≥min h 1, σ2d(1 −α) nα2s2max(X/√n) i . The proof is direct by using the uniform-attack form of the Fano lower bound on minimax risk presented in corollary 1.2 in the proof of (22) in [21] in place of the differentially private form of the lower bound in equation (19) of that paper, noting that Vol(Z) ≤1 by construction. If we consider the orthonormal design case such that s2 max(X/√n) = 1, and recall that lower bounds on the minimax risk in linear regression in traditional settings is O( σ2d n ), we see a clear reduction in effective sample size from n to α2 1−αn. 6 Discussion We have approached the problem of data injection attacks on machine learners from a statistical decision theory framework, considering the setting where the attacker does not observe the true distribution of interest or the learner’s training set prior to choosing a distribution from which to draw malicious examples. This has applications to the theoretical analysis of both security settings, where an attacker attempts to compromise a machine learner through data injection, and privacy settings, where a user of a service aims to protect their own privacy by sumbitting some proportion of falsified data. We identified simple attacks in settings where the learner is and is not aware of the malicious distribution used which reduce the effective sample size when considering rates of convergence of estimators. These attacks maximize lower bounds on the minimax risk. These lower bounds may not be tight, and we leave as future work thorough exploration of optimality of attacks in this setting and the establishing of optimal estimation procedures in the presence of such attacks. Exploration of attacks on machine learners in the minimax framework should lead to better understanding of the influence an attacker might have over a learner in settings where the attacker has little information. References (1) M. Barreno, B. Nelson, R. Sears, A. D. Joseph and J. D. Tygar, ACM Symposium on Information, computer and communications security, 2006. 8 (2) M. Barreno, B. Nelson, A. D. Joseph and J. Tygar, Machine Learning, 2010, 81, 121–148. (3) P. Laskov and M. Kloft, ACM workshop on security and artificial intelligence, 2009. (4) P. Laskov and R. Lippmann, Machine learning, 2010, 81, 115–119. (5) H. Xiao, H. Xiao and C. Eckert, European Conference on Artificial Intelligence, 2012, pp. 870– 875. (6) B. Biggio, B. Nelson and P. Laskov, arXiv preprint arXiv:1206.6389, 2012. (7) B. I. Rubinstein, B. Nelson, L. Huang, A. D. Joseph, S.-h. Lau, N. Taft and D. Tygar, EECS Department, University of California, Berkeley, Tech. Rep. UCB/EECS-2008-73, 2008. (8) R. Sommer and V. Paxson, IEEE Symposium on Security and Privacy, 2010. (9) R. J. Bolton and D. J. Hand, Statistical science, 2002, 235–249. (10) M. Al Hasan, V. Chaoji, S. Salem and M. Zaki, SDM Workshop on Link Analysis, Counterterrorism and Security, 2006. (11) S. Mei and X. Zhu, Association for the Advancement of Artificial Intelligence, 2015. (12) W. Liu and S. Chawla, IEEE International Conference on Data Mining, 2009. (13) S. Alfeld, X. Zhu and P. Barford, Association for the Advancement of Artificial Intelligence, 2016. (14) M. Bruckner and T. Scheffer, ACM SIGKDD, 2011. (15) C. Dwork, in Automata, languages and programming, Springer, 2006, pp. 1–12. (16) M. Chen, C. Gao and Z. Ren, arXiv preprint arXiv:1511.04144, 2015. (17) M. Azizyan, A. Singh and L. Wasserman, Neural Information Processing Systems, 2013. (18) Y. Chen, X. Yi and C. Caramanis, arXiv preprint arXiv:1312.7006, 2013. (19) M. Kearns and M. Li, SIAM Journal on Computing, 1993, 22, 807–837. (20) J. Duchi, M. J. Wainwright and M. I. Jordan, Neural Information Processing Systems, 2013. (21) J. Duchi, M. Wainwright and M. Jordan, arXiv preprint arXiv:1302.3203v4, 2014. (22) A. B. Tsybakov, Introduction to Nonparametric Estimation, Springer Publishing Company, Incorporated, 1st, 2008. 9 | 2016 | 376 |
6,301 | Learning Deep Parsimonious Representations Renjie Liao1, Alexander Schwing2, Richard S. Zemel1,3, Raquel Urtasun1 University of Toronto1 University of Illinois at Urbana-Champaign2 Canadian Institute for Advanced Research3 {rjliao, zemel, urtasun}@cs.toronto.edu, aschwing@illinois.edu Abstract In this paper we aim at facilitating generalization for deep networks while supporting interpretability of the learned representations. Towards this goal, we propose a clustering based regularization that encourages parsimonious representations. Our k-means style objective is easy to optimize and flexible, supporting various forms of clustering, such as sample clustering, spatial clustering, as well as co-clustering. We demonstrate the effectiveness of our approach on the tasks of unsupervised learning, classification, fine grained categorization, and zero-shot learning. 1 Introduction In recent years, deep neural networks have been shown to perform extremely well on a variety of tasks including classification [21], semantic segmentation [13], machine translation [27] and speech recognition [16]. This has led to their adoption across many areas such as computer vision, natural language processing and robotics [16, 21, 22, 27]. Three major advances are responsible for the recent success of neural networks: the increase in available computational resources, access to large scale data sets, and several algorithmic improvements. Many of these algorithmic advances are related to regularization, which is key to prevent overfitting and improve generalization of the learned classifier, as the current trend is to increase the capacity of neural nets. For example, batch normalization [18] is used to normalize intermediate representations which can be interpreted as imposing constraints. In contrast, dropout [26] removes a fraction of the learned representations at random to prevent co-adaptation. Learning of de-correlated activations [6] shares a similar idea since it explicitly discourages correlation between the units. In this paper we propose a new type of regularization that encourages the network representations to form clusters. As a consequence, the learned feature space is compactly representable, facilitating generalization. Furthermore, clustering supports interpretability of the learned representations. We formulate our regularization with a k-means style objective which is easy to optimize, and investigate different types of clusterings, including sample clustering, spatial clustering, and co-clustering. We demonstrate the generalization performance of our proposed method in several settings: autoencoders trained on the MNIST dataset [23], classification on CIFAR10 and CIFAR100 [20], as well as fine-grained classification and zero-shot learning on the CUB-200-2011 dataset [34]. We show that our approach leads to significant wins in all these scenarios. In addition, we are able to demonstrate on the CUB-200-2011 dataset that the network representation captures meaningful part representations even though it is not explicitly trained to do so. 2 Related Work Standard neural network regularization involves penalties on the weights based on the norm of the parameters [29, 30]. Also popular are regularization methods applied to intermediate representations, 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. such as Dropout [26], Drop-Connect [32], Maxout [10] and DeCov [6]. These approaches share the aim of preventing the activations in the network to be correlated. Our work can be seen as a different form of regularization, where we encourage parsimonious representations. A variety of approaches have applied clustering to the parameters of the neural network with the aim of compressing the network. Compression rates of more than an order of magnitude were demonstrated in [11] without sacrificing accuracy. In the same spirit hash functions were exploited in [5]. Early approaches to compression include biased weight decay [12] and [14, 24], which prunes the network based on the Hessian of the loss function. Recently, various combinations of clustering with representation learning have been proposed. We categorize them broadly into two areas: (i) work that applies clustering after having learned a representation, and (ii) approaches that jointly optimize the learning and clustering objectives. [4] combines deep belief networks (DBN) with non-parametric maximum-margin clustering in a posthoc manner: A DBN is trained layer-wise to obtain an intermediate representation of the data; non-parametric maximum-margin clustering is then applied to the data representation. Another line of work utilizes an embedding of the deep network, which can be based on annotated data [15], or from a learned unsupervised method such as a stacked auto-encoder [28]. In these approaches, the network is trained to approximate the embedding, and subsequently either k-means or spectral clustering is performed to partition the space. An alternative is to use non-negative matrix factorization, which represents a given data matrix as the product of components [31]. This deep non-negative matrix factorization is trained using the reconstruction loss rather than a clustering objective. Nonetheless, it was shown that factors lower in the hierarchy have superior clustering performance on lowlevel concepts while factors later in the hierarchy cluster high-level concepts. The aforementioned approaches differ from our proposed technique, since we aim at jointly learning a representation that is parsimonious via a clustering regularization. Also related are approaches that utilize sparse coding. Wang et al. [33] unrolls the iterations forming the sparse codes and optimizes end-to-end the involved parameters using a clustering objective as loss function [33]. The proposed framework is further augmented by clustering objectives applied to intermediate representations, which act as feature regularization within the unrolled optimization. They found that features lower in the unrolled hierarchy cluster low-level concepts, while features later in the hierarchy capture high-level concepts. Our method differs in that we use convolutional neural networks rather than unrolling a sparse coding optimization. In the context of unsupervised clustering [35] exploited agglomerative clustering as a regularizer; this approach was formulated as a recurrent network. In contrast we employ a k-means like clustering objective which simplifies the optimization significantly and does not require a recurrent procedure. Furthermore, we investigate both unsupervised and supervised learning. 3 Learning Deep Parsimonious Representations In this section, we introduce our new clustering based regularization which not only encourages the neural network to learn more compact representations, but also enables interpretability of the neural network. We first show that by exploiting different unfoldings of the representation tensor, we obtain multiple types of clusterings, each possessing different properties. We then devise an efficient online update to jointly learn the clustering with the parameters of the neural network. 3.1 Clustering of Representations We first introduce some notation. We refer to [K] as the set of K positive integers, i.e., [K] = {1, 2, ..., K}. We use S\A to denote the set S with elements from the set A removed. A tensor is a multilinear map over a set of vector spaces. In tensor terminology, n-mode vectors of a D-order tensor Y ∈RI1×I2×···×ID are In-dimensional vectors obtained from Y by varying the index in Indimension, while keeping all other indices fixed. An n-mode matrix unfolding of a tensor is a matrix which has all n-mode vectors as its columns [7]. Formally we use the operator T {In}×{Ij|j∈[D]\n} to denote the n-mode matrix unfolding, which returns a matrix of size In × Q j∈[D]\n Ij. Similarly, we definee T {Ii,Ij}×{Ik|k∈[D]\{i,j}} to be an (i, j)-mode matrix unfolding operator. In this case a column vector is a concatenation of one i-mode vector and one j-mode vector. We denote the m-th row vector of a matrix X as Xm. 2 (a) Representations C W H N (b) … Figure 1: (A) Sample clustering and (B) spatial clustering. Samples, pixels, and channels are visualized as multi-channel maps, cubes, and maps in depth respectively. The receptive fields in the input image are denoted as red boxes. In this paper we assume the representation of one layer within a neural network to be a 4-D tensor Y ∈RN×C×H×W , where N, C, H and W are the number of samples within a mini-batch, the number of hidden units, the height and width of the representation respectively. Note that C, H and W can vary between layers, and in the case of a fully connected layer, the dimensions along height and width become a singleton and the tensor degenerates to a matrix. Let L be the loss function of a neural network. In addition, we refer to the clustering regularization of a single layer via R. The final objective is L + λR, where λ adjusts the importance of the clustering regularization. Note that we can add a regularization term for any subset of layers, but we focus on a single layer for notational simplicity. In what follows, we show three different types of clustering, each possessing different properties. In our framework any variant can be applied to any layer. (A) Sample Clustering: We first investigate clustering along the sample dimension. Since the cluster assignments of different layers are not linked, each layer is free to cluster examples in a different way. For example, in a ConvNet, bottom layer representations may focus on low-level visual cues, such as color and edges, while top layer features may focus on high-level attributes which have a more semantic meaning. We refer the reader to Fig. 1 (a) for an illustration. In particular, given the representation tensor Y, we first unfold it into a matrix T {N}×{H,W,C}(Y) ∈RN×HW C. We then encourage the samples to cluster as follows: Rsample(Y, µ) = 1 2NCHW N X n=1
T {N}×{H,W,C}(Y)n −µzn
2 , (1) where µ is a matrix of size K × HWC encoding all cluster centers, with K the total number of clusters. zn ∈[K] is a discrete latent variable corresponding to the n-th sample. It indicates which cluster this sample belongs to. Note that for a fully connected layer, the formulation is the same except that T {N}×{H,W,C}(Y)n and µzn are C-sized vectors since H = W = 1 in this case. (B) Spatial Clustering: The representation of one sample can be regarded as a C-channel “image.” Each spatial location within that “image” can be thought of as a “pixel,” and is a vector of size C (shown as a colored bar in Fig. 1). For a ConvNet, every “pixel” has a corresponding receptive field covering a local region in the input image. Therefore, by clustering “pixels” of all images during learning, we expect to model local parts shared by multiple objects or scenes. To achieve this, we adopt the unfolding operator T {N,H,W }×{C}(Y) and use Rspatial(Y, µ) = 1 2NCHW NHW X i=1 ∥T {N,H,W }×{C}(Y)i −µzi∥2. (2) Note that although we use the analogy of a “pixel,” when using text data a “pixel” may corresponds to words. For spatial clustering the dimension of the matrix µ is K × C. (C) Channel Co-Clustering: This regularizer groups the channels of different samples directly, thus co-clustering samples and filters. We expect this type of regularization to model re-occurring 3 Algorithm 1 : Learning Parsimonious Representations 1: Initialization: Maximum training iteration R, batch size B, smooth weight α, set of clustering layers S and set of cluster centers {µ0 k|k ∈[K]}, update period M 2: For iteration t = 1, 2, ..., R: 3: For layer l = 1, 2, ..., L: 4: Compute the output representation of layer l as x. 5: If l ∈S: 6: Assigning cluster zn = argmin k ∥Xn −µt−1 k ∥2, ∀n ∈[B]. 7: Compute cluster center ˆµk = 1 |Nk| P n∈Nk Xn, where Nk = [B] T{n|zn = k}. 8: Smooth cluster center µt k = αˆµk + (1 −α)µt−1 k 9: End 10: End 11: Compute the gradients with cluster centers µt k fixed. 12: Update weights. 13: Update drifted cluster centers using Kmeans++ every M iterations. 14: End patterns shared not only among different samples but also within each sample. Relying on the unfolding operator T {N,C}×{H,W }(Y), we formulate this type of clustering objective as Rchannel(Y, µ) = 1 2NCHW NC X i=1 ∥T {N,C}×{H,W }(Y)i −µzi∥2. (3) Note that the dimension of the matrix µ is K × HW in this case. 3.2 Efficient Online Update We now derive an efficient online update to jointly learn the weights while clustering the representations of the neural network. In particular, we illustrate the sample clustering case while noting that the other types can be derived easily by applying the corresponding unfolding operator. For ease of notation, we denote the unfolded matrix T {N}×{H,W,C}(Y) as X. The gradient of the clustering regularization layer w.r.t. its input representation X can be expressed as, ∂R ∂Xn = 1 NCHW Xn −µzn − 1 Qzn X zp=zn,∀p∈[N] Xn −µzp , (4) where Qzn is the number of samples which belong to the zn-th cluster. This gradient is then backpropagated through the network to obtain the gradient w.r.t. the parameters of the network. The time and space complexity of the gradient computation of one regularization layer are max(O(KCHW), O(NCHW)) and O(NCHW) respectively. Note that we can cache the centered data Xn −µzn in the forward pass to speed up the gradient computation. The overall learning algorithm of our framework is summarized in Alg. 1. In the forward pass, we first compute the representation of the n-th sample as Xn for each layer. We then infer the latent cluster label zn for each sample based on the distance to the cluster centers µt−1 k from the last time step t −1, and assign the sample to the cluster center which has the smallest distance. Once all the cluster assignments are computed, we estimate the cluster centers ˆµk based on the new labels of the current batch. We then combine the estimate based on the current batch with the former cluster center. This is done via an online update. We found an online update together with the random restart strategy to work well in practice, as the learning of the neural network proceeds one mini-batch at a time, and as it is too expensive to recompute the cluster assignment for all data samples in every iteration. Since we trust our current cluster center estimate more than older ones, we smooth the estimation by using an exponential moving average. The cluster center estimate at iteration t is obtained via µt k = αˆµk + (1 −α)µt−1 k , where α is a smoothing weight. However, as the representation learned by the neural network may go through drastic changes, especially in the beginning of training, some 4 Measurement Train Test AE 2.69 ± 0.12 3.61 ± 0.13 AE + Sample-Clustering 2.73 ± 0.01 3.50 ± 0.01 Table 1: Autoencoder Experiments on MNIST. We report the average of mean reconstruction error over 4 trials and the corresponding standard deviation. Dataset CIFAR10 Train CIFAR10 Test CIFAR100 Train CIFAR100 Test Caffe 94.87 ± 0.14 76.32 ± 0.17 68.01 ± 0.64 46.21 ± 0.34 Weight Decay 95.34 ± 0.27 76.79 ± 0.31 69.32 ± 0.51 46.93 ± 0.42 DeCov 88.78 ± 0.23 79.72 ± 0.14 77.92 40.34 Dropout 99.10 ± 0.17 77.45 ± 0.21 60.77 ± 0.47 48.70 ± 0.38 Sample-Clustering 89.93 ± 0.19 81.05 ± 0.41 63.60 ± 0.55 50.50 ± 0.38 Spatial-Clustering 90.50 ± 0.05 81.02 ± 0.12 64.38 ± 0.38 50.18 ± 0.49 Channel Co-Clustering 89.26 ± 0.25 80.65 ± 0.23 63.42 ± 1.34 49.80 ± 0.25 Table 2: CIFAR10 and CIFAR 100 results. For DeCov, no standard deviation is provided for the CIFAR100 results [6]. All our approaches outperform the baselines. of the cluster centers may quickly be less favored and the number of incoming samples assigned to it will be largely reduced. To overcome this issue, we exploit the Kmeans++ [3] procedure to re-sample the cluster center from the current mini-batch. Specifically, denoting the the distance between sample Xn and its nearest cluster center as dn, the probability of taking Xn as the new cluster center is d2 n/ P i d2 i . After sampling, we replace the old cluster center with the new one and continue the learning process. In practice, at the end of every epoch, we apply the kmeans++ update to cluster centers for which the number of assigned samples is small. See Alg. 1 for an outline of the steps. The overall procedure stabilizes the optimization and also increases the diversity of the cluster centers. In the backward pass, we fix the latest estimation of the cluster centers µt k and compute the gradient of loss function and the gradient of the clustering objective based on Eq. (4). Then we back-propagate all the gradients and update the weights. 4 Experiments In this section, we conduct experiments on unsupervised, supervised and zero-shot learning on several datasets. Our implementation based on TensorFlow [9] is publicly available.1 For initializing the cluster centers before training, we randomly choose them from the representations obtained with the initial network. 4.1 Autoencoder on MNIST We first test our method on the unsupervised learning task of training an autoencoder. Our architecture is identical to [17]. For ease of training we did not tie the weights between the encoder and the decoder. We use the squared ℓ2 reconstruction error as the loss function and SGD with momentum. The standard training-test-split is used. We compute the mean reconstruction error over all test images and repeat the experiments 4 times with different random initializations. We compare the baseline model, i.e., a plain autoencoder, with one that employs our sample-clustering regularization on all layers except the top fully connected layer. Sample clustering was chosen since this autoencoder only contains fully connected layers. The number of clusters and the regularization weight λ of all layers are set to 100 and 1.0e−2 respectively. For both models the same learning rate and momentum are used. Our exact parameter choices are detailed in the Appendix. As shown in Table 1, our regularization facilitates generalization as it suffers less from overfitting. Specifically, applying our regularization results in lower test set error despite slightly higher training error. More importantly, the standard deviation of the error is one order of magnitude smaller for both training and testing when applying our regularization. This indicates that our sample-clustering regularization stabilizes the model. 1https://github.com/lrjconan/deep_parsimonious 5 FC-4 FC-4 Conv-2 Conv-2 Figure 2: Visualization of clusterings on CIFAR10 dataset. Rows 1, 2 each show examples belonging to a single sample-cluster; rows 3, 4 show regions clustered via spatial clustering. 4.2 CIFAR10 and CIFAR100 In this section, we explore the CIFAR10 and CIFAR100 datasets [20]. CIFAR10 consists of 60,000 32 × 32 images assigned to 10 categories, while CIFAR100 differentiates between 100 classes. We use the standard split on both datasets. The quick CIFAR10 architecture of Caffe [19] is used for benchmarking both datasets. It consists of 3 convolutional layers and 1 fully connected layer followed by a softmax layer. The detailed parameters are publicly available on the Caffe [19] website. We report mean accuracy averaged over 4 trials. For fully connected layers we use the sample-clustering objective. For convolutional layers, we provide the results of all three clustering objectives, which we refer to as ‘sample-clustering,’ ‘spatial-clustering,’ and ‘channel-co-clustering’ respectively. We set all hyper-parameters based on cross-validation. Specifically, the number of cluster centers are set to 100 for all layers for both CIFAR10 and CIFAR100. λ is set to 1.0e−3 and 1.0e−2 for the first two convolutional and the remaining layers respectively in CIFAR10; for CIFAR100, λ is set to 10 and 1 for the first convolutional layer and the remaining layers respectively. The smoothness parameter α is set to 0.9 and 0.95 for CIFAR10 and CIFAR100 respectively. Generalization: In Table 2 we compare our framework to some recent regularizers, like DeCov [6], Dropout [26] and the baseline results obtained using Caffe. We again observe that all of our methods achieve better generalization performance. Visualization: To demonstrate the interpretability of our learned network, we visualize sampleclustering and spatial-clustering in Fig. 2, showing the top-10 ranked images and parts per cluster. In the case of sample-clustering, for each cluster we rank all its assigned images based on the distance to the cluster center. We chose to show 2 clusters from the 4th fully connected layer. In the case of spatial-clustering, we rank all “pixels” belonging to one cluster based on the distance to the cluster center. Note that we have one part (i.e., one receptive field region in the input image) for each “pixel.” We chose to show 2 clusters from the 2nd convolutional layer. The receptive field of the 2nd convolutional layer is of size 18 × 18 in the original 32 × 32 sized image. We observe that clusterings of the fully connected layer representations encode high-level semantic meaning. In contrast, clusterings of the convolutional layer representations encode attributes like shape. Note that some parts are uninformative which may be due to the fact that images in CIFAR10 are very small. Additional clusters and visualizations on CIFAR100 are shown in the Appendix. Quantitative Evaluation of Parsimonious Representation: We quantitatively evaluate our learned parsimonious representation on CIFAR100. Since only the image category is provided as ground truth, we investigate sample clustering using the 4th fully connected layer where representations capture semantic meaning. In particular, we apply K-means clustering to the learned representation extracted from the model with and without sample clustering respectively. For both cases, we set the number of clusters to be 100 and control the random seed to be the same. The most frequent class label within one cluster is assigned to all of its members. Then we compute the normalized mutual information (NMI) [25] to measure the clustering accuracy. The average results over 10 runs are shown in Table 3. Our representations achieve significantly better clustering quality 6 Method Baseline Sample-Clustering NMI 0.4122 ± 0.0012 0.4914 ± 0.0011 Table 3: Normalized mutual information of sample clustering on CIFAR100. Method Train Test DeCAF [8] 58.75 Sample-Clustering 100.0 61.77 Spatial-Clustering 100.0 61.67 Channel Co-Clustering 100.0 61.49 Table 4: Classification accuracy on CUB-200-2011. compared to the baseline which suggests that they are distributed in a more compact way in the feature space. 4.3 CUB-200-2011 Next we test our framework on the Caltech-UCSD birds dataset [34] which contains 11,788 images of 200 different categories. We follow the dataset split provided by [34] and the common practice of cropping the image using the ground-truth bounding box annotation of the birds [8, 36]. We use Alex-Net [21] pretrained on ImageNet as the base model and adapt the last layer to fit classification of 200 categories. We resize the image to 227 × 227 to fit the input size. We add clusterings to all layers except the softmax-layer. Based on cross-validation, the number of clusters are set to 200 for all layers. For convolutional layers, we set λ to 1.0e−5 for the first (bottom) 2 and use 1.0e−4 for the remaining ones. For fully connected layers, we set λ to 1.0e−3 and α is equal to 0.5. We apply Kmeans++ to replace cluster centers with less than 10 assigned samples at the end of every epoch. Generalization: We investigate the impact of our parsimonious representation on generalization performance. We compare with the DeCAF result reported in [8], which used the same network to extract a representation and applied logistic regression on top for fine-tuning. We also fine-tune Alex-Net which uses weight-decay and Dropout, and report the best result we achieved in Table 4. We observe that for the Alex-Net architecture our clustering improves the generalization compare to direct fine-tuning and the DeCAF result. Note that Alex-Net pretrained on ImageNet easily overfits on this dataset as all training accuracies reach 100 percent. Visualization: To visualize the sample-clustering and spatial-clustering we follow the setting employed when evaluating on the CIFAR dataset. For the selected cluster center we show the 10 closest images in Fig. 3. For sample clustering, 2 clusters from the 3rd convolutional layer and the 7th fully connected layer are chosen for visualization. For spatial clustering, 2 clusters from the 2nd and 3rd convolutional layers are chosen for visualization. More clusters are shown in the Appendix. The receptive fields of pixels from the 2nd and 3rd convolutional layers are of sizes 59 × 59 and 123 × 123 in the resized 227 × 227 image. We observe that cluster centers of sample clustering applied to layers lower in the network capture pose and shape information, while cluster centers from top layers model the fine-grained categories of birds. For spatial clustering, cluster centers from different layers capture parts of birds in different scales, like the beak, chest, etc. 4.4 Zero-Shot Learning We also investigate a zero-shot setting on the CUB dataset to see whether our parsimonious representation is applicable to unseen categories. We follow the setting in [1, 2] and use the same split where 100, 50 and 50 classes are used as training, validation and testing (unseen classes). We use a pre-trained Alex-Net as the baseline model and extract 4096-dimension representations from the 7th fully connected (fc) layer. We compare sample-clustering against other recent methods which also report results of using 7th fc feature of Alex-Net. Given these features, we learn the output embedding W via the same unregularized structured SVM as in [1, 2]: min W 1 N N X n=1 max y∈Y 0, ∆(yn, y) + x⊤ n W [φ(y) −φ(yn)]) , (5) where xn and yn are the feature and class label of the n-th sample and ∆is the 0-1 loss function.. φ is the class-attribute matrix provided by the CUB dataset, where each entry is a real-valued score 7 Conv-3 Conv-3 FC-7 FC-7 Conv-2 Conv-2 Conv-3 Conv-3 Figure 3: Visualization of sample and pixel clustering on CUB-200-2011 dataset. Row 1-4 and 5-8 show sample and spatial clusters respectively. Receptive fields are truncated to fit images. Method Top1 Accuracy ALE [1] 26.9 SJE [2] 40.3 Sample-Clustering 46.1 Table 5: Zero-shot learning on CUB-200-2011. indicating how likely a human thinks one attribute is present in a given class. We tune the hyperparameters on the validation set and report results in terms of top-1 accuracy averaged over the unseen classes. As shown in Table 5 our approach significantly outperforms other approaches. 5 Conclusions We have proposed a novel clustering based regularization which encourages parsimonious representations, while being easy to optimize. We have demonstrated the effectiveness of our approach on a variety of tasks including unsupervised learning, classification, fine grained categorization, and zero-shot learning. In the future we plan to apply our approach to even larger networks, e.g., residual nets, and develop a probabilistic formulation which provides a soft clustering. Acknowledgments This work was partially supported by ONR-N00014-14-1-0232, NVIDIA and the Intelligence Advanced Research Projects Activity (IARPA) via Department of Interior/Interior Business Center (DoI/IBC) contract number D16PC00003. The U.S. Government is authorized to reproduce and distribute reprints for Governmental purposes notwithstanding any copyright annotation thereon. Disclaimer: The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of IARPA, DoI/IBC, or the U.S. Government. 8 References [1] Z. Akata, F. Perronnin, Z. Harchaoui, and C. Schmid. Label-embedding for attribute-based classification. In Proc. CVPR, 2013. [2] Z. Akata, S. Reed, D. Walter, H. Lee, and B. Schiele. Evaluation of output embeddings for fine-grained image classification. In Proc. CVPR, 2015. [3] D. Arthur and S. Vassilvitskii. k-means++: The advantages of careful seeding. In Proc. SODA, 2007. [4] G. Chen. Deep learning with nonparametric clustering. arXiv preprint arXiv:1501.03084, 2015. [5] W. Chen, J. T. Wilson, S. Tyree, K. Q. Weinberger, and Y. Chen. Compressing neural networks with the hashing trick. In arXiv preprint arXiv:1504.04788, 2015. [6] M. Cogswell, F. Ahmed, R. Girshick, L. Zitnick, and D. Batra. Reducing Overfitting in Deep Networks by Decorrelating Representations. Proc. ICLR, 2016. [7] L. De Lathauwer, B. De Moor, and J. Vandewalle. A multilinear singular value decomposition. SIAM Journal on Matrix Analysis and Applications, 2000. [8] J. Donahue, Y. Jia, O. Vinyals, J. Hoffman, N. Zhang, E. Tzeng, and T. Darrell. Decaf: A deep convolutional activation feature for generic visual recognition. arXiv preprint arXiv:1310.1531, 2013. [9] M. A. et. al. TensorFlow: Large-scale machine learning on heterogeneous systems, 2015. Software available from tensorflow.org. [10] I. J. Goodfellow, D. Warde-Farley, M. Mirza, A. Courville, and Y. Bengio. Maxout Networks. Proc. ICLR, 2013. [11] S. Han, H. Mao, and W. J. Dally. Deep Compression: Compressing Deep Neural Networks with Pruning, Trained Quantization and Huffman Coding. In Proc. ICLR, 2016. [12] S. J. Hanson and L. Y. Pratt. Comparing biases for minimal network construction with back-propagation. In Proc. NIPS, 1989. [13] B. Hariharan, P. Arbeláez, R. Girshick, and J. Malik. Simultaneous Detection and Segmentation. In Proc. ECCV, 2014. [14] B. Hassibi and D. G. Stork. Second order derivatives for network pruning: Optimal brain surgeon. In Proc. NIPS, 1993. [15] J. R. Hershey, Z. Chen, J. L. Roux, and S. Watanabe. Deep clustering: Discriminative embeddings for segmentation and separation. arXiv preprint arXiv:1508.04306, 2015. [16] G. Hinton, L. Deng, D. Yu, G. E. Dahl, A.-r. Mohamed, N. Jaitly, A. Senior, V. Vanhoucke, P. Nguyen, T. N. Sainath, et al. Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. IEEE Signal Processing Magazine, 2012. [17] G. E. Hinton and R. R. Salakhutdinov. Reducing the dimensionality of data with neural networks. Science, 2006. [18] S. Ioffe and C. Szegedy. Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift. In Proc. ICML, 2015. [19] Y. Jia, E. Shelhamer, J. Donahue, S. Karayev, J. Long, R. Girshick, S. Guadarrama, and T. Darrell. Caffe: Convolutional architecture for fast feature embedding. arXiv preprint arXiv:1408.5093, 2014. [20] A. Krizhevsky and G. Hinton. Learning multiple layers of features from tiny images, 2009. [21] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In Proc. NIPS, 2012. [22] Y. LeCun, Y. Bengio, and G. Hinton. Deep learning. Nature, 2015. [23] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proc. of IEEE, 1998. [24] Y. LeCun, J. S. Denker, and S. A. Solla. Optimal Brain Damage. In Proc. NIPS, 1989. [25] C. D. Manning, P. Raghavan, and H. Schütze. Introduction to information retrieval, 2008. [26] N. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov. Dropout: A simple way to prevent neural networks from overfitting. JMLR, 2014. [27] I. Sutskever, O. Vinyals, and Q. V. Le. Sequence to sequence learning with neural networks. In Proc. NIPS, 2014. [28] F. Tian, B. Gao, Q. Cui, E. Chen, and T.-Y. Liu. Learning deep representations for graph clustering. In Proc. AAAI, 2014. [29] R. Tibshirani. Regression shrinkage and selection via the lasso. J. of the Royal Statistical Society, 1996. [30] A. N. Tikhonov. On the stability of inverse problems. USSR Academy of Sciences, 1943. [31] G. Trigeorgis, K. Bousmalis, S. Zafeiriou, and B. Schuller. A deep semi-nmf model for learning hidden representations. In Proc. ICML, 2014. [32] L. Wan, M. Zeiler, S. Zhang, Y. LeCun, and R. Fergus. Regularization of neural networks using dropconnect. Proc. ICML, 2013. [33] Z. Wang, S. Chang, J. Zhou, and T. S. Huang. Learning a task-specific deep architecture for clustering. arXiv preprint arXiv:1509.00151, 2015. [34] P. Welinder, S. Branson, T. Mita, C. Wah, F. Schroff, S. Belongie, and P. Perona. Caltech-UCSD Birds 200. Technical Report CNS-TR-2010-001, California Institute of Technology, 2010. [35] J. Yang, D. Parikh, and D. Batra. Joint unsupervised learning of deep representations and image clusters. arXiv preprint arXiv:1604.03628, 2016. [36] N. Zhang, J. Donahue, R. Girshick, and T. Darrell. Part-based r-cnns for fine-grained category detection. In Proc. ECCV, 2014. 9 | 2016 | 377 |
6,302 | Scalable Adaptive Stochastic Optimization Using Random Projections Gabriel Krummenacher♦∗ gabriel.krummenacher@inf.ethz.ch Brian McWilliams♥∗ brian@disneyresearch.com Yannic Kilcher♦ yannic.kilcher@inf.ethz.ch Joachim M. Buhmann♦ jbuhmann@inf.ethz.ch Nicolai Meinshausen♣ meinshausen@stat.math.ethz.ch ♦Institute for Machine Learning, Department of Computer Science, ETH Zürich, Switzerland ♣Seminar for Statistics, Department of Mathematics, ETH Zürich, Switzerland ♥Disney Research, Zürich, Switzerland Abstract Adaptive stochastic gradient methods such as ADAGRAD have gained popularity in particular for training deep neural networks. The most commonly used and studied variant maintains a diagonal matrix approximation to second order information by accumulating past gradients which are used to tune the step size adaptively. In certain situations the full-matrix variant of ADAGRAD is expected to attain better performance, however in high dimensions it is computationally impractical. We present ADA-LR and RADAGRAD two computationally efficient approximations to full-matrix ADAGRAD based on randomized dimensionality reduction. They are able to capture dependencies between features and achieve similar performance to full-matrix ADAGRAD but at a much smaller computational cost. We show that the regret of ADA-LR is close to the regret of full-matrix ADAGRAD which can have an up-to exponentially smaller dependence on the dimension than the diagonal variant. Empirically, we show that ADA-LR and RADAGRAD perform similarly to full-matrix ADAGRAD. On the task of training convolutional neural networks as well as recurrent neural networks, RADAGRAD achieves faster convergence than diagonal ADAGRAD. 1 Introduction Recently, so-called adaptive stochastic optimization algorithms have gained popularity for large-scale convex and non-convex optimization problems. Among these, ADAGRAD [9] and its variants [21] have received particular attention and have proven among the most successful algorithms for training deep networks. Although these problems are inherently highly non-convex, recent work has begun to explain the success of such algorithms [3]. ADAGRAD adaptively sets the learning rate for each dimension by means of a time-varying proximal regularizer. The most commonly studied and utilised version considers only a diagonal matrix proximal term. As such it incurs almost no additional computational cost over standard stochastic ∗Authors contributed equally. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. gradient descent (SGD). However, when the data has low effective rank the regret of ADAGRAD may have a much worse dependence on the dimensionality of the problem than its full-matrix variant (which we refer to as ADA-FULL). Such settings are common in high dimensional data where there are many correlations between features and can also be observed in the convolutional layers of neural networks. The computational cost of ADA-FULL is substantially higher than that of ADAGRAD– it requires computing the inverse square root of the matrix of gradient outer products to evaluate the proximal term which grows with the cube of the dimension. As such it is rarely used in practise. In this work we propose two methods that approximate the proximal term used in ADA-FULL drastically reducing computational and storage complexity with little adverse affect on optimization performance. First, in Section 3.1 we develop ADA-LR, a simple approximation using random projections. This procedure reduces the computational complexity of ADA-FULL by a factor of p but retains similar theoretical guarantees. In Section 3.2 we systematically profile the most computationally expensive parts of ADA-LR and introduce further randomized approximations resulting in a truly scalable algorithm, RADAGRAD. In Section 3.3 we outline a simple modification to RADAGRAD– reducing the variance of the stochastic gradients – which greatly improves practical performance. Finally we perform an extensive comparison between the performance of RADAGRAD with several widely used optimization algorithms on a variety of deep learning tasks. For image recognition with convolutional networks and language modeling with recurrent neural networks we find that RADAGRAD and in particular its variance-reduced variant achieves faster convergence. 1.1 Related work Motivated by the problem of training deep neural networks, very recently many new adaptive optimization methods have been proposed. Most computationally efficient among these are first order methods similar in spirit to ADAGRAD, which suggest alternative normalization factors [21, 28, 6]. Several authors propose efficient stochastic variants of classical second order methods such as LBFGS [5, 20]. Efficient algorithms exist to update the inverse of the Hessian approximation by applying the matrix-inversion lemma or directly updating the Hessian-vector product using the “double-loop” algorithm but these are not applicable to ADAGRAD style algorithms. In the convex setting these methods can show great theoretical and practical benefit over first order methods but have yet to be extensively applied to training deep networks. On a different note, the growing zoo of variance reduced SGD algorithms [19, 7, 18] has shown vastly superior performance to ADAGRAD-style methods for standard empirical risk minimization and convex optimization. Recent work has aimed to move these methods into the non-convex setting [1]. Notably, [22] combine variance reduction with second order methods. Most similar to RADAGRAD are those which propose factorized approximations of second order information. Several methods focus on the natural gradient method [2] which leverages second order information through the Fisher information matrix. [14] approximate the inverse Fisher matrix using a sparse graphical model. [8] use low-rank approximations whereas [26] propose an efficient Kronecker product based factorization. Concurrently with this work, [12] propose a randomized preconditioner for SGD. However, their approach requires access to all of the data at once in order to compute the preconditioning matrix which is impractical for training deep networks. [23] propose a theoretically motivated algorithm similar to ADA-LR and a faster alternative based on Oja’s rule to update the SVD. Fast random projections. Random projections are low-dimensional embeddings Π : Rp →Rτ which preserve – up to a small distortion – the geometry of a subspace of vectors. We concentrate on the class of structured random projections, among which the Subsampled Randomized Fourier Transform (SRFT) has particularly attractive properties [15]. The SRFT consists of a preconditioning step after which τ columns of the new matrix are subsampled uniformly at random as Π = p p/τSΘD with the definitions: (i) S ∈Rτ×p is a subsampling matrix. (ii) D ∈Rp×p is a diagonal matrix whose entries are drawn independently from {−1, 1}. (iii) Θ ∈Rp×p is a unitary discrete Fourier tranansform (DFT) matrix. This formulations allows very fast implementations using the fast Fourier transform (FFT), for example using the popular FFTW package2. Applying the FFT to a p−dimensional vector can be achieved in O (p log τ) time. Similar structured random projections 2http://www.fftw.org/ 2 have gained popularity as a way to speed up [24] and robustify [27] large-scale linear regression and for distributed estimation [17, 16]. 1.2 Problem setting The problem considered by [9] is online stochastic optimization where the goal is, at each step, to predict a point βt ∈Rp which achieves low regret with respect to a fixed optimal predictor, βopt, for a sequence of (convex) functions Ft(β). After T rounds, the regret can be defined as R(T) = PT t=1 Ft(βt) −PT t=1 Ft(βopt). Initially, we will consider functions Ft of the form Ft(β) := ft(β) + ϕ(β) where ft and ϕ are convex loss and regularization functions respectively. Throughout, the vector gt ∈∇ft(βt) refers to a particular subgradient of the loss function. Standard first order methods update βt at each step by moving in the opposite direction of gt according to a step-size parameter, η. The ADAGRAD family of algorithms [9] instead use an adaptive learning rate which can be different for each feature. This is controlled using a time-varying proximal term which we briefly review. Defining Gt = Pt i=1 gig⊤ i and Ht = δIp +(Gt−1 +gtg⊤ t )1/2, the ADA-FULL proximal term is given by ψt(β) = 1 2 ⟨β, Htβ⟩. Clearly when p is large, constructing G and finding its root and inverse at each iteration is impractical. In practice, rather than the full outer product matrix, ADAGRAD uses a proximal function consisting of the diagonal of Gt, ψt(β) = 1 2 β, δIp + diag(Gt)1/2 β . Although the diagonal proximal term is computationally cheaper, it is unable to capture dependencies between coordinates in the gradient terms. Despite this, ADAGRAD has been found to perform very well empirically. One reason for this is modern high-dimensional datasets are typically also very sparse. Under these conditions, coordinates in the gradient are approximately independent. 2 Stochastic optimization in high dimensions ADAGRAD has attractive theoretical and empirical properties and adds essentially no overhead above a standard first order method such as SGD. It begs the question, what we might hope to gain by introducing additional computational complexity. In order to motivate our contribution, we first present an analogue of the discussion in [10] focussing on when data is high-dimensional and dense. We argue that if the data has low-rank (rather than sparse) structure ADA-FULL can effectively adapt to the intrinsic dimensionality. We also show in Section 3.1 that ADA-LR has the same property. First, we review the theoretical properties of ADAGRAD algorithms, borrowing the g1:T,j notation[9]. Proposition 1. ADAGRAD and ADA-FULL achieve the following regret (Corollaries 6 & 11 from [9]) respectively: RD(T) ≤2∥βopt∥∞ p X j=1 ∥g1:T,j∥+ δ∥βopt∥1 , RF (T) ≤2∥βopt∥· tr(G1/2 T ) + δ∥βopt∥. (1) The major difference between RD(T) and RF (T) is the inclusion of the final full-matrix and diagonal proximal term, respectively. Under a sparse data generating distribution ADAGRAD achieves an up-to exponential improvement over SGD which is optimal in a minimax sense [10]. While data sparsity is often observed in practise in high-dimensional datasets (particularly web/text data) many other problems are dense. Furthermore, in practise applying ADAGRAD to dense data results in a learning rate which tends to decay too rapidly. It is therefore natural to ask how dense data affects the performance of ADA-FULL. For illustration, consider when the data points xi are sampled i.i.d. from a Gaussian distribution PX = N(0, Σ). The resulting variable will clearly be dense. A common feature of high dimensional data is low effective rank defined for a matrix Σ as r(Σ) = tr(Σ)/∥Σ∥≤rank(Σ) ≤p. Low effective rank implies that r ≪p and therefore the eigenvalues of the covariance matrix decay quickly. We will consider distributions parameterised by covariance matrices Σ with eigenvalues λj(Σ) = λ0j−α for j = 1, . . . , p. Functions of the form Ft(β) = Ft(β⊤xt) have gradients ∥gt∥≤M ∥xt∥. For example, the least squares loss Ft(β⊤xt) = 1 2(yt −β⊤xt)2 has gradient gt = xt(yt −x⊤ t βt) = xtεt, such that 3 ∥εt∥≤M. Let us consider the effect of distributions parametrised by Σ on the proximal terms of full, and diagonal ADAGRAD. Plugging X into the proximal terms of (1) and taking expectations with respect to PX we obtain for ADAGRAD and ADA-FULL respectively: E p X j=1 ∥g1:T,j∥≤ p X j=1 v u u tM 2E T X t=1 x2 t,j ≤pM √ T, E tr(( T X t=1 gtg⊤ t )1/2) ≤M p Tλ0 p X j=1 j−α/2, (2) where the first inequality is from Jensen and the second is from noticing the sum of T squared Gaussian random variables is a χ2 random variable. We can consider the effect of fast-decaying spectrum: for α ≥2, Pp j=1 j−α/2 = O (log p) and for α ∈(1, 2), Pp j=1 j−α/2 = O p1−α/2 . When the data (and thus the gradients) are dense, yet have low effective rank, ADA-FULL is able to adapt to this structure. On the contrary, although ADAGRAD is computationally practical, in the worst case it may have exponentially worse dependence on the data dimension (p compared with log p). In fact, the discrepancy between the regret of ADA-FULL and that of ADAGRAD is analogous to the discrepancy between ADAGRAD and SGD for sparse data. Algorithm 1 ADA-LR Input: η > 0, δ ≥0, τ 1: for t = 1 . . . T do 2: Receive gt = ∇ft(βt). 3: Gt = Gt−1 + gtg⊤ t 4: Project: ˜Gt = GtΠ 5: QR = ˜Gt {QR-decomposition} 6: B = Q⊤Gt 7: U, Σ, V = B {SVD} 8: 9: 10: βt+1 = βt −ηV(Σ1/2 + δI)−1V⊤gt 11: end for Output: βT Algorithm 2 RADAGRAD Input: η > 0, δ ≥0, τ 1: for t = 1 . . . T do 2: Receive gt = ∇ft(βt). 3: Project: ˜gt = Πgt 4: ˜Gt = ˜Gt−1 + gt˜g⊤ t 5: Qt, Rt ←qr_update(Qt−1, Rt−1, gt, ˜gt) 6: B = ˜G⊤ t Qt 7: U, Σ, W = B {SVD} 8: V = WQ⊤ 9: γt = η(gt −VV⊤gt) 10: βt+1 = βt −ηV(Σ1/2 +δI)−1V⊤gt −γt 11: end for Output: βT 3 Approximating ADA-FULL using random projections It is clear that in certain regimes, ADA-FULL provides stark optimization advantages over ADAGRAD in terms of the dependence on p. However, ADA-FULL requires maintaining a p × p matrix, G and computing its square root and inverse. Therefore, computationally the dependence of ADA-FULL on p scales with the cube which is impractical in high dimensions. A naïve approach would be to simply reduce the dimensionality of the gradient vector, ˜gt ∈Rτ = Πgt. ADA-FULL is now directly applicable in this low-dimensional space, returning a solution vector ˜βt ∈Rτ at each iteration. However, for many problems, the original coordinates may have some intrinsic meaning or in the case of deep networks, may be parameters in a model. In which case it is important to return a solution in the original space. Unfortunately in general it is not possible to recover such a solution from ˜βt [30]. Instead, we consider a different approach to maintaining and updating an approximation of the ADAGRAD matrix while retaining the original dimensionality of the parameter updates β and gradients g. 3.1 Randomized low-rank approximation As a first approach we approximate the inverse square root of Gt using a fast randomized singular value decomposition (SVD) [15]. We proceed in two stages: First we compute an approximate basis 4 Q for the range of Gt. Then we use Q to compute an approximate SVD of Gt by forming the smaller dimensional matrix B = Q⊤Gt and then compute the low-rank SVD UΣV⊤= B. This is faster than computing the SVD of Gt directly if Q has few columns. An approximate basis Q can be computed efficiently by forming the matrix ˜Gt = GtΠ by means of a structured random projection and then constructing an orthonormal basis for the range of ˜Gt by QR-decomposition. The randomized SVD allows us to quickly compute the square root and pseudo-inverse of the proximal term Ht by setting ˜H−1 t = V(Σ1/2 + δI)−1V⊤. We call this approximation ADA-LR and describe the steps in full in Algorithm 1. In practice, using a structured random projection such as the SRFT leads to an approximation of the original matrix, Gt of the following form
Gt −QQ⊤Gt
≤ϵ, with high probability [15] where ϵ depends on τ, the number of columns of Q; p and the τ th singular value of Gt. Briefly, if the singular values of Gt decay quickly and τ is chosen appropriately, ϵ will be small (this is stated more formally in Proposition 2). We leverage this result to derive the following regret bound for ADA-LR (see C.1 for proof). Proposition 2. Let σk+1 be the kth largest singular value of Gt. Setting the projection dimension as 4 √ k + p 8 log(kn) 2 ≤τ ≤p and defining ϵ = p 1 + 7p/τ · σk+1. With failure probability at most O k−1 ADA-LR achieves regret RLR(T) ≤2∥βopt∥tr(G1/2 T ) + (2τ√ϵ + δ)∥βopt∥. Due to the randomized approximation we incur an additional 2τ√ϵ∥βopt∥compared with the regret of ADA-FULL (eq. 1). So, under the earlier stated assumption of fast decaying eigenvalues we can use an identical argument as in eq. (2) to similarly obtain a dimension dependence of O (log p + τ). Approximating the inverse square root decreases the complexity of each iteration from O p3 to O τp2 . We summarize the cost of each step in Algorithm 1 and contrast it with the cost of ADA-FULL in Table A.1 in Section A. Even though ADA-LR removes one factor of p form the runtime of ADA-FULL it still needs to store the large matrix Gt. This prevents ADA-LR from being a truly practical algorithm. In the following section we propose a second algorithm which directly stores a low dimensional approximation to Gt that can be updated cheaply. This allows for an improvement in runtime to O τ 2p . 3.2 RADAGRAD: A faster approximation From Table A.1, the expensive steps in Algorithm 1 are the update of Gt (line 3), the random projection (line 4) and the projection onto the approximate range of Gt (line 6). In the following we propose RADAGRAD, an algorithm that reduces the complexity to O τ 2p by only approximately solving some of the expensive steps in ADA-LR while maintaining similar performance in practice. To compute the approximate range Q, we do not need to store the full matrix Gt. Instead we only require the low dimensional matrix ˜Gt = GtΠ. This matrix can be computed iteratively by setting ˜Gt ∈Rp×τ = ˜Gt−1 + gt(Πgt)⊤. This directly reduces the cost of the random projection to O (p log τ) since we only project the vector gt instead of the matrix Gt, it also makes the update of ˜Gt faster and saves storage. We then project ˜Gt on the approximate range of Gt and use the SVD to compute the inverse square root. Since Gt is symmetric its row and column space are identical so little information is lost by projecting ˜Gt instead of Gt on the approximate range of Gt.3 The advantage is that we can now compute the SVD in O τ 3 and the matrix-matrix product on line 6 in O τ 2p . See Algorithm 2 for the full procedure. The most expensive steps are now the QR decomposition and the matrix multiplications in steps 6 and 8 (see Algorithm 2 and Table A.1). Since at each iteration we only update the matrix ˜Gt with the rank-one matrix gt˜g⊤ t we can use faster rank-1 QR-updates [11] instead of recomputing the full QR decomposition. To speed up the matrix-matrix product ˜G⊤ t Q for very large problems (e.g. backpropagation in convolutional neural networks), a multithreaded BLAS implementation can be used. 3This idea is similar to bilinear random projections [13]. 5 3.3 Practical algorithms Here we outline several simple modifications to the RADAGRAD algorithm to improve practical performance. Corrected update. The random projection step only retains at most τ eigenvalues of Gt. If the assumption of low effective rank does not hold, important information from the p −τ smallest eigenvalues might be discarded. RADAGRAD therefore makes use of the corrected update βt+1 = βt −ηV(Σ1/2 + δI)−1V⊤gt −γt, where γt = η(I −VV⊤)gt. γt is the projection of the current gradient onto the space orthogonal to the one captured by the random projection of Gt. This ensures that important variation in the gradient which is poorly approximated by the random projection is not completely lost. Consequently, if the data has rank less than τ, ∥γ∥≈0. This correction only requires quantities which have already been computed but greatly improves practical performance. Variance reduction. Variance reduction methods based on SVRG [19] obtain lower-variance gradient estimates by means of computing a “pivot point” over larger batches of data. Recent work has shown improved theoretical and empirical convergence in non-convex problems [1] in particular in combination with ADAGRAD. We modify RADAGRAD to use the variance reduction scheme of SVRG. The full procedure is given in Algorithm 3 in Section B. The majority of the algorithm is as RADAGRAD except for the outer loop which computes the pivot point, µ every epoch which is used to reduce the variance of the stochastic gradient (line 4). The important additional parameter is m, the update frequency for µ. As in [1] we set this to m = 5n. Practically, as is standard practise we initialise RADA-VR by running ADAGRAD for several epochs. We study the empirical behaviour of ADA-LR, RADAGRAD and its variance reduced variant in the next section. 4 Experiments 4.1 Low effective rank data 0 500 1000 1500 2000 2500 3000 3500 4000 Iteration 10−2 10−1 100 Loss ADA-FULL ADA-LR RADAGRAD ADAGRAD (a) Logistic Loss 0 10 20 30 40 50 60 Principal component 10−3 10−2 10−1 100 Normalised eigenvalues ADA-FULL ADA-LR RADAGRAD ADAGRAD (b) Spectrum Figure 1: Comparison of: (a) loss and (b) the largest eigenvalues (normalised by their sum) of the proximal term on simulated data. We compare the performance of our proposed algorithms against both the diagonal and full-matrix ADAGRAD variants in the idealised setting where the data is dense but has low effective rank. We generate binary classification data with n = 1000 and p = 125. The data is sampled i.i.d. from a Gaussian distribution N(µc, Σ) where Σ has with rapidly decaying eigenvalues λj(Σ) = λ0j−α with α = 1.3, λ0 = 30. Each of the two classes has a different mean, µc. For each algorithm learning rates are tuned using cross validation. The results for 5 epochs are averaged over 5 runs with different permutations of the data set and instantiations of the random projection for ADA-LR and RADAGRAD. For the random projection we use an oversampling factor so Π ∈R(10+τ)×p to ensure accurate recovery of the top τ singular values and then set the values of λ[τ:p] to zero [15]. Figure 1a shows the mean loss on the training set. The performance of ADA-LR and RADAGRAD match that of ADA-FULL. On the other hand, ADAGRAD converges to the optimum much more slowly. Figure 1b shows the largest eigenvalues (normalized by their sum) of the proximal matrix for each method at the end of training. The spectrum of Gt decays rapidly which is matched by 6 0 5000 10000 15000 20000 25000 30000 35000 40000 Iteration 10−3 10−2 10−1 Training Loss RADAGRAD RADA-VR ADAGRAD ADAGRAD+SVRG 0 5000 10000 15000 20000 25000 30000 35000 40000 Iteration 0.95 0.96 0.97 0.98 0.99 Test Accuracy RADAGRAD RADA-VR ADAGRAD ADAGRAD+SVRG (a) MNIST 0 5000 10000 15000 20000 25000 30000 35000 Iteration 100 Training Loss RADAGRAD RADA-VR ADAGRAD ADAGRAD+SVRG 0 5000 10000 15000 20000 25000 30000 35000 Iteration 0.35 0.40 0.45 0.50 0.55 0.60 0.65 0.70 0.75 Test Accuracy RADAGRAD RADA-VR ADAGRAD ADAGRAD+SVRG (b) CIFAR 0 10000 20000 30000 40000 50000 Iteration 10−1 100 Training Loss RADAGRAD RADA-VR ADAGRAD ADAGRAD+SVRG 0 10000 20000 30000 40000 50000 Iteration 0.3 0.4 0.5 0.6 0.7 0.8 0.9 Test Accuracy RADAGRAD RADA-VR ADAGRAD ADAGRAD+SVRG (c) SVHN Figure 2: Comparison of training loss (top row) and test accuracy (bottom row) on (a) MNIST, (b) CIFAR and (c) SVHN. the randomized approximation. This illustrates the dependencies between the coordinates in the gradients and suggests Gt can be well approximated by a low-dimensional matrix which considers these dependencies. On the other hand the spectrum of ADAGRAD (equivalent to the diagonal of G) decays much more slowly. The learning rate, η chosen by RADAGRAD and ADA-FULL are roughly one order of magnitude higher than for ADAGRAD. 4.2 Non-convex optimization in neural networks Here we compare RADAGRAD and RADA-VR against ADAGRAD and the combination of ADAGRAD+SVRG on the task of optimizing several different neural network architectures. Convolutional Neural Networks. We used modified variants of standard convolutional network architectures for image classification on the MNIST, CIFAR-10 and SVHN datasets. These consist of three 5 × 5 convolutional layers generating 32 channels with ReLU non-linearities, each followed by 2 × 2 max-pooling. The final layer was a dense softmax layer and the objevtive was to minimize the categorical cross entropy. We used a batch size of 8 and trained the networks without momentum or weight decay, in order to eliminate confounding factors. Instead, we used dropout regularization (p = 0.5) in the dense layers during training. Step sizes were determined by coarsely searching a log scale of possible values and evaluating performance on a validation set. We found RADAGRAD to have a higher impact with convolutional layers than with dense layers, due to the higher correlations between weights. Therefore, for computational reasons, RADAGRAD was only applied on the convolutional layers. The last dense classification layer was trained with ADAGRAD. In this setting ADA-FULL is computationally infeasible. The number of parameters in the convolutional layers is between 50-80k. Simply storing the full G matrix using double precision would require more memory than is available on top-of-the-line GPUs. The results of our experiments can be seen in Figure 2, where we show the objective value during training and the test accuracy. We find that both RADAGRAD variants consistently outperform both ADAGRAD and the combination of ADAGRAD+SVRG on these tasks. In particular combining RADAGRAD with variance reduction results in the largest improvement for training although both RADAGRAD variants quickly converge to very similar values for test accuracy. For all models, the learning rate selected by RADAGRAD is approximately an order of magnitude larger than the one selected by ADAGRAD. This suggests that RADAGRAD can make more aggressive steps than ADAGRAD, which results in the relative success of RADAGRAD over ADAGRAD, especially at the beginning of the experiments. 7 We observed that RADAGRAD performed 5-10× slower than ADAGRAD per iteration. This can be attributed to the lack of GPU-optimized SVD and QR routines. These numbers are comparable with other similar recently proposed techniques [23]. However, due to the faster convergence we found that the overall optimization time of RADAGRAD was lower than for ADAGRAD. 0 20000 40000 60000 80000 100000 Iteration 10−3 10−2 10−1 Training Loss RADAGRAD ADAGRAD 0 20000 40000 60000 80000 100000 Iteration 10−1 100 Test Loss RADAGRAD ADAGRAD Figure 3: Comparison of training loss (left) and and test loss (right) on language modelling task with the T-LSTM. Recurrent Neural Networks. We trained the strongly-typed variant of the long short-term memory network (T-LSTM, [4]) for language modelling, which consists of the following task: Given a sequence of words from an original text, predict the next word. We used pre-trained GLOVE embedding vectors [29] as input to the T-LSTM layer and a softmax over the vocabulary (10k words) as output. The loss is the mean categorical crossentropy. The memory size of the T-LSTM units was set to 256. We trained and evaluated our network on the Penn Treebank dataset [25]. We subsampled strings of length 20 from the dataset and asked the network to predict each word in the string, given the words up to that point. Learning rates were selected by searching over a log scale of possible values and measuring performance on a validation set. We compared RADAGRAD with ADAGRAD without variance reduction. The results of this experiment can be seen in Figure 3. During training, we found that RADAGRAD consistently outperforms ADAGRAD: RADAGRAD is able to both quicker reduce the training loss and also reaches a smaller value (5.62 × 10−4 vs. 1.52 × 10−3, a 2.7× reduction in loss). Again, we found that the selected learning rate is an order of magnitude higher for RADAGRAD than for ADAGRAD. RADAGRAD is able to exploit the fact that T-LSTMs perform type-preserving update steps which should preserve any low-rank structure present in the weight matrices. The relative improvement of RADAGRAD over ADAGRAD in training is also reflected in the test loss (1.15 × 10−2 vs. 3.23 × 10−2, a 2.8× reduction). 5 Discussion We have presented ADA-LR and RADAGRAD which approximate the full proximal term of ADAGRAD using fast, structured random projections. ADA-LR enjoys similar regret to ADA-FULL and both methods achieve similar empirical performance at a fraction of the computational cost. Importantly, RADAGRAD can easily be modified to make use of standard improvements such as variance reduction. Using variance reduction in combination in particular has stark benefits for non-convex optimization in convolutional and recurrent neural networks. We observe a marked improvement over widely-used techniques such as ADAGRAD and SVRG, the combination of which has recently been proven to be an excellent choice for non-convex optimization [1]. Furthermore, we tried to incorporate exponential forgetting schemes similar to RMSPROP and ADAM into the RADAGRAD framework but found that these methods degraded performance. A downside of such methods is that they require additional parameters to control the rate of forgetting. Optimization for deep networks has understandably been a very active research area. Recent work has concentrated on either improving estimates of second order information or investigating the effect of variance reduction on the gradient estimates. It is clear from our experimental results that a thorough study of the combination provides an important avenue for further investigation, particularly where parts of the underlying model might have low effective rank. Acknowledgements. We are grateful to David Balduzzi, Christina Heinze-Deml, Martin Jaggi, Aurelien Lucchi, Nishant Mehta and Cheng Soon Ong for valuable discussions and suggestions. 8 References [1] Z. Allen-Zhu and E. Hazan. Variance reduction for faster non-convex optimization. In Proceedings of the 33rd International Conference on Machine Learning, 2016. [2] S.-I. Amari. Natural gradient works efficiently in learning. Neural computation, 10(2):251–276, 1998. [3] D. Balduzzi. Deep online convex optimization with gated games. arXiv preprint arXiv:1604.01952, 2016. [4] D. Balduzzi and M. Ghifary. Strongly-typed recurrent neural networks. In Proceedings of the 33rd International Conference on Machine Learning, 2016. [5] R. H. Byrd, S. Hansen, J. Nocedal, and Y. Singer. A stochastic quasi-newton method for large-scale optimization. arXiv preprint arXiv:1401.7020, 2014. [6] Y. N. Dauphin, H. de Vries, J. Chung, and Y. Bengio. Rmsprop and equilibrated adaptive learning rates for non-convex optimization. arXiv preprint arXiv:1502.04390, 2015. [7] 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, 2014. [8] G. Desjardins, K. Simonyan, R. Pascanu, et al. Natural neural networks. In Advances in Neural Information Processing Systems, pages 2062–2070, 2015. [9] J. Duchi, E. Hazan, and Y. Singer. Adaptive subgradient methods for online learning and stochastic optimization. The Journal of Machine Learning Research, 12:2121–2159, 2011. [10] 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, 2013. [11] G. H. Golub and C. F. Van Loan. Matrix computations, volume 3. JHU Press, 2012. [12] A. Gonen and S. Shalev-Shwartz. Faster sgd using sketched conditioning. arXiv preprint arXiv:1506.02649, 2015. [13] Y. Gong, S. Kumar, H. Rowley, and S. Lazebnik. Learning binary codes for high-dimensional data using bilinear projections. In Proceedings of CVPR, pages 484–491, 2013. [14] R. Grosse and R. Salakhudinov. Scaling up natural gradient by sparsely factorizing the inverse fisher matrix. In Proceedings of the 32nd International Conference on Machine Learning, pages 2304–2313, 2015. [15] N. Halko, P. G. Martinsson, and J. A. Tropp. Finding structure with randomness: Probabilistic algorithms for constructing approximate matrix decompositions. SIAM Review, 53(2):217–288, 2011. [16] C. Heinze, B. McWilliams, and N. Meinshausen. Dual-loco: Distributing statistical estimation using random projections. In Proceedings of AISTATS, 2016. [17] C. Heinze, B. McWilliams, N. Meinshausen, and G. Krummenacher. Loco: Distributing ridge regression with random projections. arXiv preprint arXiv:1406.3469, 2014. [18] T. Hofmann, A. Lucchi, S. Lacoste-Julien, and B. McWilliams. Variance reduced stochastic gradient descent with neighbors. In Advances in Neural Information Processing Systems, 2015. [19] R. Johnson and T. Zhang. Accelerating stochastic gradient descent using predictive variance reduction. In Advances in Neural Information Processing Systems, pages 315–323, 2013. [20] N. S. Keskar and A. S. Berahas. adaQN: An Adaptive Quasi-Newton Algorithm for Training RNNs. Nov. 2015. [21] D. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. [22] A. Lucchi, B. McWilliams, and T. Hofmann. A variance reduced stochastic newton method. arXiv preprint arXiv:1503.08316, 2015. [23] H. Luo, A. Agarwal, N. Cesa-Bianchi, and J. Langford. Efficient second order online learning via sketching. arXiv preprint arXiv:1602.02202, 2016. [24] M. W. Mahoney. Randomized algorithms for matrices and data. Apr. 2011. arXiv:1104.5557v3 [cs.DS]. [25] M. P. Marcus, M. A. Marcinkiewicz, and B. Santorini. Building a large annotated corpus of english: The penn treebank. Computational linguistics, 19(2):313–330, 1993. [26] J. Martens and R. Grosse. Optimizing neural networks with kronecker-factored approximate curvature. In Proceedings of the 32nd International Conference on Machine Learning, 2015. [27] B. McWilliams, G. Krummenacher, M. Lucic, and J. M. Buhmann. Fast and robust least squares estimation in corrupted linear models. In Advances in Neural Information Processing Systems, volume 27, 2014. [28] B. Neyshabur, R. R. Salakhutdinov, and N. Srebro. Path-sgd: Path-normalized optimization in deep neural networks. In Advances in Neural Information Processing Systems, pages 2413–2421, 2015. [29] J. Pennington, R. Socher, and C. D. Manning. Glove: Global vectors for word representation. In EMNLP, volume 14, pages 1532–1543, 2014. [30] L. Zhang, M. Mahdavi, R. Jin, T. Yang, and S. Zhu. Recovering optimal solution by dual random projection. arXiv preprint arXiv:1211.3046, 2012. 9 | 2016 | 378 |
6,303 | Graphons, mergeons, and so on! Justin Eldridge Mikhail Belkin Yusu Wang The Ohio State University {eldridge, mbelkin, yusu}@cse.ohio-state.edu Abstract In this work we develop a theory of hierarchical clustering for graphs. Our modeling assumption is that graphs are sampled from a graphon, which is a powerful and general model for generating graphs and analyzing large networks. Graphons are a far richer class of graph models than stochastic blockmodels, the primary setting for recent progress in the statistical theory of graph clustering. We define what it means for an algorithm to produce the “correct" clustering, give sufficient conditions in which a method is statistically consistent, and provide an explicit algorithm satisfying these properties. 1 Introduction A fundamental problem in the theory of clustering is that of defining a cluster. There is no single answer to this seemingly simple question. The right approach depends on the nature of the data and the proper modeling assumptions. In a statistical setting where the objects to be clustered come from some underlying probability distribution, it is natural to define clusters in terms of the distribution itself. The task of a clustering, then, is twofold – to identify the appropriate cluster structure of the distribution and to recover that structure from a finite sample. Thus we would like to say that a clustering is good if it is in some sense close to the ideal structure of the underlying distribution, and that a clustering method is consistent if it produces clusterings which converge to the true clustering, given larger and larger samples. Proving the consistency of a clustering method deepens our understanding of it, and provides justification for using the method in the appropriate setting. In this work, we consider the setting in which the objects to be clustered are the vertices of a graph sampled from a graphon – a very general random graph model of significant recent interest. We develop a statistical theory of graph clustering in the graphon model; To the best of our knowledge, this is the first general consistency framework developed for such a rich family of random graphs. The specific contributions of this paper are threefold. First, we define the clusters of a graphon. Our definition results in a graphon having a tree of clusters, which we call its graphon cluster tree. We introduce an object called the mergeon which is a particular representation of the graphon cluster tree that encodes the heights at which clusters merge. Second, we develop a notion of consistency for graph clustering algorithms in which a method is said to be consistent if its output converges to the graphon cluster tree. Here the graphon setting poses subtle yet fundamental challenges which differentiate it from classical clustering models, and which must be carefully addressed. Third, we prove the existence of consistent clustering algorithms. In particular, we provide sufficient conditions under which a graphon estimator leads to a consistent clustering method. We then identify a specific practical algorithm which satisfies these conditions, and in doing so present a simple graph clustering algorithm which provably recovers the graphon cluster tree. Related work. Graphons are objects of significant recent interest in graph theory, statistics, and machine learning. The theory of graphons is rich and diverse; A graphon can be interpreted as a generalization of a weighted graph with uncountably many nodes, as the limit of a sequence of finite graphs, or, more importantly for the present work, as a very general model for generating 29th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. unweighted, undirected graphs. Conveniently, any graphon can be represented as a symmetric, measurable function W : [0, 1]2 →[0, 1], and it is this representation that we use throughout this paper. The graphon as a graph limit was introduced in recent years by [16], [5], and others. The interested reader is directed to the book by Lovász [15] on the subject. There has also been a considerable recent effort to produce consistent estimators of the graphon, including the work of [20], [8], [2], [18], and others. We will analyze a simple modification of the graphon estimator proposed by [21] and show that it leads to a graph clustering algorithm which is a consistent estimator of the graphon cluster tree. Much of the previous statistical theory of graph clustering methods assumes that graphs are generated by the so-called stochastic blockmodel. The simplest form of the model generates a graph with n nodes by assigning each node, randomly or deterministically, to one of two communities. An edge between two nodes is added with probability α if they are from the same community and with probability β otherwise. A graph clustering method is said to achieve exact recovery if it identifies the true community assignment of every node in the graph with high probability as n →∞. The blockmodel is a special case of a graphon model, and our notion of consistency will imply exact recovery of communities. Stochastic blockmodels are widely studied, and it is known that, for example, spectral methods like that of [17] are able to recover the communities exactly as n →∞, provided that α and β remain constant, or that the gap between them does not shrink too quickly. For a summary of consistency results in the blockmodel, see [1], which also provides information-theoretic thresholds for the conditions under which exact recovery is possible. In a related direction, [4] examines the ability of spectral clustering to withstand noise in a hierarchical block model. The density setting. The problem of defining the underlying cluster structure of a probability distribution goes back to Hartigan [12] who considered the setting in which the objects to be clustered are points sampled from a density f : X →R+. In this case, the high density clusters of f are defined to be the connected components of the upper level sets {x : f(x) ≥λ} for any λ > 0. The set of all such clusters forms the so-called density cluster tree. Hartigan [12] defined a notion of consistency for the density cluster tree, and proved that single-linkage clustering is not consistent. In recent years, [9] and [14] have demonstrated methods which are Hartigan consistent. [10] introduced a distance between a clustering of the data and the density cluster tree, called the merge distortion metric. A clustering method is said to be consistent if the trees it produces converge in merge distortion to density cluster tree. It is shown that convergence in merge distortion is stronger than Hartigan consistency, and that the method of [9] is consistent in this stronger sense. In the present work, we will be motivated by the approach taken in [12] and [10]. We note, however, that there are significant and fundamental differences between the density case and the graphon setting. Specifically, it is possible for two graphons to be equivalent in the same way that two graphs are: up to a relabeling of the vertices. As such, a graphon W is a representative of an equivalence class of graphons modulo appropriately defined relabeling. It is therefore necessary to define the clusters of W in a way that does not depend upon the particular representative used. A similar problem occurs in the density setting when we wish to define the clusters not of a single density function, but rather of a class of densities which are equal almost everywhere; Steinwart [19] provides an elegant solution. But while the domain of a density is equipped with a meaningful metric – the mass of a ball around a point x is the same under two equivalent densities – the ambient metric on the vertices of a graphon is not useful. As a result, approaches such as that of [19] do not directly apply to the graphon case, and we must carefully produce our own. Additionally, we will see that the procedure for sampling a graph from a graphon involves latent variables which are in principle unrecoverable from data. These issues have no analogue in the classical density setting, and present very distinct challenges. Miscellany. Due to space constraints, most of the (rather involved) technical details are in the appendix. We will use [n] to denote the set {1, . . . , n}, △for the symmetric difference, µ for the Lebesgue measure on [0, 1], and bold letters to denote random variables. 2 2 The graphon model In order to discuss the statistical properties of a graph clustering algorithm, we must first model the process by which graphs are generated. Formally, a random graph model is a sequence of random variables G1, G2, . . . such that the range of Gn consists of undirected, unweighted graphs with node set [n], and the distribution of Gn is invariant under relabeling of the nodes – that is, isomorphic graphs occur with equal probability. A random graph model of considerable recent interest is the graphon model, in which the distribution over graphs is determined by a symmetric, measurable function W : [0, 1]2 →[0, 1] called a graphon. Informally, a graphon W may be thought of as the weight matrix of an infinite graph whose node set is the continuous unit interval, so that W(x, y) represents the weight of the edge between nodes x and y. Interpreting W(x, y) as a probability suggests the following graph sampling procedure: To draw a graph with n nodes, we first select n points x1, . . . , xn at random from the uniform distribution on [0, 1] – we can think of these xi as being random “nodes” in the graphon. We then sample a random graph G on node set [n] by admitting the edge (i, j) with probability W(xi, xj); by convention, selfedges are not sampled. It is important to note that while we begin by drawing a set of nodes {xi} from the graphon, the graph as given to us is labeled by integers. Therefore, the correspondence between node i in the graph and node xi in the graphon is latent. It can be shown that this sampling procedure defines a distribution on finite graphs, such that the probability of graph G = ([n], E) is given by PW(G = G) = ∫ [0,1]n ∏ (i, j)∈E W(xi, xj) ∏ (i, j)E [ 1 −W(xi, xj) ] ∏ i∈[n] dxi. (1) For a fixed choice of x1, . . . , xn ∈[0, 1], the integrand represents the likelihood that the graph G is sampled when the probability of the edge (i, j) is assumed to be W(xi, xj). By integrating over all possible choices of x1, . . . , xn, we obtain the probability of the graph. { { { (a) Graphon W. (b) Wφ weakly isomorphic to W. (c) An instance of a graph adjacency sampled from W. Figure 1 A very general class of random graph models may be represented as graphons. In particular, a random graph model G1, G2, . . . is said to be consistent if the random graph Fk−1 obtained by deleting node k from Gk has the same distribution as Gk. A random graph model is said to be local if whenever S, T ⊂[k] are disjoint, the random subgraphs of Gk induced by S and T are independent random variables. A result of Lovász and Szegedy [16] is that any consistent, local random graph model is equivalent to the distribution on graphs defined by PW for some graphon W; the converse is true as well. That is, any such random graph model is equivalent to a graphon. A particular random graph model is not uniquely defined by a graphon – it is clear from Equation 1 that two graphons W1 and W2 which are equal almost everywhere (i.e., differ on a set of measure zero) define the same distribution on graphs. In fact, the distribution defined by W is unchanged by “relabelings” of W’s nodes. More formally, if Σ is the sigma-algebra of Lebesgue measurable subsets of [0, 1] and µ is the Lebesgue measure, we say that a relabeling function φ : ([0, 1], Σ) → ([0, 1], Σ) is measure preserving if for any measurable set A ∈Σ, µ(φ−1(A)) = µ(A). We define the relabeled graphon Wφ by Wφ(x, y) = W(φ(x), φ(y)). By analogy with finite graphs, we say that graphons W1 and W2 are weakly isomorphic if they are equivalent up to relabeling, i.e., if there exist measure preserving maps φ1 and φ2 such that Wφ1 1 = Wφ2 2 almost everywhere. Weak isomorphism is an equivalence relation, and most of the important properties of a graphon in fact belong to its equivalence class. For instance, a powerful result of [15] is that two graphons define the same random graph model if and only if they are weakly isomorphic. An example of a graphon W is shown in Figure 1a. It is conventional to plot the graphon as one typically plots an adjacency matrix: with the origin in the upper-left corner. Darker shades correspond to higher values of W. Figure 1b depicts a graphon Wφ which is weakly isomorphic to W. In particular, Wφ is the relabeling of W by the measure preserving transformation φ(x) = 2x mod 1. As such, the graphons shown in Figures 1a and 1b define the same distribution on graphs. Figure 1c shows the adjacency matrix A of a graph of size n = 50 3 sampled from the distribution defined by the equivalence class containing W and Wφ. Note that it is in principle not possible to determine from A alone which graphon W or Wφ it was sampled from, or to what node in W a particular column of A corresponds to. 3 The graphon cluster tree We now identify the cluster structure of a graphon. We will define a graphon’s clusters such that they are analogous to the maximally-connected components of a finite graph. It turns out that the collection of all clusters has hierarchical structure; we call this object the graphon cluster tree. We propose that the goal of clustering in the graphon setting is the recovery of the graphon cluster tree. Connectedness and clusters. Consider a finite weighted graph. It is natural to cluster the graph into connected components. In fact, because of the weighted edges, we can speak of the clusters of the graph at various levels. More precisely, we say that a set of nodes A is internally connected – or, from now on, just connected – at level λ if for every pair of nodes in A there is a path between them such that every node along the path is also in A, and the weight of every edge in the path is at least λ. Equivalently, A is connected at level λ if and only if for every partitioning of A into disjoint, non-empty sets A1 and A2 there is an edge of weight λ or greater between A1 and A2. The clusters at level λ are then the largest connected components at level λ. A graphon is, in a sense, an infinite weighted graph, and we will define the clusters of a graphon using the example above as motivation. In doing so, we must be careful to make our notion robust to changes of the graphon on a set of zero measure, as such changes do not affect the graph distribution defined by the graphon. We base our definition on that of Janson [13], who defined what it means for a graphon to be connected as a whole. We extend the definition in [13] to speak of the connectivity of subsets of the graphon’s nodes at a particular height. Our definition is directly analogous to the notion of internal connectedness in finite graphs. Definition 1 (Connectedness). Let W be a graphon, and let A ⊂[0, 1] be a set of positive measure. We say that A is disconnected at level λ if there exists a measurable S ⊂A such that 0 < µ(S ) < µ(A), and W < λ almost everywhere on S × (A \ S ). Otherwise, we say that A is connected at level λ. We now identify the clusters of a graphon; as in the finite case, we will frame our definition in terms of maximally-connected components. We begin by gathering all subsets of [0, 1] which should belong to some cluster at level λ. Naturally, if a set is connected at level λ, it should be in a cluster at level λ; for technical reasons, we will also say that a set which is connected at all levels λ′ < λ (though perhaps not at λ) should be contained in a cluster at level λ, as well. That is, for any λ, the collection Aλ of sets which should be contained in some cluster at level λ is Aλ = { A ∈Σ : µ(A) > 0 and A is connected at every level λ′ < λ}. Now suppose A1, A2 ∈Aλ, and that there is a set A ∈Aλ such that A ⊃A1∪A2. Naturally, the cluster to which A belongs should also contain A1 and A2, since both are subsets of A. We will therefore consider A1 and A2 to be equivalent, in the sense that they should be contained in the same cluster at level λ. More formally, we define a relation λ on Aλ by A1 λ A2 ⇐⇒∃A ∈Aλ s.t. A ⊃A1 ∪A2. It can be verified that λ is an equivalence relation on Aλ; see Claim 9 in Appendix B. Each equivalence class A in the quotient space Aλ/λ. consists of connected sets which should intuitively be clustered together at level λ. Naturally, we will define the clusters to be the largest elements of each class; in some sense, these are the maximally-connected components at level λ. More precisely, suppose A is such an equivalence class. It is clear that in general no single member A ∈A can contain all other members of A , since adding a null set (i.e., a set of measure zero) to A results in a larger set A′ which is nevertheless still a member of A . However, we can find a member A∗∈A which contains all but a null set of every other set in A . More formally, we say that A∗ is an essential maximum of the class A if A∗∈A and for every A ∈A , µ(A \ A∗) = 0. A∗is of course not unique, but it is unique up to a null set; i.e., for any two essential maxima A1, A2 of A , we have µ(A1 △A2) = 0. We will write the set of essential maxima of A as ess max A ; the fact that the essential maxima are well-defined is proven in Claim 10 in Appendix B. We then define clusters as the maximal members of each equivalence class in Aλ/λ: Definition 2 (Clusters). The set of clusters at level λ in W, written CW(λ), is defined to be the countable collection CW(λ) = { ess max A : A ∈Aλ/λ} . 4 Note that a cluster C of a graphon is not a subset of the unit interval per se, but rather an equivalence class of subsets which differ only by null sets. It is often possible to treat clusters as sets rather than equivalence classes, and we may write µ(C ), C ∪C ′, etc., without ambiguity. In addition, if φ : [0, 1] →[0, 1] is a measure preserving transformation, then φ−1(C ) is well-defined. For a concrete example of our notion of a cluster, consider the graphon W depicted in Figure 1a. A, B, and C represent sets of the graphon’s nodes. By our definitions there are three clusters at level λ3: A , B, and C . Clusters A and B merge into a cluster A ∪B at level λ2, while C remains a separate cluster. Everything is joined into a cluster A ∪B ∪C at level λ1. We have taken care to define the clusters of a graphon in such a way as to be robust to changes of measure zero to the graphon itself. In fact, clusters are also robust to measure preserving transformations. The proof of this result is non-trivial, and comprises Appendix C. Claim 1. Let W be a graphon and φ a measure preserving transformation. Then C is a cluster of Wφ at level λ if and only if there exists a cluster C ′ of W at level λ such that C = φ−1(C ′). Cluster trees and mergeons. The set of all clusters of a graphon at any level has hierarchical structure in the sense that, given any pair of distinct clusters C1 and C2, either one is “essentially” contained within the other, i.e., C1 ⊂C2, or C2 ⊂C1, or they are “essentially” disjoint, i.e., µ(C1 ∩ C2) = 0, as is proven by Claim 8 in Appendix B. Because of this hierarchical structure, we call the set CW of all clusters from any level of the graphon W the graphon cluster tree of W. It is this tree that we hope to recover by applying a graph clustering algorithm to a graph sampled from W. (a) Cluster tree CW of W. { { { (b) Mergeon M of CW. Figure 2 We may naturally speak of the height at which pairs of distinct clusters merge in the cluster tree. For instance, let C1 and C2 be distinct clusters of C. We say that the merge height of C1 and C2 is the level λ at which they are joined into a single cluster, i.e., max{λ : C1 ∪C2 ∈C(λ)}. However, while the merge height of clusters is well-defined, the merge height of individual points is not. This is because the cluster tree is not a collection of sets, but rather a collection of equivalence classes of sets, and so a point does not belong to any one cluster more than any other. Note that this is distinct from the classical density case considered in [12], [9], and [1], where the merge height of any pair of points is well-defined. Nevertheless, consider a measurable function M : [0, 1]2 →[0, 1] which assigns a merge height to every pair of points. While the value of M on any given pair is arbitrary, the value of M on sets of positive measure is constrained. Intuitively, if C is a cluster at level λ, then we must have M ≥λ almost everywhere on C × C . If M satisfies this constraint for every cluster C we call M a mergeon for C, as it is a graphon which determines a particular choice for the merge heights of every pair of points in [0, 1]. More formally: Definition 3 (Mergeon). Let C be a cluster tree. A mergeon1 of C is a graphon M such that for all λ ∈[0, 1], M−1[λ, 1] = ∪ C ∈CW(λ) C × C , where M−1[λ, 1] = {(x, y) ∈[0, 1]2 : M(x, y) ≥λ}. An example of a mergeon and the cluster tree it represents is shown in Figure 2. In fact, the cluster tree depicted is that of the graphon W from Figure 1a. The mergeon encodes the height at which clusters A , B, and C merge. In particular, the fact that M = λ2 everywhere on A × B represents the merging of A and B at level λ2 in W. It is clear that in general there is no unique mergeon representing a graphon cluster tree, however, the above definition implies that two mergeons representing the same cluster tree are equal almost everywhere. Additionally, we have the following two claims, whose proofs are in Appendix B. Claim 2. Let C be a cluster tree, and suppose M is a mergeon representing C. Then C ∈C(λ) if and only if C is a cluster in M at level λ. In other words, the cluster tree of M is also C. Claim 3. Let W be a graphon and M a mergeon of the cluster tree of W. If φ is a measure preserving transformation, then Mφ is a mergeon of the cluster tree of Wφ. 1The definition given here involves a slight abuse of notation. For a precise – but more technical – version, see Appendix A.2. 5 4 Notions of consistency We have so far defined the sense in which a graphon has hierarchical cluster structure. We now turn to the problem of determining whether a clustering algorithm is able to recover this structure when applied to a graph sampled from a graphon. Our approach is to define a distance between the infinite graphon cluster tree and a finite clustering. We will then define consistency by requiring that a consistent method converge to the graphon cluster tree in this distance for all inputs minus a set of vanishing probability. Merge distortion. A hierarchical clustering C of a set S – or, from now on, just a clustering of S – is hierarchical collection of subsets of S such that S ∈C and for all C,C′ ∈C, either C ⊂C′, C′ ⊂C, or C ∩C′ = ∅. Suppose C is a clustering of a finite set S consisting of graphon nodes; i.e, S ⊂[0, 1]. How might we measure the distance between this clustering and a graphon cluster tree C? Intuitively, the two trees are close if every pair of points in S merges in C at about the same level as they merge in C. But this informal description faces two problems: First, C is a collection of equivalence classes of sets, and so the height at which any pair of points merges in C is not defined. Recall, however, that the cluster tree has an alternative representation as a mergeon. A mergeon does define a merge height for every pair of nodes in a graphon, and thus provides a solution to this first issue. Second, the clustering C is not equipped with a height function, and so the height at which any pair of points merges in C is also undefined. Following [10], our approach is to induce a merge height function on the clustering using the mergeon in the following way: Definition 4 (Induced merge height). Let M be a mergeon, and suppose S is a finite subset of [0, 1]. Let C be a clustering of S . The merge height function on C induced by M is defined by ˆMC(s, s′) = minu,v∈C(s,s′) M(u, v), for every s, s′ ∈S × S , where C(s, s′) denotes the smallest cluster C ∈C which contains both s and s′. We measure the distance between a clustering C and the cluster tree C using the merge distortion: Definition 5. Let M be a mergeon, S a finite subset of [0, 1], and C a clustering of S . The merge distortion is defined by dS (M, ˆMC) = maxs,s′∈S, ss′ |M(s, s′) −ˆMC(s, s′)|. Defining the induced merge height and merge distortion in this way leads to an especially meaningful interpretation of the merge distortion. In particular, if the merge distortion between C and C is ϵ, then any two clusters of C which are separated at level λ but merge below level λ −ϵ are correctly separated in the clustering C. A similar result guarantees that a cluster in C is connected in C at within ϵ of the correct level. For a precise statement of these results, see Claim 5 in Appendix A.4. The label measure. We will use the merge distortion to measure the distance between C, a hierarchical clustering of a graph, and C, the graphon cluster tree. Recall, however, that the nodes of a graph sampled from a graphon have integer labels. That is, C is a clustering of [n], and not of a subset of [0, 1]. Hence, in order to apply the merge distortion, we must first relabel the nodes of the graph, placing them in direct correspondence to nodes of the graphon, i.e., points in [0, 1]. Recall that we sample a graph of size n from a graphon W by first drawing n points x1, . . . , xn uniformly at random from the unit interval. We then generate a graph on node set [n] by connecting nodes i and j with probability W(xi, xj). However, the nodes of the sampled graph are not labeled by x1, . . . , xn, but rather by the integers 1, . . . , n. Thus we may think of xi as being the “true” latent label of node i. In general the latent node labeling is not recoverable from data, as is demonstrated by the figure to the right. We might suppose that the graph shown is sampled from the graphon above it, and that node 1 corresponds to a, node 2 to b, node 3 to c, and node 4 to d. However, it is just as likely that node 4 corresponds to d′, and so neither labeling is more “correct”. It is clear, though, that some labelings are less likely than others. For instance, the existence of the edge (1, 2) makes it impossible that 1 corresponds to a and 2 to c, since W(a, c) is zero. Therefore, given a graph G = ([n], E) sampled from a graphon, there are many possible relabelings of G which place its nodes in correspondence with nodes of the graphon, but some are more likely than others. The merge distortion depends which labeling of G we assume, but, intuitively, a good clustering of G will have small distortion with respect to highly probable labelings, and only have large distortion on improbable labelings. Our approach is to assign a probability to every pair (G, S ) of a graph and possible labeling. We will thus be able to measure the probability mass of the set of 6 pairs for which a method performs poorly, i.e., results in a large merge distortion. More formally, let Gn denote the set of all undirected, unweighted graphs on node set [n], and let Σn be the sigma-algebra of Lebesgue-measurable subsets of [0, 1]n. A graphon W induces a unique product measure ΛW,n defined on the product sigma-algebra 2Gn × Σn such that for all G ∈2Gn and S ∈Σn: ΛW,n(G × S) = ∑ G∈G (∫ S LW(S |G) dS ) , where LW(S | G) = ∏ (i,j)∈E(G) W(xi, xj) ∏ (i,j)E(G) [ 1 −W(xi, xj) ] , where E(G) represents the edge set of the graph G. We recognize LW(S | G) as the integrand in Equation 1 for the probability of a graph as determined by a graphon. If G is fixed, integrating LW(S | G) over all S ∈[0, 1]n gives the probability of G under the model defined by W. We may now formally define our notion of consistency. First, some notation: If C is a clustering of [n] and S = (x1, . . . , xn), write C ◦S to denote the relabeling of C by S , in which i is replaced by xi in every cluster. Then if f is a hierarchical graph clustering method, f(G) ◦S is a clustering of S , and ˆM f(G)◦S denotes the merge function induced on f(G) ◦S by M. Definition 6 (Consistency). Let W be a graphon and M be a mergeon of W. A hierarchical graph clustering method f is said to be a consistent estimator of the graphon cluster tree of W if for any fixed ϵ > 0, as n →∞, ΛW,n ({ (G, S ) : dS (M, ˆM f(G)◦S ) > ϵ }) →0. The choice of mergeon for the graphon W does not affect consistency, as any two mergeons of the same graphon differ on a set of measure zero. Furthermore, consistency is with respect to the random graph model, and not to any particular graphon representing the model. The following claim, the proof of which is in Appendix B, makes this precise. Claim 4. Let W be a graphon and φ a measure preserving transformation. A clustering method f is a consistent estimator of the graphon cluster tree of W if and only if it is a consistent estimator of the graphon cluster tree of Wφ. Consistency and the blockmodel. If a graph clustering method is consistent in the sense defined above, it is also consistent in the stochastic blockmodel; i.e., it ensures strict recovery of the communities with high probability as the size of the graphs grow large. For instance, suppose W is a stochastic blockmodel graphon with α along the block-diagonal and β everywhere else. W has two clusters at level α, merging into one cluster at level β. When the merge distortion between the graphon cluster tree and a clustering is less than α −β, which will eventually be the case with high probability if the method is consistent, the two clusters are totally disjoint in C; this implication is made precise by Claim 5 in Appendix A.4. 5 Consistent algorithms We now demonstrate that consistent clustering methods exist. We present two results: First, we show that any method which is capable of consistently estimating the probability of each edge in a random graph leads to a consistent clustering method. We then analyze a modification of an existing algorithm to show that it consistently estimates edge probabilities. As a corollary, we identify a graph clustering method which satisfies our notion of consistency. Our results will be for graphons which are piecewise Lipschitz (or weakly isomorphic to a piecewise Lipschitz graphon): Definition 7 (Piecewise Lipschitz). We say that B = {B1, . . . , Bk} is a block partition if each Bi is an open, half-open, or closed interval in [0, 1] with positive measure, Bi ∩Bj is empty whenever i j, and ∪B = [0, 1]. We say that a graphon W is piecewise c-Lipschitz if there exists a set of blocks B such that for any (x, y) and (x′, y′) in Bi × Bj, |W(x, y) −W(x′, y′)| ≤c(|x −x′| + |y −y′|). Our first result concerns methods which are able to consistently estimate edge probabilities in the following sense. Let S = (x1, . . . , xn) be an ordered set of n uniform random variables drawn from the unit interval. Fix a graphon W, and let P be the random matrix whose ij entry is given by W(xi, xj). We say that P is the random edge probability matrix. Assuming that W has structure, it is possible to estimate P from a single graph sampled from W. We say that an estimator ˆP of P is consistent in max-norm if, for any ϵ > 0, limn→∞P(maxi j |Pi j −ˆPij| > ϵ) = 0. The following nontrivial theorem, whose proof comprises Appendix D, states that any estimator which is consistent in this sense leads to a consistent clustering algorithm: 7 Theorem 1. Let W be a piecewise c-Lipschitz graphon. Let ˆP be a consistent estimator of P in max-norm. Let f be the clustering method which performs single-linkage clustering using ˆP as a similarity matrix. Then f is a consistent estimator of the graphon cluster tree of W. Algorithm 1 Clustering by nbhd. smoothing Require: Adjacency matrix A, C ∈(0, 1) % Step 1: Compute the estimated edge % probability matrix ˆP using neighborhood % smoothing algorithm based on [21] n ←Size(A) h ←C √ (log n)/n for i j ∈[n] × [n] do ˆA ←A after setting row/column j to zero for i′ ∈[n] \ {i, j} do d j(i, i′) ←maxki,i′, j |( ˆA2/n)ik −( ˆA2/n)i′k| end for qi j ←hth quantile of {d j(i, i′) : i′ i, j} Nij ←{i′ i, j : dj(i, i′) ≤qi j(h)} end for for (i, j) ∈[n] × [n] do ˆPij ←1 2 ( 1 Nij ∑ i′∈Nij Ai′ j + 1 N ji ∑ j′∈Nji Ai j′ ) end for % Step 2: Cluster ˆP with single linkage C ←the single linkage clusters of ˆP return C Estimating the matrix of edge probabilities has been a direction of recent research, however we are only aware of results which show consistency in mean squared error; That is, the literature contains estimators for which 1/n2∥P−ˆP∥2 F tends to zero in probability. One practical method is the neighborhood smoothing algorithm of [21]. The method constructs for each node i in the graph G a neighborhood of nodes Ni which are similar to i in the sense that for every i′ ∈Ni, the corresponding column Ai′ of the adjacency matrix is close to Ai in a particular distance. Aij is clearly not a good estimate for the probability of the edge (i, j), as it is either zero or one, however, if the graphon is piecewise Lipschitz, the average Ai′j over i′ ∈Nij will intuitively tend to the true probability. Like others, the method of [21] is proven to be consistent in mean squared error. Since Theorem 1 requires consistency in max-norm, we analyze a slight modification of this algorithm and show that it consistently estimates P in this stronger sense. The technical details are in Appendix E. Theorem 2. If the graphon W is piecewise Lipschitz, the modified neighborhood smoothing algorithm in Appendix E is a consistent estimator of P in max-norm. As a corollary, we identify a practical graph clustering algorithm which is a consistent estimator of the graphon cluster tree. The algorithm is shown in Algorithm 1, and details are in Appendix E.2. Appendix F contains experiments in which the algorithm is applied to real and synthetic data. Corollary 1. If the graphon W is piecewise Lipschitz, Algorithm 1 is a consistent estimator of the graphon cluster tree of W. 6 Discussion We have presented a consistency framework for clustering in the graphon model and demonstrated that a practical clustering algorithm is consistent. We now identify two interesting directions of future research. First, it would be interesting to consider the extension of our framework to sparse random graphs; many real-world networks are sparse, and the graphon generates dense graphs. Recently, however, sparse models which extend the graphon have been proposed; see [7, 6]. It would be interesting to see what modifications are necessary to apply our framework in these models. Second, it would be interesting to consider alternative ways of defining the ground truth clustering of a graphon. Our construction is motivated by interpreting the graphon W not only as a random graph model, but also as a similarity function, which may not be desirable in certain settings. For example, consider a “bipartite” graphon W, which is one along the block-diagonal and zero elsewhere. The cluster tree of W consists of a single cluster at all levels, whereas the ideal bipartite clustering has two clusters. Therefore, consider applying a transformation S to W which maps it to a “similarity” graphon. The goal of clustering then becomes the recovery of the cluster tree of S (W) given a random graph sampled from W. For instance, let S : W 7→W2, where W2 is the operator square of the bipartite graphon W. The cluster tree of S (W) has two clusters at all positive levels, and so represents the desired ground truth. In general, any such transformation S leads to a different clustering goal. We speculate that, with minor modification, the framework herein can be used to prove consistency results in a wide range of graph clustering settings. Acknowledgements. This work was supported by NSF grant IIS-1550757. 8 References [1] Emmanuel Abbe, Afonso S Bandeira, and Georgina Hall. Exact recovery in the stochastic block model. IEEE Trans. Inf. Theory, 62(1):471–487, 2015. [2] Edoardo M Airoldi, Thiago B Costa, and Stanley H Chan. Stochastic blockmodel approximation of a graphon: Theory and consistent estimation. In C J C Burges, L Bottou, M Welling, Z Ghahramani, and K Q Weinberger, editors, Advances in Neural Information Processing Systems 26, pages 692–700. Curran Associates, Inc., 2013. [3] Robert B Ash and Catherine Doleans-Dade. Probability and measure theory. Academic Press, 2000. [4] Sivaraman Balakrishnan, Min Xu, Akshay Krishnamurthy, and Aarti Singh. Noise thresholds for spectral clustering. In J Shawe-Taylor, R S Zemel, P L Bartlett, F Pereira, and K Q Weinberger, editors, Advances in Neural Information Processing Systems 24, pages 954–962. Curran Associates, Inc., 2011. [5] C Borgs, J T Chayes, L Lovász, V T Sós, and K Vesztergombi. Convergent sequences of dense graphs I: Subgraph frequencies, metric properties and testing. Adv. Math., 219(6):1801–1851, 20 December 2008. [6] Christian Borgs, Jennifer T Chayes, Henry Cohn, and Nina Holden. Sparse exchangeable graphs and their limits via graphon processes. arXiv:1601.07134, 26 January 2016. [7] François Caron and Emily B Fox. Sparse graphs using exchangeable random measures. arXiv:1401.1137, 6 January 2014. [8] Stanley Chan and Edoardo Airoldi. A consistent histogram estimator for exchangeable graph models. In Proceedings of The 31st International Conference on Machine Learning, pages 208–216, 2014. [9] Kamalika Chaudhuri and Sanjoy Dasgupta. Rates of convergence for the cluster tree. In Advances in Neural Information Processing Systems, pages 343–351, 2010. [10] Justin Eldridge, Mikhail Belkin, and Yusu Wang. Beyond hartigan consistency: Merge distortion metric for hierarchical clustering. In Proceedings of The 28th Conference on Learning Theory, pages 588–606, 2015. [11] M Girvan and M E J Newman. Community structure in social and biological networks. Proc. Natl. Acad. Sci. U. S. A., 99(12):7821–7826, 11 June 2002. [12] J. A. Hartigan. Consistency of Single Linkage for High-Density Clusters. Journal of the American Statistical Association, 76(374):388–394, June 1981. ISSN 0162-1459. doi: 10.1080/01621459.1981. 10477658. [13] Svante Janson. Connectedness in graph limits. arXiv:0802.3795, 26 February 2008. [14] Samory Kpotufe and Ulrike V. Luxburg. Pruning nearest neighbor cluster trees. In Proceedings of the 28th International Conference on Machine Learning (ICML-11), pages 225–232, New York, NY, USA, 2011. ACM. [15] László Lovász. Large networks and graph limits, volume 60. American Mathematical Soc., 2012. [16] László Lovász and Balázs Szegedy. Limits of dense graph sequences. J. Combin. Theory Ser. B, 96(6): 933–957, November 2006. [17] F McSherry. Spectral partitioning of random graphs. In Foundations of Computer Science, 2001. Proceedings. 42nd IEEE Symposium on, pages 529–537, October 2001. [18] Karl Rohe, Sourav Chatterjee, and Bin Yu. Spectral clustering and the high-dimensional stochastic blockmodel. Ann. Stat., 39(4):1878–1915, August 2011. [19] I Steinwart. Adaptive density level set clustering. In Proceedings of The 24th Conference on Learning Theory, pages 703–737, 2011. [20] Patrick J Wolfe and Sofia C Olhede. Nonparametric graphon estimation. arXiv:1309.5936, 23 September 2013. [21] Yuan Zhang, Elizaveta Levina, and Ji Zhu. Estimating network edge probabilities by neighborhood smoothing. arXiv:1509.08588, 29 September 2015. 9 | 2016 | 379 |
6,304 | Image Restoration Using Very Deep Convolutional Encoder-Decoder Networks with Symmetric Skip Connections Xiao-Jiao Mao†, Chunhua Shen⋆, Yu-Bin Yang† †State Key Laboratory for Novel Software Technology, Nanjing University, China ⋆School of Computer Science, University of Adelaide, Australia Abstract In this paper, we propose a very deep fully convolutional encoding-decoding framework for image restoration such as denoising and super-resolution. The network is composed of multiple layers of convolution and deconvolution operators, learning end-to-end mappings from corrupted images to the original ones. The convolutional layers act as the feature extractor, which capture the abstraction of image contents while eliminating noises/corruptions. Deconvolutional layers are then used to recover the image details. We propose to symmetrically link convolutional and deconvolutional layers with skip-layer connections, with which the training converges much faster and attains a higher-quality local optimum. First, the skip connections allow the signal to be back-propagated to bottom layers directly, and thus tackles the problem of gradient vanishing, making training deep networks easier and achieving restoration performance gains consequently. Second, these skip connections pass image details from convolutional layers to deconvolutional layers, which is beneficial in recovering the original image. Significantly, with the large capacity, we can handle different levels of noises using a single model. Experimental results show that our network achieves better performance than recent state-of-the-art methods. 1 Introduction The task of image restoration is to recover a clean image from its corrupted observation, which is known to be an ill-posed inverse problem. By accommodating different types of corruption distributions, the same mathematical model applies to problems such as image denoising and superresolution. Recently, deep neural networks (DNNs) have shown their superior performance in image processing and computer vision tasks, ranging from high-level recognition, semantic segmentation to low-level denoising, super-resolution, deblur, inpainting and recovering raw images from compressed ones. Despite the progress that DNNs achieve, some research questions remain to be answered. For example, can a deeper network in general achieve better performance? Can we design a single deep model which is capable to handle different levels of corruptions? Observing recent superior performance of DNNs on image processing tasks, we propose a convolutional neural network (CNN)-based framework for image restoration. We observe that in order to obtain good restoration performance, it is beneficial to train a very deep model. Meanwhile, we show that it is possible to achieve very promising performance with a single network when processing multiple different levels of corruptions due to the benefits of large-capacity networks. Specifically, the proposed framework learns end-to-end fully convolutional mappings from corrupted images to the clean ones. The network is composed of multiple layers of convolution and deconvolution operators. As deeper networks tend to be more difficult to train, we propose to symmetrically link convolutional 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. and deconvolutional layers with skip-layer connections, with which the training procedure converges much faster and is more likely to attain a high-quality local optimum. Our main contributions are summarized as follows. • A very deep network architecture, which consists of a chain of symmetric convolutional and deconvolutional layers, for image restoration is proposed in this paper. The convolutional layers act as the feature extractor which encode the primary components of image contents while eliminating the corruption. The deconvolutional layers then decode the image abstraction to recover the image content details. • We propose to add skip connections between corresponding convolutional and deconvolutional layers. These skip connections help to back-propagate the gradients to bottom layers and pass image details to top layers, making training of the end-to-end mapping easier and more effective, and thus achieving performance improvement while the network going deeper. Relying on the large capacity and fitting ability of our very deep network, we also propose to handle different level of noises/corruption using a single model. • Experimental results demonstrate the advantages of our network over other recent stateof-the-art methods on image denoising and super-resolution, setting new records on these topics.1 Related work Extensive work has been done on image restoration in the literature. See detail reviews in a survey [21]. Traditional methods such as Total variation [24, 23], BM3D algorithm [5] and dictionary learning based methods [31, 10, 2] have shown very good performance on image restoration topics such as image denoising and super-resolution. Since image restoration is in general an ill-posed problem, the use of regularization [34, 9] has been proved to be essential. An active and probably more promising category for image restoration is the DNN based methods. Stacked denoising auto-encoder [29] is one of the most well-known DNN models which can be used for image restoration. Xie et al. [32] combined sparse coding and DNN pre-trained with denoising auto-encoder for low-level vision tasks such as image denoising and inpainting. Other neural networks based methods such as multi-layer perceptron [1] and CNN [15] for image denoising, as well as DNN for image or video super-resolution [4, 30, 7, 14] and compression artifacts reduction [6] have been actively studied in these years. Burger et al. [1] presented a patch-based algorithm learned with a plain multi-layer perceptron. They also concluded that with large networks, large training data, neural networks can achieve state-of-the-art image denoising performance. Jain and Seung [15] proposed a fully convolutional CNN for denoising. They found that CNNs provide comparable or even superior performance to wavelet and Markov Random Field (MRF) methods. Cui et al. [4] employed non-local self-similarity (NLSS) search on the input image in multi-scale, and then used collaborative local auto-encoder for super-resolution in a layer by layer fashion. Dong et al. [7] proposed to directly learn an end-to-end mapping between the low/high-resolution images. Wang et al. [30] argued that domain expertise represented by the conventional sparse coding can be combined to achieve further improved results. An advantage of DNN methods is that these methods are purely data driven and no assumptions about the noise distributions are made. 2 Very deep RED-Net for Image Restoration The proposed framework mainly contains a chain of convolutional layers and symmetric deconvolutional layers, as shown in Figure 1. We term our method “RED-Net”—very deep Residual Encoder-Decoder Networks. 2.1 Architecture The framework is fully convolutional and deconvolutional. Rectification layers are added after each convolution and deconvolution. The convolutional layers act as feature extractor, which preserve the primary components of objects in the image and meanwhile eliminating the corruptions. The deconvolutional layers are then combined to recover the details of image contents. The output of the deconvolutional layers is the “clean” version of the input image. Moreover, skip connections 1We have released the evaluation code at https://bitbucket.org/chhshen/image-denoising/ 2 Figure 1: The overall architecture of our proposed network. The network contains layers of symmetric convolution (encoder) and deconvolution (decoder). Skip-layer connections are connected every a few (in our experiments, two) layers. are also added from a convolutional layer to its corresponding mirrored deconvolutional layer. The convolutional feature maps are passed to and summed with the deconvolutional feature maps elementwise, and passed to the next layer after rectification. For low-level image restoration problems, we prefer using neither pooling nor unpooling in the network as usually pooling discards useful image details that are essential for these tasks. Motivated by the VGG model [27], the kernel size for convolution and deconvolution is set to 3×3, which has shown excellent image recognition performance. It is worth mentioning that the size of input image can be arbitrary since our network is essentially a pixel-wise prediction. The input and output of the network are images of the same size w × h × c, where w, h and c are width, height and number of channels. In this paper, we use c = 1 although it is straightforward to apply to images with c > 1. We found that using 64 feature maps for convolutional and deconvolutional layers achieves satisfactory results, although more feature maps leads to slightly better performance. Deriving from the above architecture, in this work we mainly conduct experiments with two networks, which are 20-layer and 30-layer respectively. 2.1.1 Deconvolution decoder Architectures combining layers of convolution and deconvolution [22, 12] have been proposed for semantic segmentation lately. In contrast to convolutional layers, in which multiple input activations within a filter window are fused to output a single activation, deconvolutional layers associate a single input activation with multiple outputs. Deconvolution is usually used as learnable up-sampling layers. One can simply replace deconvolution with convolution, which results in an architecture that is very similar to recently proposed very deep fully convolutional neural networks [19, 7]. However, there exist differences between a fully convolution model and our model. First, in the fully convolution case, the noise is eliminated step by step, i.e., the noise level is reduced after each layer. During this process, the details of the image content may be lost. Nevertheless, in our network, convolution preserves the primary image content. Then deconvolution is used to compensate the details. We compare the 5-layer and 10-layer fully convolutional network with our network (combining convolution and deconvolution, but without skip connection). For fully convolutional networks, we use padding and up-sample the input to make the input and output the same size. For our network, the first 5 layers are convolutional and the second 5 layers are deconvolutional. All the other parameters for training are the same. In terms of Peak Signal-to-Noise Ratio (PSNR), using deconvolution works slightly better than the fully convolutional counterpart. On the other hand, to apply deep learning models on devices with limited computing power such as mobile phones, one has to speed-up the testing phase. In this situation, we propose to use downsampling in convolutional layers to reduce the size of the feature maps. In order to obtain an output of the same size as the input, deconvolution is used to up-sample the feature maps in the symmetric deconvolutional layers. We experimentally found that the testing efficiency can be well improved with almost negligible performance degradation. 3 Figure 2: An example of a building block in the proposed framework. For ease of visualization, only two skip connections are shown in this example, and the ones in layers represented by fk are omitted. 2.1.2 Skip connections An intuitive question is that, is deconvolution able to recover image details from the image abstraction only? We find that in shallow networks with only a few layers of convolution, deconvolution is able to recover the details. However, when the network goes deeper or using operations such as max pooling, deconvolution does not work so well, possibly because too much image detail is already lost in the convolution. The second question is that, when our network goes deeper, does it achieve performance gain? We observe that deeper networks often suffer from gradient vanishing and become hard to train—a problem that is well addressed in the literature. To address the above two problems, inspired by highway networks [28] and deep residual networks [11], we add skip connections between two corresponding convolutional and deconvolutional layers as shown in Figure 1. A building block is shown in Figure 2. There are two reasons for using such connections. First, when the network goes deeper, as mentioned above, image details can be lost, making deconvolution weaker in recovering them. However, the feature maps passed by skip connections carry much image detail, which helps deconvolution to recover a better clean image. Second, the skip connections also achieve benefits on back-propagating the gradient to bottom layers, which makes training deeper network much easier as observed in [28] and [11]. Note that our skip layer connections are very different from the ones proposed in [28] and [11], where the only concern is on the optimization side. In our case, we want to pass information of the convolutional feature maps to the corresponding deconvolutional layers. Instead of directly learning the mappings from input X to the output Y , we would like the network to fit the residual [11] of the problem, which is denoted as F(X) = Y −X. Such a learning strategy is applied to inner blocks of the encoding-decoding network to make training more effective. Skip connections are passed every two convolutional layers to their mirrored deconvolutional layers. Other configurations are possible and our experiments show that this configuration already works very well. Using such skip connections makes the network easier to be trained and gains restoration performance via increasing network depth. The very deep highway networks [28] are essentially feed-forward long short-term memory (LSTMs) with forget gates, and the CNN layers of deep residual network [11] are feed-forward LSTMs without gates. Note that our deep residual networks are in general not in the format of standard feed-forward LSTMs. 2.2 Discussions Training with symmetric skip connections As mentioned above, using skip connections mainly has two benefits: (1) passing image detail forwardly, which helps to recover clean images and (2) passing gradient backwardly, which helps to find better local minimum. We design experiments to show these observations. We first compare two networks trained for denoising noises of σ = 70. In the first network, we use 5 layers of 3×3 convolution with stride 3. The input size of training data is 243×243, which results in a vector after 5 layers of convolution. Then deconvolution is used to recover the input. The second network uses the same settings as the first one, except for adding skip connections. The results are show in Figure 3(a). We can observe that it is hard for deconvolution to recover details from only a vector encoding the abstraction of the input, which shows that the ability on recovering image details for deconvolution is limited. However, if we use skip connections, the network can still recover the input, because details are passed from top layers by skip connections. We also train five networks to show that using skip connections help to back-propagate gradient in training to better fit the end-to-end mapping, as shown in Figure 3(b). The five networks are: 10, 20 and 30 layer networks without skip connections, and 20, 30 layer networks with skip connections. 4 (a) (b) (c) Figure 3: Analysis on skip connections: (a) Recovering image details using deconvolution and skip connections; (b) The training loss during training; (c) Comparisons of skip connection types in [11] and our model, where “Block-i-RED” is the connections in our model with block size i and “Block-i-He et al.” is the connections in He et al. [11] with block size i. PSNR values at the last iteration for the curves are: 25.08, 24.59, 25.30 and 25.21. As we can see, the training loss increases when the network going deeper without skip connections (similar phenomenon is also observed in [11]), but we obtain a lower loss value when using them. Comparison with deep residual networks [11] One may use different types of skip connections in our network, a straightforward alternate is that in [11]. In [11], the skip connections are added to divide the network into sequential blocks. A benefit of our model is that our skip connections have element-wise correspondence, which can be very important in pixel-wise prediction problems. We carry out experiments to compare the two types of skip connections. Here the block size indicates the span of the connections. The results are shown in Figure 3(c). We can observe that our connections often converge to a better optimum, demonstrating that element-wise correspondence can be important. Dealing with different levels of noises/corruption An important question is that, can we handle different levels of corruption with a single model? Almost all existing methods need to train different models for different levels of corruptions. Typically these methods need to estimate the corruption level at first. We use a trained model in [1], to denoise different levels of noises with σ being 10, 30, 50 and 70. The obtained average PSNR on the 14 images are 29.95dB, 27.81dB, 18.62dB and 14.84dB, respectively. The results show that the parameters trained on a single noise level cannot handle different levels of noises well. Therefore, in this paper, we aim to train a single model for recovering different levels of corruption, which are different noise levels in the task of image denoising and different scaling parameters in image super-resolution. The large capacity of the network is the key to this success. 2.3 Training Learning the end-to-end mapping from corrupted images to clean ones needs to estimate the weights Θ represented by the convolutional and deconvolutional kernels. This is achieved by minimizing the Euclidean loss between the outputs of the network and the clean image. In specific, given a collection of N training sample pairs Xi, Yi, where Xi is a corrupted image and Yi is the clean version as the ground-truth. We minimize the following Mean Squared Error (MSE): L(Θ) = 1 N N X i=1 ∥F(Xi; Θ) −Yi∥2 F . (1) We implement and train our network using Caffe [16]. In practice, we find that using Adam [17] with learning rate 10−4 for training converges faster than using traditional stochastic gradient descent (SGD). The base learning rate for all layers are the same, different from [7, 15], in which a smaller learning rate is set for the last layer. This trick is not necessary in our network. Following general settings in the literature, we use gray-scale image for denoising and the luminance channel for super-resolution in this paper. 300 images from the Berkeley Segmentation Dataset (BSD) [20] are used to generate the training set. For each image, patches of size 50×50 are sampled 5 as ground-truth. For denoising, we add additive Gaussian noise to the patches multiple times to generate a large training set (about 0.5M). For super-resolution, we first down-sample a patch and then up-sample it to its original size, obtaining a low-resolution version as the input of the network. 2.4 Testing Although trained on local patches, our network can perform denoising and super-resolution on images of arbitrary size. Given a testing image, one can simply go forward through the network, which is able to obtain a better performance than existing methods. To achieve smoother results, we propose to process a corrupted image on multiple orientations. Different from segmentation, the filter kernels in our network only eliminate the corruptions, which is not sensitive to the orientation of image contents. Therefore, we can rotate and mirror flip the kernels and perform forward multiple times, and then average the output to obtain a smoother image. We see that this can lead to slightly better denoising and super-resolution performance. 3 Experiments In this section, we provide evaluation of denoising and super-resolution performance of our models against a few existing state-of-the-art methods. Denoising experiments are performed on two datasets: 14 common benchmark images [33, 3, 18, 9] and the BSD200 dataset. We test additive Gaussian noises with zero mean and standard deviation σ = 10, 30, 50 and 70 respectively. BM3D [5], NCSR [8], EPLL [34], PCLR [3], PDPD [33] and WMMN [9] are compared with our method. For super-resolution, we compare our network with SRCNN [7], NBSRF [25], CSCN [30], CSC [10], TSE [13] and ARFL+ [26] on three datasets: Set5, Set14 and BSD100. The scaling parameter is tested with 2, 3 and 4. Peak Signal-to-Noise Ratio (PSNR) and Structural SIMilarity (SSIM) index are calculated for evaluation. For our method, which is denoted as RED-Net, we implement three versions: RED10 contains 5 convolutional and deconvolutional layers without skip connections, RED20 contains 10 convolutional and deconvolutional layers with skip connections, and RED30 contains 15 convolutional and deconvolutional layers with skip connections. 3.1 Image Denoising Evaluation on the 14 images Table 1 presents the PSNR and SSIM results of σ 10, 30, 50, and 70. We can make some observations from the results. First of all, the 10 layer convolutional and deconvolutional network has already achieved better results than the state-of-the-art methods, which demonstrates that combining convolution and deconvolution for denoising works well, even without any skip connections. Moreover, when the network goes deeper, the skip connections proposed in this paper help to achieve even better denoising performance, which exceeds the existing best method WNNM [9] by 0.32dB, 0.43dB, 0.49dB and 0.51dB on noise levels of σ being 10, 30, 50 and 70 respectively. While WNNM is only slightly better than the second best existing method PCLR [3] by 0.01dB, 0.06dB, 0.03dB and 0.01dB respectively, which shows the large improvement of our model. Last, we can observe that the more complex the noise is, the more improvement our model achieves than other methods. Similar observations can be made on the evaluation of SSIM. Table 1: Average PSNR and SSIM results of σ 10, 30, 50, 70 for the 14 images. PSNR BM3D EPLL NCSR PCLR PGPD WNNM RED10 RED20 RED30 σ = 10 34.18 33.98 34.27 34.48 34.22 34.49 34.62 34.74 34.81 σ = 30 28.49 28.35 28.44 28.68 28.55 28.74 28.95 29.10 29.17 σ = 50 26.08 25.97 25.93 26.29 26.19 26.32 26.51 26.72 26.81 σ = 70 24.65 24.47 24.36 24.79 24.71 24.80 24.97 25.23 25.31 SSIM σ = 10 0.9339 0.9332 0.9342 0.9366 0.9309 0.9363 0.9374 0.9392 0.9402 σ = 30 0.8204 0.8200 0.8203 0.8263 0.8199 0.8273 0.8327 0.8396 0.8423 σ = 50 0.7427 0.7354 0.7415 0.7538 0.7442 0.7517 0.7571 0.7689 0.7733 σ = 70 0.6882 0.6712 0.6871 0.6997 0.6913 0.6975 0.7012 0.7177 0.7206 6 Evaluation on BSD200 For testing efficiency, we convert the images to gray-scale and resize them to smaller ones on BSD-200. Then all the methods are run on these images to get average PSNR and SSIM results of σ 10, 30, 50, and 70, as shown in Table 2. For existing methods, their denoising performance does not differ much, while our model achieves 0.38dB, 0.47dB, 0.49dB and 0.42dB higher of PSNR over WNNM. Table 2: Average PSNR and SSIM results of σ 10, 30, 50, 70 on 200 images from BSD. PSNR BM3D EPLL NCSR PCLR PGPD WNNM RED10 RED20 RED30 σ = 10 33.01 33.01 33.09 33.30 33.02 33.25 33.49 33.59 33.63 σ = 30 27.31 27.38 27.23 27.54 27.33 27.48 27.79 27.90 27.95 σ = 50 25.06 25.17 24.95 25.30 25.18 25.26 25.54 25.67 25.75 σ = 70 23.82 23.81 23.58 23.94 23.89 23.95 24.13 24.33 24.37 SSIM σ = 10 0.9218 0.9255 0.9226 0.9261 0.9176 0.9244 0.9290 0.9310 0.9319 σ = 30 0.7755 0.7825 0.7738 0.7827 0.7717 0.7807 0.7918 0.7993 0.8019 σ = 50 0.6831 0.6870 0.6777 0.6947 0.6841 0.6928 0.7032 0.7117 0.7167 σ = 70 0.6240 0.6168 0.6166 0.6336 0.6245 0.6346 0.6367 0.6521 0.6551 3.2 Image super-resolution The evaluation on Set5 is shown in Table 3. Our 10-layer network outperforms the compared methods already, and we achieve even better performance with deeper networks. The 30-layer network exceeds the second best method CSCN by 0.52dB, 0.56dB and 0.47dB on scales 2, 3 and 4 respectively. The evaluation on Set14 is shown in Table 4. The improvement on Set14 in not as significant as that on Set5, but we can still observe that the 30 layer network achieves higher PSNR than the second best CSCN by 0.23dB, 0.06dB and 0.1dB. The results on BSD100, as shown in Table 5, are similar to those on Set5. The second best method is still CSCN, the performance of which is worse than that of our 10 layer network. Our deeper network obtains much more performance gain than the others. Table 3: Average PSNR and SSIM results on Set5. PSNR SRCNN NBSRF CSCN CSC TSE ARFL+ RED10 RED20 RED30 s = 2 36.66 36.76 37.14 36.62 36.50 36.89 37.43 37.62 37.66 s = 3 32.75 32.75 33.26 32.66 32.62 32.72 33.43 33.80 33.82 s = 4 30.49 30.44 31.04 30.36 30.33 30.35 31.12 31.40 31.51 SSIM s = 2 0.9542 0.9552 0.9567 0.9549 0.9537 0.9559 0.9590 0.9597 0.9599 s = 3 0.9090 0.9104 0.9167 0.9098 0.9094 0.9094 0.9197 0.9229 0.9230 s = 4 0.8628 0.8632 0.8775 0.8607 0.8623 0.8583 0.8794 0.8847 0.8869 Table 4: Average PSNR and SSIM results on Set14. PSNR SRCNN NBSRF CSCN CSC TSE ARFL+ RED10 RED20 RED30 s = 2 32.45 32.45 32.71 32.31 32.23 32.52 32.77 32.87 32.94 s = 3 29.30 29.25 29.55 29.15 29.16 29.23 29.42 29.61 29.61 s = 4 27.50 27.42 27.76 27.30 27.40 27.41 27.58 27.80 27.86 SSIM s = 2 0.9067 0.9071 0.9095 0.9070 0.9036 0.9074 0.9125 0.9138 0.9144 s = 3 0.8215 0.8212 0.8271 0.8208 0.8197 0.8201 0.8318 0.8343 0.8341 s = 4 0.7513 0.7511 0.7620 0.7499 0.7518 0.7483 0.7654 0.7697 0.7718 3.3 Evaluation using a single model To construct the training set, we extract image patches with different noise levels and scaling parameters for denoising and super-resolution. Then a 30-layer network is trained for the two tasks respectively. The evaluation results are shown in Table 6 and Table 7. Although training with different levels of corruption, we can observe that the performance of our network only slightly degrades 7 Table 5: Average PSNR and SSIM results on BSD100 for super-resolution. PSNR SRCNN NBSRF CSCN CSC TSE ARFL+ RED10 RED20 RED30 s = 2 31.36 31.30 31.54 31.27 31.18 31.35 31.85 31.95 31.99 s = 3 28.41 28.36 28.58 28.31 28.30 28.36 28.79 28.90 28.93 s = 4 26.90 26.88 27.11 26.83 26.85 26.86 27.25 27.35 27.40 SSIM s = 2 0.8879 0.8876 0.8908 0.8876 0.8855 0.8885 0.8953 0.8969 0.8974 s = 3 0.7863 0.7856 0.7910 0.7853 0.7843 0.7851 0.7975 0.7993 0.7994 s = 4 0.7103 0.7110 0.7191 0.7101 0.7108 0.7091 0.7238 0.7268 0.7290 comparing to the case in which using separate models for denoising and super-resolution. This may due to the fact that the network has to fit much more complex mappings. Except that CSCN works slightly better on Set14 super-resolution with scales 3 and 4, our network still beats the existing methods, showing that our network works much better in image denoising and super-resolution even using only one single model to deal with complex corruption. Table 6: Average PSNR and SSIM results for image denoising using a single 30-layer network. 14 images BSD200 σ = 10 σ = 30 σ = 50 σ = 70 σ = 10 σ = 30 σ = 50 σ = 70 PSNR 34.49 29.09 26.75 25.20 33.38 27.88 25.69 24.36 SSIM 0.9368 0.8414 0.7716 0.7157 0.9280 0.7980 0.7119 0.6544 Table 7: Average PSNR and SSIM results for image super-resolution using a single 30-layer network. Set5 Set14 BSD100 s = 2 s = 3 s = 4 s = 2 s = 3 s = 4 s = 2 s = 3 s = 4 PSNR 37.56 33.70 31.33 32.81 29.50 27.72 31.96 28.88 27.35 SSIM 0.9595 0.9222 0.8847 0.9135 0.8334 0.7698 0.8972 0.7993 0.7276 4 Conclusions In this paper we have proposed a deep encoding and decoding framework for image restoration. Convolution and deconvolution are combined, modeling the restoration problem by extracting primary image content and recovering details. More importantly, we propose to use skip connections, which helps on recovering clean images and tackles the optimization difficulty caused by gradient vanishing, and thus obtains performance gains when the network goes deeper. Experimental results and our analysis show that our network achieves better performance than state-of-the-art methods on image denoising and super-resolution. This work was in part supported by Natural Science Foundation of China (Grants 61673204, 61273257, 61321491), Program for Distinguished Talents of Jiangsu Province, China (Grant 2013XXRJ-018), Fundamental Research Funds for the Central Universities (Grant 020214380026), and Australian Research Council Future Fellowship (FT120100969). X.-J. Mao’s contribution was made when visiting University of Adelaide. His visit was supported by the joint PhD program of China Scholarship Council. References [1] H. C. Burger, C. J. Schuler, and S. Harmeling. Image denoising: Can plain neural networks compete with BM3D? In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 2392–2399, 2012. [2] P. Chatterjee and P. Milanfar. Clustering-based denoising with locally learned dictionaries. IEEE Trans. Image Process., 18(7):1438–1451, 2009. [3] F. Chen, L. Zhang, and H. Yu. External patch prior guided internal clustering for image denoising. In Proc. IEEE Int. Conf. Comp. Vis., pages 603–611, 2015. [4] Z. Cui, H. Chang, S. Shan, B. Zhong, and X. Chen. Deep network cascade for image super-resolution. In Proc. Eur. Conf. Comp. Vis., pages 49–64, 2014. [5] K. Dabov, A. Foi, V. Katkovnik, and K. O. Egiazarian. Image denoising by sparse 3-d transform-domain collaborative filtering. IEEE Trans. Image Process., 16(8):2080–2095, 2007. 8 [6] C. Dong, Y. Deng, C. C. Loy, and X. Tang. Compression artifacts reduction by a deep convolutional network. In Proc. IEEE Int. Conf. Comp. Vis., pages 576–584, 2015. [7] C. Dong, C. C. Loy, K. He, and X. Tang. Image super-resolution using deep convolutional networks. IEEE Trans. Pattern Anal. Mach. Intell., 38(2):295–307, 2016. [8] W. Dong, L. Zhang, G. Shi, and X. Li. Nonlocally centralized sparse representation for image restoration. IEEE Trans. Image Process., 22(4):1620–1630, 2013. [9] S. Gu, L. Zhang, W. Zuo, and X. Feng. Weighted nuclear norm minimization with application to image denoising. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 2862–2869, 2014. [10] S. Gu, W. Zuo, Q. Xie, D. Meng, X. Feng, and L. Zhang. Convolutional sparse coding for image super-resolution. In Proc. IEEE Int. Conf. Comp. Vis., pages 1823–1831, 2015. [11] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., volume abs/1512.03385, 2016. [12] S. Hong, H. Noh, and B. Han. Decoupled deep neural network for semi-supervised semantic segmentation. In Proc. Advances in Neural Inf. Process. Syst., 2015. [13] J. Huang, A. Singh, and N. Ahuja. Single image super-resolution from transformed self-exemplars. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 5197–5206, 2015. [14] Y. Huang, W. Wang, and L. Wang. Bidirectional recurrent convolutional networks for multi-frame super-resolution. In Proc. Advances in Neural Inf. Process. Syst., pages 235–243, 2015. [15] V. Jain and H. S. Seung. Natural image denoising with convolutional networks. In Proc. Advances in Neural Inf. Process. Syst., pages 769–776, 2008. [16] 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. [17] D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. In Proc. Int. Conf. Learn. Representations, 2015. [18] H. Liu, R. Xiong, J. Zhang, and W. Gao. Image denoising via adaptive soft-thresholding based on non-local samples. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 484–492, 2015. [19] J. Long, E. Shelhamer, and T. Darrell. Fully convolutional networks for semantic segmentation. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 3431–3440, 2015. [20] D. Martin, C. Fowlkes, D. Tal, and J. Malik. A database of human segmented natural images and its application to evaluating segmentation algorithms and measuring ecological statistics. In Proc. IEEE Int. Conf. Comp. Vis., volume 2, pages 416–423, July 2001. [21] P. Milanfar. A tour of modern image filtering: New insights and methods, both practical and theoretical. IEEE Signal Process. Mag., 30(1):106–128, 2013. [22] H. Noh, S. Hong, and B. Han. Learning deconvolution network for semantic segmentation. In Proc. IEEE Int. Conf. Comp. Vis., pages 1520–1528, 2015. [23] S. Osher, M. Burger, D. Goldfarb, J. Xu, and W. Yin. An iterative regularization method for total variation-based image restoration. Multiscale Modeling & Simulation, 4(2):460–489, 2005. [24] L. I. Rudin, S. Osher, and E. Fatemi. Nonlinear total variation based noise removal algorithms. Phys. D, 60(1-4):259–268, November 1992. [25] J. Salvador and E. Perez-Pellitero. Naive bayes super-resolution forest. In Proc. IEEE Int. Conf. Comp. Vis., pages 325–333, 2015. [26] S. Schulter, C. Leistner, and H. Bischof. Fast and accurate image upscaling with super-resolution forests. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 3791–3799, 2015. [27] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. In Proc. Int. Conf. Learn. Representations, 2015. [28] R. K. Srivastava, K. Greff, and J. Schmidhuber. Training very deep networks. In Proc. Advances in Neural Inf. Process. Syst., pages 2377–2385, 2015. [29] P. Vincent, H. Larochelle, Y. Bengio, and P. Manzagol. Extracting and composing robust features with denoising autoencoders. In Proc. Int. Conf. Mach. Learn., pages 1096–1103, 2008. [30] Z. Wang, D. Liu, J. Yang, W. Han, and T. S. Huang. Deep networks for image super-resolution with sparse prior. In Proc. IEEE Int. Conf. Comp. Vis., pages 370–378, 2015. [31] Z. Wang, Y. Yang, Z. Wang, S. Chang, J. Yang, and T. S. Huang. Learning super-resolution jointly from external and internal examples. IEEE Trans. Image Process., 24(11):4359–4371, 2015. [32] J. Xie, L. Xu, and E. Chen. Image denoising and inpainting with deep neural networks. In Proc. Advances in Neural Inf. Process. Syst., pages 350–358, 2012. [33] J. Xu, L. Zhang, W. Zuo, D. Zhang, and X. Feng. Patch group based nonlocal self-similarity prior learning for image denoising. In Proc. IEEE Int. Conf. Comp. Vis., pages 244–252, 2015. [34] D. Zoran and Y. Weiss. From learning models of natural image patches to whole image restoration. In Proc. IEEE Int. Conf. Comp. Vis., pages 479–486, 2011. 9 | 2016 | 38 |
6,305 | Man is to Computer Programmer as Woman is to Homemaker? Debiasing Word Embeddings Tolga Bolukbasi1, Kai-Wei Chang2, James Zou2, Venkatesh Saligrama1,2, Adam Kalai2 1Boston University, 8 Saint Mary’s Street, Boston, MA 2Microsoft Research New England, 1 Memorial Drive, Cambridge, MA tolgab@bu.edu, kw@kwchang.net, jamesyzou@gmail.com, srv@bu.edu, adam.kalai@microsoft.com Abstract The blind application of machine learning runs the risk of amplifying biases present in data. Such a danger is facing us with word embedding, a popular framework to represent text data as vectors which has been used in many machine learning and natural language processing tasks. We show that even word embeddings trained on Google News articles exhibit female/male gender stereotypes to a disturbing extent. This raises concerns because their widespread use, as we describe, often tends to amplify these biases. Geometrically, gender bias is first shown to be captured by a direction in the word embedding. Second, gender neutral words are shown to be linearly separable from gender definition words in the word embedding. Using these properties, we provide a methodology for modifying an embedding to remove gender stereotypes, such as the association between the words receptionist and female, while maintaining desired associations such as between the words queen and female. Using crowd-worker evaluation as well as standard benchmarks, we empirically demonstrate that our algorithms significantly reduce gender bias in embeddings while preserving the its useful properties such as the ability to cluster related concepts and to solve analogy tasks. The resulting embeddings can be used in applications without amplifying gender bias. 1 Introduction Research on word embeddings has drawn significant interest in machine learning and natural language processing. There have been hundreds of papers written about word embeddings and their applications, from Web search [22] to parsing Curriculum Vitae [12]. However, none of these papers have recognized how blatantly sexist the embeddings are and hence risk introducing biases of various types into real-world systems. A word embedding, trained on word co-occurrence in text corpora, represents each word (or common phrase) w as a d-dimensional word vector ~w 2 Rd. It serves as a dictionary of sorts for computer programs that would like to use word meaning. First, words with similar semantic meanings tend to have vectors that are close together. Second, the vector differences between words in embeddings have been shown to represent relationships between words [27, 21]. For example given an analogy puzzle, “man is to king as woman is to x” (denoted as man:king :: woman:x), simple arithmetic of the embedding vectors finds that x=queen is the best answer because −−! man −−−−−! woman ⇡−−! king −−−−! queen. Similarly, x=Japan is returned for Paris:France :: Tokyo:x. It is surprising that a simple vector arithmetic can simultaneously capture a variety of relationships. It has also excited practitioners because such a tool could be useful across applications involving natural language. Indeed, they are being studied and used in a variety of downstream applications (e.g., document ranking [22], sentiment analysis [14], and question retrieval [17]). However, the embeddings also pinpoint sexism implicit in text. For instance, it is also the case that: −−! man −−−−−! woman ⇡−−−−−−−−−−−−−−−! computer programmer −−−−−−−−! homemaker. In other words, the same system that solved the above reasonable analogies will offensively answer “man is to computer programmer as woman is to x” with x=homemaker. Similarly, it outputs that a 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Extreme she 1. homemaker 2. nurse 3. receptionist 4. librarian 5. socialite 6. hairdresser 7. nanny 8. bookkeeper 9. stylist 10. housekeeper Extreme he 1. maestro 2. skipper 3. protege 4. philosopher 5. captain 6. architect 7. financier 8. warrior 9. broadcaster 10. magician Gender stereotype she-he analogies sewing-carpentry registered nurse-physician housewife-shopkeeper nurse-surgeon interior designer-architect softball-baseball blond-burly feminism-conservatism cosmetics-pharmaceuticals giggle-chuckle vocalist-guitarist petite-lanky sassy-snappy diva-superstar charming-affable volleyball-football cupcakes-pizzas lovely-brilliant Gender appropriate she-he analogies queen-king sister-brother mother-father waitress-waiter ovarian cancer-prostate cancer convent-monastery Figure 1: Left The most extreme occupations as projected on to the she−he gender direction on w2vNEWS. Occupations such as businesswoman, where gender is suggested by the orthography, were excluded. Right Automatically generated analogies for the pair she-he using the procedure described in text. Each automatically generated analogy is evaluated by 10 crowd-workers to whether or not it reflects gender stereotype. father is to a doctor as a mother is to a nurse. The primary embedding studied in this paper is the popular publicly-available word2vec [19, 20] 300 dimensional embedding trained on a corpus of Google News texts consisting of 3 million English words, which we refer to here as the w2vNEWS. One might have hoped that the Google News embedding would exhibit little gender bias because many of its authors are professional journalists. We also analyze other publicly available embeddings trained via other algorithms and find similar biases (Appendix B). In this paper, we quantitatively demonstrate that word-embeddings contain biases in their geometry that reflect gender stereotypes present in broader society.1 Due to their wide-spread usage as basic features, word embeddings not only reflect such stereotypes but can also amplify them. This poses a significant risk and challenge for machine learning and its applications. The analogies generated from these embeddings spell out the bias implicit in the data on which they were trained. Hence, word embeddings may serve as a means to extract implicit gender associations from a large text corpus similar to how Implicit Association Tests [11] detect automatic gender associations possessed by people, which often do not align with self reports. To quantify bias, we will compare a word vector to the vectors of a pair of gender-specific words. For instance, the fact that −−−! nurse is close to −−−−! woman is not in itself necessarily biased(it is also somewhat close to −−! man – all are humans), but the fact that these distances are unequal suggests bias. To make this rigorous, consider the distinction between gender specific words that are associated with a gender by definition, and the remaining gender neutral words. Standard examples of gender specific words include brother, sister, businessman and businesswoman. We will use the gender specific words to learn a gender subspace in the embedding, and our debiasing algorithm removes the bias only from the gender neutral words while respecting the definitions of these gender specific words. We propose approaches to reduce gender biases in the word embedding while preserving the useful properties of the embedding. Surprisingly, not only does the embedding capture bias, but it also contains sufficient information to reduce this bias.We will leverage the fact that there exists a low dimensional subspace in the embedding that empirically captures much of the gender bias. 2 Related work and Preliminary Gender bias and stereotype in English. It is important to quantify and understand bias in languages as such biases can reinforce the psychological status of different groups [28]. Gender bias in language has been studied over a number of decades in a variety of contexts (see, e.g., [13]) and we only highlight some of the findings here. Biases differ across people though commonalities can be detected. Implicit Association Tests [11] have uncovered gender-word biases that people do not self-report and may not even be aware of. Common biases link female terms with liberal arts and family and male terms with science and careers [23]. Bias is seen in word morphology, i.e., the fact that words such as 1 Stereotypes are biases that are widely held among a group of people. We show that the biases in the word embedding are in fact closely aligned with social conception of gender stereotype, as evaluated by U.S.-based crowd workers on Amazon’s Mechanical Turk. The crowd agreed that the biases reflected both in the location of vectors (e.g. −−−! doctor closer to −−! man than to −−−−! woman) as well as in analogies (e.g., he:coward :: she:whore.) exhibit common gender stereotypes. 2 actor are, by default, associated with the dominant class [15], and female versions of these words, e.g., actress, are marked. There is also an imbalance in the number of words with F-M with various associations. For instance, while there are more words referring to males, there are many more words that sexualize females than males [30]. Consistent biases have been studied within online contexts and specifically related to the contexts we study such as online news (e.g., [26]), Web search (e.g., [16]), and Wikipedia (e.g., [34]). Bias within algorithms. A number of online systems have been shown to exhibit various biases, such as racial discrimination and gender bias in the ads presented to users [31, 4]. A recent study found that algorithms used to predict repeat offenders exhibit indirect racial biases [1]. Different demographic and geographic groups also use different dialects and word-choices in social media [6]. An implication of this effect is that language used by minority group might not be able to be processed by natural language tools that are trained on “standard” data-sets. Biases in the curation of machine learning data-sets have explored in [32, 3]. Independent from our work, Schmidt [29] identified the bias present in word embeddings and proposed debiasing by entirely removing multiple gender dimensions, one for each gender pair. His goal and approach, similar but simpler than ours, was to entirely remove gender from the embedding. There is also an intense research agenda focused on improving the quality of word embeddings from different angles (e.g., [18, 25, 35, 7]), and the difficulty of evaluating embedding quality (as compared to supervised learning) parallels the difficulty of defining bias in an embedding. Within machine learning, a body of notable work has focused on “fair” binary classification in particular. A definition of fairness based on legal traditions is presented by Barocas and Selbst [2]. Approaches to modify classification algorithms to define and achieve various notions of fairness have been described in a number of works, see, e.g., [2, 5, 8] and a recent survey [36]. The prior work on algorithmic fairness is largely for supervised learning. Fair classification is defined based on the fact that algorithms were classifying a set of individuals using a set of features with a distinguished sensitive feature. In word embeddings, there are no clear individuals and no a priori defined classification problem. However, similar issues arise, such as direct and indirect bias [24]. Word embedding. An embedding consists of a unit vector ~w 2 Rd, with k~wk = 1, for each word (or term) w 2 W. We assume there is a set of gender neutral words N ⇢W, such as flight attendant or shoes, which, by definition, are not specific to any gender. We denote the size of a set S by |S|. We also assume we are given a set of F-M gender pairs P ⇢W ⇥W, such as she-he or mother-father whose definitions differ mainly in gender. Section 5 discusses how N and P can be found within the embedding itself, but until then we take them as given. As is common, similarity between two vectors u and v can be measured by their cosine similarity : cos(u, v) = u·v kukkvk. This normalized similarity between vectors u and v is the cosine of the angle between the two vectors. Since words are normalized cos(~w1, ~w2) = ~w1 · ~w2.2 Unless otherwise stated, the embedding we refer to is the aforementioned w2vNEWS embedding, a d = 300-dimensional word2vec [19, 20] embedding, which has proven to be immensely useful since it is high quality, publicly available, and easy to incorporate into any application. In particular, we downloaded the pre-trained embedding on the Google News corpus,3 and normalized each word to unit length as is common. Starting with the 50,000 most frequent words, we selected only lower-case words and phrases consisting of fewer than 20 lower-case characters (words with upper-case letters, digits, or punctuation were discarded). After this filtering, 26,377 words remained. While we focus on w2vNEWS, we show later that gender stereotypes are also present in other embedding data-sets. Crowd experiments.4 Two types of experiments were performed: ones where we solicited words from the crowd (to see if the embedding biases contain those of the crowd) and ones where we solicited ratings on words or analogies generated from our embedding (to see if the crowd’s biases contain those from the embedding). These two types of experiments are analogous to experiments performed in rating results in information retrieval to evaluate precision and recall. When we speak of the majority of 10 crowd judgments, we mean those annotations made by 5 or more independent workers. The Appendix contains the questionnaires that were given to the crowd-workers. 2We will abuse terminology and refer to the embedding of a word and the word interchangeably. For example, the statement cat is more similar to dog than to cow means −! cat · −! dog ≥−! cat · −−! cow. 3https://code.google.com/archive/p/word2vec/ 4All human experiments were performed on the Amazon Mechanical Turk platform. We selected for U.S.-based workers to maintain homogeneity and reproducibility to the extent possible with crowdsourcing. 3 3 Geometry of Gender and Bias in Word Embeddings Our first task is to understand the biases present in the word-embedding (i.e. which words are closer to she than to he, etc.) and the extent to which these geometric biases agree with human notion of gender stereotypes. We use two simple methods to approach this problem: 1) evaluate whether the embedding has stereotypes on occupation words and 2) evaluate whether the embedding produces analogies that are judged to reflect stereotypes by humans. The exploratory analysis of this section will motivate the more rigorous metrics used in the next two sections. Occupational stereotypes. Figure 1 lists the occupations that are closest to she and to he in the w2vNEWS embeddings. We asked the crowdworkers to evaluate whether an occupation is considered female-stereotypic, male-stereotypic, or neutral. The projection of the occupation words onto the shehe axis is strongly correlated with the stereotypicality estimates of these words (Spearman ⇢= 0.51), suggesting that the geometric biases of embedding vectors is aligned with crowd judgment. We projected each of the occupations onto the she-he direction in the w2vNEWS embedding as well as a different embedding generated by the GloVe algorithm on a web-crawl corpus [25]. The results are highly consistent (Appendix Figure 6), suggesting that gender stereotypes is prevalent across different embeddings and is not an artifact of the particular training corpus or methodology of word2vec. Analogies exhibiting stereotypes. Analogies are a useful way to both evaluate the quality of a word embedding and also its stereotypes. We first briefly describe how the embedding generate analogies and then discuss how we use analogies to quantify gender stereotype in the embedding. A more detailed discussion of our algorithm and prior analogy solvers is given in Appendix C. In the standard analogy tasks, we are given three words, for example he, she, king, and look for the 4th word to solve he to king is as she to x. Here we modify the analogy task so that given two words, e.g. he, she, we want to generate a pair of words, x and y, such that he to x as she to y is a good analogy. This modification allows us to systematically generate pairs of words that the embedding believes it analogous to he, she (or any other pair of seed words). The input into our analogy generator is a seed pair of words (a, b) determining a seed direction ~a −~b corresponding to the normalized difference between the two seed words. In the task below, we use (a, b) = (she, he). We then score all pairs of words x, y by the following metric: S(a,b)(x, y) = cos ⇣ ~a −~b, ~x −~y ⌘ if k~x −~yk δ, 0 else (1) where δ is a threshold for similarity. The intuition of the scoring metric is that we want a good analogy pair to be close to parallel to the seed direction while the two words are not too far apart in order to be semantically coherent. The parameter δ sets the threshold for semantic similarity. In all the experiments, we take δ = 1 as we find that this choice often works well in practice. Since all embeddings are normalized, this threshold corresponds to an angle ⇡/3, indicating that the two words are closer to each other than they are to the origin. In practice, it means that the two words forming the analogy are significantly closer together than two random embedding vectors. Given the embedding and seed words, we output the top analogous pairs with the largest positive S(a,b) scores. To reduce redundancy, we do not output multiple analogies sharing the same word x. We employed U.S. based crowd-workers to evaluate the analogies output by the aforementioned algorithm. For each analogy, we asked the workers two yes/no questions: (a) whether the pairing makes sense as an analogy, and (b) whether it reflects a gender stereotype. Overall, 72 out of 150 analogies were rated as gender-appropriate by five or more out of 10 crowd-workers, and 29 analogies were rated as exhibiting gender stereotype by five or more crowd-workers (Figure 4). Examples of analogies generated from w2vNEWS are shown at Figure 1. The full list are in Appendix J. Identifying the gender subspace. Next, we study the bias present in the embedding geometrically, identifying the gender direction and quantifying the bias independent of the extent to which it is aligned with the crowd bias. Language use is “messy” and therefore individual word pairs do not always behave as expected. For instance, the word man has several different usages: it may be used as an exclamation as in oh man! or to refer to people of either gender or as a verb, e.g., man the station. To more robustly estimate bias, we shall aggregate across multiple paired comparisons. By combining several directions, such as −! she −−! he and −−−−! woman −−−! man, we identify a gender direction g 2 Rd that largely captures gender in the embedding. This direction helps us to quantify direct and indirect biases in words and associations. In English as in many languages, there are numerous gender pair terms, and for each we can consider the difference between their embeddings. Before looking at the data, one might imagine 4 def. stereo. −! she−−! he 92% 89% −! her−−! his 84% 87% −−−−! woman−−−! man 90% 83% −−−! Mary−−−! John 75% 87% −−−−! herself−−−−−! himself 93% 89% −−−−−! daughter−−! son 93% 91% −−−−! mother−−−−! father 91% 85% −! gal−−! guy 85% 85% −! girl−−! boy 90% 86% −−−−! female−−−! male 84% 75% RG WS analogy Before 62.3 54.5 57.0 Hard-debiased 62.4 54.1 57.0 Soft-debiased 62.4 54.2 56.8 Figure 2: Left: Ten word pairs to define gender, along with agreement with sets of definitional and stereotypical words solicited from the crowd. The accuracy is shown for the corresponding gender classifier based on which word is closer to a target word, e.g., the she-he classifier predicts a word is female if it is closer to she than he. Middle: The bar plot shows the percentage of variance explained in the PCA of the 10 pairs of gender words. The top component explains significantly more variance than any other; the corresponding percentages for random words shows a more gradual decay (Figure created by averaging over 1,000 draws of ten random unit vectors in 300 dimensions). Right: The table shows performance of the original w2vNEWS embedding (“before”) and the debiased w2vNEWS on standard evaluation metrics measuring coherence and analogy-solving abilities: RG [27], WS [10], MSR-analogy [21]. Higher is better. The results show that the performance does not degrade after debiasing. Note that we use a subset of vocabulary in the experiments. Therefore, the performances are lower than the previously published results. See Appendix for full results. that they all had roughly the same vector differences, as in the following caricature: −−−−−−−−! grandmother = −−! wise+−! gal, −−−−−−−! grandfather = −−! wise+−! guy, −−−−−−−−! grandmother−−−−−−−−! grandfather = −! gal−−! guy = g However, gender pair differences are not parallel in practice, for multiple reasons. First, there are different biases associated with with different gender pairs. Second is polysemy, as mentioned, which in this case occurs due to the other use of grandfather as in to grandfather a regulation. Finally, randomness in the word counts in any finite sample will also lead to differences. Figure 2 illustrates ten possible gender pairs, # (xi, yi) 10 i=1. To identify the gender subspace, we took the ten gender pair difference vectors and computed its principal components (PCs). As Figure 2 shows, there is a single direction that explains the majority of variance in these vectors. The first eigenvalue is significantly larger than the rest. Note that, from the randomness in a finite sample of ten noisy vectors, one expects a decrease in eigenvalues. However, as also illustrated in 2, the decrease one observes due to random sampling is much more gradual and uniform. Therefore we hypothesize that the top PC, denoted by the unit vector g, captures the gender subspace. In general, the gender subspace could be higher dimensional and all of our analysis and algorithms (described below) work with general subspaces. Direct bias. To measure direct bias, we first identify words that should be gender-neutral for the application in question. How to generate this set of gender-neutral words is described in Section 5. Given the gender neutral words, denoted by N, and the gender direction learned from above, g, we define the direct gender bias of an embedding to be 1 |N| P w2N |cos(~w, g)|c, where c is a parameter that determines how strict do we want to in measuring bias. If c is 0, then |cos(~w −g)|c = 0 only if ~w has no overlap with g and otherwise it is 1. Such strict measurement of bias might be desirable in settings such as the college admissions example from the Introduction, where it would be unacceptable for the embedding to introduce a slight preference for one candidate over another by gender. A more gradual bias would be setting c = 1. The presentation we have chosen favors simplicity – it would be natural to extend our definitions to weight words by frequency. For example, in w2vNEWS, if we take N to be the set of 327 occupations, then DirectBias1 = 0.08, which confirms that many occupation words have substantial component along the gender direction. 4 Debiasing algorithms The debiasing algorithms are defined in terms of sets of words rather than just pairs, for generality, so that we can consider other biases such as racial or religious biases. We also assume that we have a set of words to neutralize, which can come from a list or from the embedding as described in Section 5. (In many cases it may be easier to list the gender specific words not to neutralize as this set can be much smaller.) 5 biased okay he Figure 3: Selected words projected along two axes: x is a projection onto the difference between the embeddings of the words he and she, and y is a direction learned in the embedding that captures gender neutrality, with gender neutral words above the line and gender specific words below the line. Our hard debiasing algorithm removes the gender pair associations for gender neutral words. In this figure, the words above the horizontal line would all be collapsed to the vertical line. The first step, called Identify gender subspace, is to identify a direction (or, more generally, a subspace) of the embedding that captures the bias. For the second step, we define two options: Neutralize and Equalize or Soften. Neutralize ensures that gender neutral words are zero in the gender subspace. Equalize perfectly equalizes sets of words outside the subspace and thereby enforces the property that any neutral word is equidistant to all words in each equality set. For instance, if {grandmother, grandfather} and {guy, gal} were two equality sets, then after equalization babysit would be equidistant to grandmother and grandfather and also equidistant to gal and guy, but presumably closer to the grandparents and further from the gal and guy. This is suitable for applications where one does not want any such pair to display any bias with respect to neutral words. The disadvantage of Equalize is that it removes certain distinctions that are valuable in certain applications. For instance, one may wish a language model to assign a higher probability to the phrase to grandfather a regulation) than to grandmother a regulation since grandfather has a meaning that grandmother does not – equalizing the two removes this distinction. The Soften algorithm reduces the differences between these sets while maintaining as much similarity to the original embedding as possible, with a parameter that controls this trade-off. To define the algorithms, it will be convenient to introduce some further notation. A subspace B is defined by k orthogonal unit vectors B = {b1, . . . , bk} ⇢Rd. In the case k = 1, the subspace is simply a direction. We denote the projection of a vector v onto B by, vB = Pk j=1(v · bj)bj. This also means that v −vB is the projection onto the orthogonal subspace. Step 1: Identify gender subspace. Inputs: word sets W, defining sets D1, D2, . . . , Dn ⇢W as well as embedding # ~w 2 Rd w2W and integer parameter k ≥1. Let µi := P w2Di ~w/|Di| be the means of the defining sets. Let the bias subspace B be the first k rows of SVD(C) where C := Pn i=1 P w2Di(~w −µi)T (~w −µi) & |Di|. Step 2a: Hard de-biasing (neutralize and equalize). Additional inputs: words to neutralize N ✓W, family of equality sets E = {E1, E2, . . . , Em} where each Ei ✓W. For each word w 2 N, let ~w be re-embedded to ~w := (~w −~wB) & k~w −~wBk. For each set E 2 E, let µ := P w2E w/|E| and ⌫:= µ −µB. For each w 2 E, ~w := ⌫+ p 1 −k⌫k2 ~wB−µB k~wB−µBk. Finally, output the subspace B and the new embedding # ~w 2 Rd w2W . Equalize equates each set of words outside of B to their simple average ⌫and then adjusts vectors so that they are unit length. It is perhaps easiest to understand by thinking separately of the two components ~wB and ~w?B = ~w −~wB. The latter ~w?B are all simply equated to their average. Within B, they are centered (moved to mean 0) and then scaled so that each ~w is unit length. To motivate why we center, beyond the fact that it is common in machine learning, consider the bias direction being the gender direction (k = 1) and a gender pair such as E = {male, female}. As discussed, it 6 Figure 4: Number of stereotypical (Left) and appropriate (Right) analogies generated by word embeddings before and after debiasing. so happens that both words are positive (female) in the gender direction, though female has a greater projection. One can only speculate as to why this is the case, e.g., perhaps the frequency of text such as male nurse or male escort or she was assaulted by the male. However, because female has a greater gender component, after centering the two will be symmetrically balanced across the origin. If instead, we simply scaled each vector’s component in the bias direciton without centering, male and female would have exactly the same embedding and we would lose analogies such as father:male :: mother:female. We note that Neutralizing and Equalizing completely remove pair bias. Observation 1. After Steps 1 and 2a, for any gender neutral word w any equality set E, and any two words e1, e2 2 E, ~w·~e1 = w·~e2 and k~w−~e1k = k~w−~e2k. Furthermore, if E = # {x, y}|(x, y) 2 P are the sets of pairs defining PairBias, then PairBias = 0. Step 2b: Soft bias correction. Overloading the notation, we let W 2 Rd⇥|vocab| denote the matrix of all embedding vectors and N denote the matrix of the embedding vectors corresponding to gender neutral words. W and N are learned from some corpus and are inputs to the algorithm. The desired debiasing transformation T 2 Rd⇥d is a linear transformation that seeks to preserve pairwise inner products between all the word vectors while minimizing the projection of the gender neutral words onto the gender subspace. This can be formalized as minT k(TW)T (TW) −W T Wk2 F + λk(TN)T (TB)k2 F , where B is the gender subspace learned in Step 1 and λ is a tuning parameter that balances the objective of preserving the original embedding inner products with the goal of reducing gender bias. For λ large, T would remove the projection onto B from all the vectors in N, which corresponds exactly to Step 2a. In the experiment, we use λ = 0.2. The optimization problem is a semi-definite program and can be solved efficiently. The output embedding is normalized to have unit length, ˆW = {Tw/kTwk2, w 2 W}. 5 Determining gender neutral words For practical purposes, since there are many fewer gender specific words, it is more efficient to enumerate the set of gender specific words S and take the gender neutral words to be the compliment, N = W \ S. Using dictionary definitions, we derive a subset S0 of 218 words out of the words in w2vNEWS. Recall that this embedding is a subset of 26,377 words out of the full 3 million words in the embedding, as described in Section 2. This base list S0 is given in Appendix F. Note that the choice of words is subjective and ideally should be customized to the application at hand. We generalize this list to the entire 3 million words in the Google News embedding using a linear classifier, resulting in the set S of 6,449 gender-specific words. More specifically, we trained a linear Support Vector Machine (SVM) with regularization parameter of C = 1.0. We then ran this classifier on the remaining words, taking S = S0 [ S1, where S1 are the words labeled as gender specific by our classifier among the words in the entire embedding that are not in the 26,377 words of w2vNEWS. Using 10-fold cross-validation to evaluate the accuracy, we find an F-score of .627 ± .102. Figure 3 illustrates the results of the classifier for separating gender-specific words from genderneutral words. To make the figure legible, we show a subset of the words. The x-axis correspond to projection of words onto the −! she −−! he direction and the y-axis corresponds to the distance from the decision boundary of the trained SVM. 7 6 Debiasing results We evaluated our debiasing algorithms to ensure that they preserve the desirable properties of the original embedding while reducing both direct and indirect gender biases. First we used the same analogy generation task as before: for both the hard-debiased and the soft-debiased embeddings, we automatically generated pairs of words that are analogous to she-he and asked crowd-workers to evaluate whether these pairs reflect gender stereotypes. Figure 4 shows the results. On the initial w2vNEWS embedding, 19% of the top 150 analogies were judged as showing gender stereotypes by a majority of the ten workers. After applying our hard debiasing algorithm, only 6% of the new embedding were judged as stereotypical. As an example, consider the analogy puzzle, he to doctor is as she to X. The original embedding returns X = nurse while the hard-debiased embedding finds X = physician. Moreover the harddebiasing algorithm preserved gender appropriate analogies such as she to ovarian cancer is as he to prostate cancer. This demonstrates that the hard-debiasing has effectively reduced the gender stereotypes in the word embedding. Figure 4 also shows that the number of appropriate analogies remains similar as in the original embedding after executing hard-debiasing. This demonstrates that that the quality of the embeddings is preserved. The details results are in Appendix J. Soft-debiasing was less effective in removing gender bias. To further confirms the quality of embeddings after debiasing, we tested the debiased embedding on several standard benchmarks that measure whether related words have similar embeddings as well as how well the embedding performs in analogy tasks. Appendix Table 2 shows the results on the original and the new embeddings and the transformation does not negatively impact the performance. In Appendix A, we show how our algorithm also reduces indirect gender bias. 7 Discussion Word embeddings help us further our understanding of bias in language. We find a single direction that largely captures gender, that helps us capture associations between gender neutral words and gender as well as indirect inequality. The projection of gender neutral words on this direction enables us to quantify their degree of female- or male-bias. To reduce the bias in an embedding, we change the embeddings of gender neutral words, by removing their gender associations. For instance, nurse is moved to to be equally male and female in the direction g. In addition, we find that gender-specific words have additional biases beyond g. For instance, grandmother and grandfather are both closer to wisdom than gal and guy are, which does not reflect a gender difference. On the other hand, the fact that babysit is so much closer to grandmother than grandfather (more than for other gender pairs) is a gender bias specific to grandmother. By equating grandmother and grandfather outside of gender, and since we’ve removed g from babysit, both grandmother and grandfather and equally close to babysit after debiasing. By retaining the gender component for gender-specific words, we maintain analogies such as she:grandmother :: he:grandfather. Through empirical evaluations, we show that our hard-debiasing algorithm significantly reduces both direct and indirect gender bias while preserving the utility of the embedding. We have also developed a soft-embedding algorithm which balances reducing bias with preserving the original distances, and could be appropriate in specific settings. One perspective on bias in word embeddings is that it merely reflects bias in society, and therefore one should attempt to debias society rather than word embeddings. However, by reducing the bias in today’s computer systems (or at least not amplifying the bias), which is increasingly reliant on word embeddings, in a small way debiased word embeddings can hopefully contribute to reducing gender bias in society. At the very least, machine learning should not be used to inadvertently amplify these biases, as we have seen can naturally happen. In specific applications, one might argue that gender biases in the embedding (e.g. computer programmer is closer to he) could capture useful statistics and that, in these special cases, the original biased embeddings could be used. However given the potential risk of having machine learning algorithms that amplify gender stereotypes and discriminations, we recommend that we should err on the side of neutrality and use the debiased embeddings provided here as much as possible. Acknowledgments. The authors thank Tarleton Gillespie and Nancy Baym for numerous helpful discussions.5 5 This material is based upon work supported in part by NSF Grants CNS-1330008, CCF-1527618, by ONR Grant 50202168, NGA Grant HM1582-09-1-0037 and DHS 2013-ST-061-ED0001 8 References [1] J. Angwin, J. Larson, S. Mattu, and L. Kirchner. Machine bias: There’s software used across the country to predict future criminals. and it’s biased against blacks., 2016. [2] S. Barocas and A. D. Selbst. Big data’s disparate impact. Available at SSRN 2477899, 2014. [3] E. Beigman and B. B. Klebanov. Learning with annotation noise. In ACL, 2009. [4] A. Datta, M. C. Tschantz, and A. Datta. Automated experiments on ad privacy settings. Proceedings on Privacy Enhancing Technologies, 2015. [5] C. Dwork, M. Hardt, T. Pitassi, O. Reingold, and R. Zemel. Fairness through awareness. In Innovations in Theoretical Computer Science Conference, 2012. [6] J. Eisenstein, B. O’Connor, N. A. Smith, and E. P. Xing. Diffusion of lexical change in social media. PLoS ONE, pages 1–13, 2014. [7] M. Faruqui, J. Dodge, S. K. Jauhar, C. Dyer, E. Hovy, and N. A. Smith. Retrofitting word vectors to semantic lexicons. In NAACL, 2015. [8] M. Feldman, S. A. Friedler, J. Moeller, C. Scheidegger, and S. Venkatasubramanian. Certifying and removing disparate impact. In KDD, 2015. [9] C. Fellbaum, editor. Wordnet: An Electronic Lexical Database. The MIT Press, Cambridge, MA, 1998. [10] L. Finkelstein, E. Gabrilovich, Y. Matias, E. Rivlin, Z. Solan, G. Wolfman, and E. Ruppin. Placing search in context: The concept revisited. In WWW. ACM, 2001. [11] A. G. Greenwald, D. E. McGhee, and J. L. Schwartz. Measuring individual differences in implicit cognition: the implicit association test. Journal of personality and social psychology, 74(6):1464, 1998. [12] C. Hansen, M. Tosik, G. Goossen, C. Li, L. Bayeva, F. Berbain, and M. Rotaru. How to get the best word vectors for resume parsing. In SNN Adaptive Intelligence / Symposium: Machine Learning 2015, Nijmegen. [13] J. Holmes and M. Meyerhoff. The handbook of language and gender, volume 25. John Wiley & Sons, 2008. [14] O. ˙Irsoy and C. Cardie. Deep recursive neural networks for compositionality in language. In NIPS. 2014. [15] R. Jakobson, L. R. Waugh, and M. Monville-Burston. On language. Harvard Univ Pr, 1990. [16] M. Kay, C. Matuszek, and S. A. Munson. Unequal representation and gender stereotypes in image search results for occupations. In Human Factors in Computing Systems. ACM, 2015. [17] T. Lei, H. Joshi, R. Barzilay, T. Jaakkola, A. M. Katerina Tymoshenko, and L. Marquez. Semi-supervised question retrieval with gated convolutions. In NAACL. 2016. [18] O. Levy and Y. Goldberg. Linguistic regularities in sparse and explicit word representations. In CoNLL, 2014. [19] T. Mikolov, K. Chen, G. Corrado, and J. Dean. Efficient estimation of word representations in vector space. In ICLR, 2013. [20] T. Mikolov, I. Sutskever, K. Chen, G. S. Corrado, and J. Dean. Distributed representations of words and phrases and their compositionality. In NIPS. [21] T. Mikolov, W.-t. Yih, and G. Zweig. Linguistic regularities in continuous space word representations. In HLT-NAACL, pages 746–751, 2013. [22] E. Nalisnick, B. Mitra, N. Craswell, and R. Caruana. Improving document ranking with dual word embeddings. In www, April 2016. [23] B. A. Nosek, M. Banaji, and A. G. Greenwald. Harvesting implicit group attitudes and beliefs from a demonstration web site. Group Dynamics: Theory, Research, and Practice, 6(1):101, 2002. [24] D. Pedreshi, S. Ruggieri, and F. Turini. Discrimination-aware data mining. In SIGKDD, pages 560–568. ACM, 2008. [25] J. Pennington, R. Socher, and C. D. Manning. Glove: Global vectors for word representation. In EMNLP, 2014. [26] K. Ross and C. Carter. Women and news: A long and winding road. Media, Culture & Society, 33(8):1148– 1165, 2011. [27] H. Rubenstein and J. B. Goodenough. Contextual correlates of synonymy. Communications of the ACM, 8(10):627–633, 1965. [28] E. Sapir. Selected writings of Edward Sapir in language, culture and personality, volume 342. Univ of California Press, 1985. [29] B. Schmidt. Rejecting the gender binary: a vector-space operation. http://bookworm.benschmidt. org/posts/2015-10-30-rejecting-the-gender-binary.html, 2015. [30] J. P. Stanley. Paradigmatic woman: The prostitute. Papers in language variation, pages 303–321, 1977. [31] L. Sweeney. Discrimination in online ad delivery. Queue, 11(3):10, 2013. [32] A. Torralba and A. Efros. Unbiased look at dataset bias. In CVPR, 2012. [33] P. D. Turney. Domain and function: A dual-space model of semantic relations and compositions. Journal of Artificial Intelligence Research, pages 533–585, 2012. [34] C. Wagner, D. Garcia, M. Jadidi, and M. Strohmaier. It’s a man’s wikipedia? assessing gender inequality in an online encyclopedia. In Ninth International AAAI Conference on Web and Social Media, 2015. [35] D. Yogatama, M. Faruqui, C. Dyer, and N. A. Smith. Learning word representations with hierarchical sparse coding. In ICML, 2015. [36] I. Zliobaite. A survey on measuring indirect discrimination in machine learning. arXiv preprint arXiv:1511.00148, 2015. 9 | 2016 | 380 |
6,306 | Memory-Efficient Backpropagation Through Time Audr¯unas Gruslys Google DeepMind audrunas@google.com Rémi Munos Google DeepMind munos@google.com Ivo Danihelka Google DeepMind danihelka@google.com Marc Lanctot Google DeepMind lanctot@google.com Alex Graves Google DeepMind gravesa@google.com Abstract We propose a novel approach to reduce memory consumption of the backpropagation through time (BPTT) algorithm when training recurrent neural networks (RNNs). Our approach uses dynamic programming to balance a trade-off between caching of intermediate results and recomputation. The algorithm is capable of tightly fitting within almost any user-set memory budget while finding an optimal execution policy minimizing the computational cost. Computational devices have limited memory capacity and maximizing a computational performance given a fixed memory budget is a practical use-case. We provide asymptotic computational upper bounds for various regimes. The algorithm is particularly effective for long sequences. For sequences of length 1000, our algorithm saves 95% of memory usage while using only one third more time per iteration than the standard BPTT. 1 Introduction Recurrent neural networks (RNNs) are artificial neural networks where connections between units can form cycles. They are often used for sequence mapping problems, as they can propagate hidden state information from early parts of the sequence back to later points. LSTM [9] in particular is an RNN architecture that has excelled in sequence generation [3, 13, 4], speech recognition [5] and reinforcement learning [12, 10] settings. Other successful RNN architectures include the differentiable neural computer (DNC) [6], DRAW network [8], and Neural Transducers [7]. Backpropagation Through Time algorithm (BPTT) [11, 14] is typically used to obtain gradients during training. One important problem is the large memory consumption required by the BPTT. This is especially troublesome when using Graphics Processing Units (GPUs) due to the limitations of GPU memory. Memory budget is typically known in advance. Our algorithm balances the tradeoff between memorization and recomputation by finding an optimal memory usage policy which minimizes the total computational cost for any fixed memory budget. The algorithm exploits the fact that the same memory slots may be reused multiple times. The idea to use dynamic programming to find a provably optimal policy is the main contribution of this paper. Our approach is largely architecture agnostic and works with most recurrent neural networks. Being able to fit within limited memory devices such as GPUs will typically compensate for any increase in computational cost. 2 Background and related work In this section, we describe the key terms and relevant previous work for memory-saving in RNNs. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Definition 1. An RNN core is a feed-forward neural network which is cloned (unfolded in time) repeatedly, where each clone represents a particular time point in the recurrence. For example, if an RNN has a single hidden layer whose outputs feed back into the same hidden layer, then for a sequence length of t the unfolded network is feed-forward and contains t RNN cores. Definition 2. The hidden state of the recurrent network is the part of the output of the RNN core which is passed into the next RNN core as an input. In addition to the initial hidden state, there exists a single hidden state per time step once the network is unfolded. Definition 3. The internal state of the RNN core for a given time-point is all the necessary information required to backpropagate gradients over that time step once an input vector, a gradient with respect to the output vector, and a gradient with respect to the output hidden state is supplied. We define it to also include an output hidden state. An internal state can be (re)evaluated by executing a single forward operation taking the previous hidden state and the respective entry of an input sequence as an input. For most network architectures, the internal state of the RNN core will include a hidden input state, as this is normally required to evaluate gradients. This particular choice of the definition will be useful later in the paper. Definition 4. A memory slot is a unit of memory which is capable of storing a single hidden state or a single internal state (depending on the context). 2.1 Backpropagation through Time Backpropagation through Time (BPTT) [11, 14] is one of the commonly used techniques to train recurrent networks. BPTT “unfolds” the neural network in time by creating several copies of the recurrent units which can then be treated like a (deep) feed-forward network with tied weights. Once this is done, a standard forward-propagation technique can be used to evaluate network fitness over the whole sequence of inputs, while a standard backpropagation algorithm can be used to evaluate partial derivatives of the loss criteria with respect to all network parameters. This approach, while being computationally efficient is also fairly intensive in memory usage. This is because the standard version of the algorithm effectively requires storing internal states of the unfolded network core at every time-step in order to be able to evaluate correct partial derivatives. 2.2 Trading memory for computation time The general idea of trading computation time and memory consumption in general computation graphs has been investigated in the automatic differentiation community [2]. Recently, the rise of deep architectures and recurrent networks has increased interest in a less general case where the graph of forward computation is a chain and gradients have to be chained in a reverse order. This simplification leads to relatively simple memory-saving strategies and heuristics. In the context of BPTT, instead of storing hidden network states, some of the intermediate results can be recomputed on demand by executing an extra forward operation. Chen et. al. proposed subdividing the sequence of size t into √ t equal parts and memorizing only hidden states between the subsequences and all internal states within each segment [1]. This uses O( √ t) memory at the cost of making an additional forward pass on average, as once the errors are backpropagated through the right-side of the sequence, the second-last subsequence has to be restored by repeating a number of forward operations. We refer to this as Chen’s √ t algorithm. The authors also suggest applying the same technique recursively several times by sub-dividing the sequence into k equal parts and terminating the recursion once the subsequence length becomes less than k. The authors have established that this would lead to memory consumption of O(k logk+1(t)) and computational complexity of O(t logk(t)). This algorithm has a minimum possible memory usage of log2(t) in the case when k = 1. We refer to this as Chen’s recursive algorithm. 3 Memory-efficient backpropagation through time We first discuss two simple examples: when memory is very scarce, and when it is somewhat limited. 2 When memory is very scarce, it is straightforward to design a simple but computationally inefficient algorithm for backpropagation of errors on RNNs which only uses a constant amount of memory. Every time when the state of the network at time t has to be restored, the algorithm would simply re-evaluate the state by forward-propagating inputs starting from the beginning until time t. As backpropagation happens in the reverse temporal order, results from the previous forward steps can not be reused (as there is no memory to store them). This would require repeating t forward steps before backpropagating gradients one step backwards (we only remember inputs and the initial state). This would produce an algorithm requiring t(t + 1)/2 forward passes to backpropagate errors over t time steps. The algorithm would be O(1) in space and O(t2) in time. When the memory is somewhat limited (but not very scarce) we may store only hidden RNN states at all time points. When errors have to be backpropagated from time t to t −1, an internal RNN core state can be re-evaluated by executing another forward operation taking the previous hidden state as an input. The backward operation can follow immediately. This approach can lead to fairly significant memory savings, as typically the recurrent network hidden state is much smaller than an internal state of the network core itself. On the other hand this leads to another forward operation being executed during the backpropagation stage. 3.1 Backpropagation though time with selective hidden state memorization (BPTT-HSM) The idea behind the proposed algorithm is to compromise between two previous extremes. Suppose that we want to forward and backpropagate a sequence of length t, but we are only able to store m hidden states in memory at any given time. We may reuse the same memory slots to store different hidden states during backpropagation. Also, suppose that we have a single RNN core available for the purposes of intermediate calculations which is able to store a single internal state. Define C(t, m) as a computational cost of backpropagation measured in terms of how many forward-operations one has to make in total during forward and backpropagation steps combined when following an optimal memory usage policy minimizing the computational cost. One can easily set the boundary conditions: C(t, 1) = 1 2t(t + 1) is the cost of the minimal memory approach, while C(t, m) = 2t −1 for all m ≥t when memory is plentiful (as shown in Fig. 3 a). Our approach is illustrated in Figure 1. Once we start forward-propagating steps at time t = t0, at any given point y > t0 we can choose to put the current hidden state into memory (step 1). This step has the cost of y forward operations. States will be read in the reverse order in which they were written: this allows the algorithm to store states in a stack. Once the state is put into memory at time y = D(t, m), we can reduce the problem into two parts by using a divide-and-conquer approach: running the same algorithm on the t > y side of the sequence while using m −1 of the remaining memory slots at the cost of C(t −y, m −1) (step 2), and then reusing m memory slots when backpropagating on the t ≤y side at the cost of C(y, m) (step 3). We use a full size m memory capacity when performing step 3 because we could release the hidden state y immediately after finishing step 2. Step 3: cost = C(y, m) 1 2 y ... y+1 ... t Step 1: cost = y y+1 ... t Step 2: cost = C(t-y, m-1) 1 2 y ... Hidden state is propagated Gradients get back-propagated Hidden state stored in memory Internal state of RNN core at time t t Recursive application of the algorithm Hidden state is read from memory Hidden state is saved in memory Hidden state is removed from memory A single forward operation A single backward operation Legend Figure 1: The proposed divide-and-conquer approach. The base case for the recurrent algorithm is simply a sequence of length t = 1 when forward and backward propagation may be done trivially on a single available RNN network core. This step has the cost C(1, m) = 1. 3 (a) Theoretical computational cost measured in number of forward operations per time step. (b) Measured computational cost in miliseconds. Figure 2: Computational cost per time-step when the algorithm is allowed to remember 10 (red), 50 (green), 100 (blue), 500 (violet), 1000 (cyan) hidden states. The grey line shows the performance of standard BPTT without memory constraints; (b) also includes a large constant value caused by a single backwards step per time step which was excluded from the theoretical computation, which value makes a relative performance loss much less severe in practice than in theory. Having established the protocol we may find an optimal policy D(t, m). Define the cost of choosing the first state to be pushed at position y and later following the optimal policy as: Q(t, m, y) = y + C(t −y, m −1) + C(y, m) (1) C(t, m) = Q(t, m, D(t, m)) (2) D(t, m) = argmin 1≤y<t Q(t, m, y) (3) 1 t 1 Order of execution time 1 1 CPTS ≈ 3 1 1 1 1 1 1 1 time Hidden state stored in memory Forward computation Backward computation CPTS ≈ 2 cost per time step in the number of forward operations CPTS a) b) Figure 3: Illustration of the optimal policy for m = 4 and a) t = 4 and b) t = 10. Logical sequence time goes from left to right, while execution happens from top to the bottom. Equations can be solved exactly by using dynamic programming subject to the boundary conditions established previously (e.g. as in Figure 2(a)). D(t, m) will determine the optimal policy to follow. Pseudocode is given in the supplementary material. Figure 3 illustrates an optimal policy found for two simple cases. 3.2 Backpropagation though time with selective internal state memorization (BPTT-ISM) Saving internal RNN core states instead of hidden RNN states would allow us to save a single forward operation during backpropagation in every divide-and-conquer step, but at a higher memory cost. Suppose we have a memory capacity capable of saving exactly m internal RNN states. First, we need to modify the boundary conditions: C(t, 1) = 1 2t(t + 1) is a cost reflecting the minimal memory approach, while C(t, m) = t for all m ≥t when memory is plentiful (equivalent to standard BPTT). 4 As previously, C(t, m) is defined to be the computational cost for combined forward and backward propagations over a sequence of length t with memory allowance m while following an optimal memory usage policy. As before, the cost is measured in terms of the amount of total forward steps made, because the number of backwards steps is constant. Similarly to BPTT-HSM, the process can be divided into parts using divide-and-conquer approach (Fig 4). For any values of t and m position of the first memorization y = D(t, m) is evaluated. y forward operations are executed and an internal RNN core state is placed into memory. This step has the cost of y forward operations (Step 1 in Figure 4). As the internal state also contains an output hidden state, the same algorithm can be recurrently run on the high-time (right) side of the sequence while having one less memory slot available (Step 2 in Figure 4). This step has the cost of C(t −y, m −1) forward operations. Once gradients are backpropagated through the right side of the sequence, backpropagation can be done over the stored RNN core (Step 3 in Figure 4). This step has no additional cost as it involves no more forward operations. The memory slot can now be released leaving m memory available. Finally, the same algorithm is run on the left-side of the sequence (Step 4 in Figure 4). This final step has the cost of C(y −1, m) forward operations. Summing the costs gives us the following equation: Q(t, m, y) = y + C(y −1, m) + C(t −y, m −1) (4) Recursion has a single base case: backpropagation over an empty sequence is a nil operation which has no computational cost making C(0, m) = 0. Step 4: cost = C(y-1, m) 1 ... y y+1 ... t Step 1: cost = y y+1 ... t Step 2: cost = C(t-y, m-1) 1 ... Hidden state gets propagated Gradients get back-propagated A single initial RNN hidden state Internal stat of RNN core at time t t Recursive application of the algorithm Hidden state is read from memory Internal state is saved Internal state is removed A single forward operation A single backward operation y Step 3: cost = 0 y y-1 y-1 y Internal RNN core state stored in memory (incl. output hidden state) A single backwards operation, no forward operations involved. Legend Figure 4: Illustration of the divide-and-conquer approach used by BPTT-ISM. Compared to the previous section (20) stays the same while (19) is minimized over 1 ≤y ≤t instead of 1 ≤y < t. This is because it is meaningful to remember the last internal state while there was no reason to remember the last hidden state. A numerical solution of C(t, m) for several different memory capacities is shown in Figure 5(a). D(t, m) = argmin 1≤y≤t Q(t, m, y) (5) As seen in Figure 5(a), our methodology saves 95% of memory for sequences of 1000 (excluding input vectors) while using only 33% more time per training-iteration than the standard BPTT (assuming a single backward step being twice as expensive as a forward step). 3.3 Backpropagation though time with mixed state memorization (BPTT-MSM) It is possible to derive an even more general model by combining both approaches as described in Sections 3.1 and 3.2. Suppose we have a total memory capacity m measured in terms of how much a single hidden states can be remembered. Also suppose that storing an internal RNN core state takes α times more memory where α ≥2 is some integer number. We will choose between saving a single hidden state while using a single memory unit and storing an internal RNN core state by using α times more memory. The benefit of storing an internal RNN core state is that we will be able to save a single forward operation during backpropagation. Define C(t, m) as a computational cost in terms of a total amount of forward operations when running an optimal strategy. We use the following boundary conditions: C(t, 1) = 1 2t(t + 1) as a 5 (a) BPTT-ISM (section 3.2). (b) BPTT-MSM (section 3.3). Figure 5: Comparison of two backpropagation algorithms in terms of theoretical costs. Different lines show the number of forward operations per time-step when the memory capacity is limited to 10 (red), 50 (green), 100 (blue), 500 (violet), 1000 (cyan) internal RNN core states. Please note that the units of memory measurement are different than in Figure 2(a) (size of an internal state vs size of a hidden state). It was assumed that the size of an internal core state is α = 5 times larger than the size of a hidden state. The value of α influences only the right plot. All costs shown on the right plot should be less than the respective costs shown on the left plot for any value of α. cost reflecting the minimal memory approach, while C(t, m) = t for all m ≥αt when memory is plentiful and C(t −y, m) = ∞for all m ≤0 and C(0, m) = 0 for notational convenience. We use a similar divide-and-conquer approach to the one used in previous sections. Define Q1(t, m, y) as the computational cost if we choose to firstly remember a hidden state at position y and thereafter follow an optimal policy (identical to ( 18)): Q1(t, m, y) = y + C(y, m) + C(t −y, m −1) (6) Similarly, define Q2(t, m, y) as the computational cost if we choose to firstly remember an internal state at position y and thereafter follow an optimal policy (similar to ( 4) except that now the internal state takes α memory units): Q2(t, m, y) = y + C(y −1, m) + C(t −y, m −α) (7) Define D1 as an optimal position of the next push assuming that the next state to be pushed is a hidden state and define D2 as an optimal position if the next push is an internal core state. Note that D2 has a different range over which it is minimized, for the same reasons as in equation 5: D1(t, m) = argmin 1≤y<t Q1(t, m, y) D2(t, m) = argmin 1≤y≤t Q2(t, m, y) (8) Also define Ci(t, m) = Qi(t, m, D(t, m)) and finally: C(t, m) = min i Ci(t, m) H(t, m) = argmin i Ci(t, m) (9) We can solve the above equations by using simple dynamic programming. H(t, m) will indicate whether the next state to be pushed into memory in a hidden state or an internal state, while the respective values if D1(t, m) and D2(t, m) will indicate the position of the next push. 3.4 Removing double hidden-state memorization Definition 3 of internal RNN core state would typically require for a hidden input state to be included for each memorization. This may lead to the duplication of information. For example, when an optimal strategy is to remember a few internal RNN core states in sequence, a memorized hidden output of one would be equal to a memorized hidden input for the other one (see Definition 3). Every time we want to push an internal RNN core state onto the stack and a previous internal state is already there, we may omit pushing the input hidden state. Recall that an internal core RNN state when an input hidden state is otherwise not known is α times larger than a hidden state. Define β ≤α as the space required to memorize the internal core state when an input hidden state is known. A 6 relationship between α and β is application-specific, but in many circumstances α = β + 1. We only have to modify (7) to reflect this optimization: Q2(t, m, y) = y + C(y −1, m) + C(t −y, m −1y>1α −1y=1β) (10) 1 is an indicator function. Equations for H(t, m), Di(t, m) and C(t, m) are identical to (8) and (9). 3.5 Analytical upper bound for BPTT-HSM We have established a theoretical upper bound for BPTT-HSM algorithm as C(t, m) ≤mt1+ 1 m . As the bound is not tight for short sequences, it was also numerically verified that C(t, m) < 4t1+ 1 m for t < 105 and m < 103, or less than 3t1+ 1 m if the initial forward pass is excluded. In addition to that, we have established a different bound in the regime where t < mm m! . For any integer value a and for all t < ma a! the computational cost is bounded by C(t, m) ≤(a + 1)t. The proofs are given in the supplementary material. Please refer to supplementary material for discussion on the upper bounds for BPTT-MSM and BPTT-ISM. 3.6 Comparison of the three different strategies (a) Using 10α memory (b) Using 20α memory Figure 6: Comparison of three strategies in the case when a size of an internal RNN core state is α = 5 times larger than that of the hidden state, and the total memory capacity allows us remember either 10 internal RNN states, or 50 hidden states or any arbitrary mixture of those in the left plot and (20, 100) respectively in the right plot. The red curve illustrates BPTT-HSM, the green curve - BPTT-ISM and the blue curve - BPTT-MSM. Please note that for large sequence lengths the red curve out-performs the green one, and the blue curve outperforms the other two. Computational costs for each previously described strategy and the results are shown in Figure 6. BPTT-MSM outperforms both BPTT-ISM and BPTT-HSM. This is unsurprising, because the search space in that case is a superset of both strategy spaces, while the algorothm finds an optimal strategy within that space. Also, for a fixed memory capacity, the strategy memorizing only hidden states outperforms a strategy memorizing internal RNN core states for long sequences, while the latter outperforms the former for relatively short sequences. 4 Discussion We used an LSTM mapping 256 inputs to 256 with a batch size of 64 and measured execution time for a single gradient descent step (forward and backward operation combined) as a function of sequence length (Figure 2(b)). Please note that measured computational time also includes the time taken by backward operations at each time-step which dynamic programming equations did not take into the account. A single backward operation is usually twice as expensive than a forward operation, because it involves evaluating gradients both with respect to input data and internal parameters. Still, as the number of backward operations is constant it has no impact on the optimal strategy. 4.1 Optimality The dynamic program finds the optimal computational strategy by construction, subject to memory constraints and a fairly general model that we impose. As both strategies proposed by [1] are 7 consistent with all the assumptions that we have made in section 3.4 when applied to RNNs, BPTTMSM is guaranteed to perform at least as well under any memory budget and any sequence length. This is because strategies proposed by [1] can be expressed by providing a (potentially suboptimal) policy Di(t, m), H(t, m) subject to the same equations for Qi(t, m). 4.2 Numerical comparison with Chen’s √ t algorithm Chen’s √ t algorithm requires to remember √ t hidden states and √ t internal RNN states (excluding input hidden states), while the recursive approach requires to remember at least log2 t hidden states. In other words, the model does not allow for a fine-grained control over memory usage and rather saves some memory. In the meantime our proposed BPTT-MSM can fit within almost arbitrary constant memory constraints, and this is the main advantage of our algorithm. Figure 7: Left: memory consumption divided by √ t(1 + β) for a fixed computational cost C = 2. Right: computational cost per time-step for a fixed memory consumption of √ t(1 + β). Red, green and blue curves correspond to β = 2, 5, 10 respectively. The non-recursive Chen’s √ t approach does not allow to match any particular memory budget making a like-for-like comparison difficult. Instead of fixing the memory budge, it is possible to fix computational cost at 2 forwards iterations on average to match the cost of the √ t algorithm and observe how much memory would our approach use. Memory usage by the √ t algorithm would be equivalent to saving √ t hidden states and √ t internal core states. Lets suppose that the internal RNN core state is α times larger than hidden states. In this case the size of the internal RNN core state excluding the input hidden state is β = α −1. This would give a memory usage of Chen’s algorithm as √ t(1 + β) = √ t(α), as it needs to remember √ t hidden states and √ t internal states where input hidden states can be omitted to avoid duplication. Figure 7 illustrates memory usage by our algorithm divided by √ t(1 + β) for a fixed execution speed of 2 as a function of sequence length and for different values of parameter β. Values lower than 1 indicate memory savings. As it is seen, we can save a significant amount of memory for the same computational cost. Another experiment is to measure computational cost for a fixed memory consumption of √ t(1 + β). The results are shown in Figure 7. Computational cost of 2 corresponds to Chen’s √ t algorithm. This illustrates that our approach does not perform significantly faster (although it does not do any worse). This is because Chen’s √ t strategy is actually near optimal for this particular memory budget. Still, as seen from the previous paragraph, this memory budget is already in the regime of diminishing returns and further memory reductions are possible for almost the same computational cost. 5 Conclusion In this paper, we proposed a novel approach for finding optimal backpropagation strategies for recurrent neural networks for a fixed user-defined memory budget. We have demonstrated that the most general of the algorithms is at least as good as many other used common heuristics. The main advantage of our approach is the ability to tightly fit to almost any user-specified memory constraints gaining maximal computational performance. 8 References [1] Tianqi Chen, Bing Xu, Zhiyuan Zhang, and Carlos Guestrin. Training deep nets with sublinear memory cost. arXiv preprint arXiv:1604.06174, 2016. [2] Benjamin Dauvergne and Laurent Hascoët. The data-flow equations of checkpointing in reverse automatic differentiation. In Computational Science–ICCS 2006, pages 566–573. Springer, 2006. [3] Douglas Eck and Juergen Schmidhuber. A first look at music composition using LSTM recurrent neural networks. Istituto Dalle Molle Di Studi Sull Intelligenza Artificiale, 103, 2002. [4] Alex Graves. Supervised Sequence Labelling with Recurrent Neural Networks. Studies in Computational Intelligence. Springer, 2012. [5] Alex Graves, Abdel-rahman Mohamed, and Geoffrey Hinton. Speech recognition with deep recurrent neural networks. In Acoustics, Speech and Signal Processing (ICASSP), 2013 IEEE International Conference on, pages 6645–6649. IEEE, 2013. [6] Alex Graves, Greg Wayne, Malcolm Reynolds, Tim Harley, Ivo Danihelka, Agnieszka GrabskaBarwi´nska, Sergio Gómez Colmenarejo, Edward Grefenstette, Tiago Ramalho, John Agapiou, Adrià Puigdomènech Badia, Karl Moritz Hermann, Yori Zwols, Georg Ostrovski, Adam Cain, Helen King, Christopher Summerfield, Phil Blunsom, Koray Kavukcuoglu, and Demis Hassabis. Hybrid computing using a neural network with dynamic external memory. Nature, advance online publication, October 2016. [7] Edward Grefenstette, Karl Moritz Hermann, Mustafa Suleyman, and Phil Blunsom. Learning to transduce with unbounded memory. In Advances in Neural Information Processing Systems, pages 1819–1827, 2015. [8] Karol Gregor, Ivo Danihelka, Alex Graves, and Daan Wierstra. DRAW: A recurrent neural network for image generation. arXiv preprint arXiv:1502.04623, 2015. [9] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8):1735–1780, 1997. [10] Volodymyr Mnih, Adrià Puigdomènech Badia, Mehdi Mirza, Alex Graves, Timothy P. Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. In Proceedings of the 33rd International Conference on Machine Learning (ICML), pages 1928–1937, 2016. [11] David E Rumelhart, Geoffrey E Hinton, and Ronald J Williams. Learning internal representations by error propagation. Technical report, DTIC Document, 1985. [12] Ivan Sorokin, Alexey Seleznev, Mikhail Pavlov, Aleksandr Fedorov, and Anastasiia Ignateva. Deep attention recurrent Q-network. arXiv preprint arXiv:1512.01693, 2015. [13] Ilya Sutskever, James Martens, and Geoffrey E Hinton. Generating text with recurrent neural networks. In Proceedings of the 28th International Conference on Machine Learning (ICML-11), pages 1017–1024, 2011. [14] Paul J Werbos. Backpropagation through time: what it does and how to do it. Proceedings of the IEEE, 78(10):1550–1560, 1990. 9 | 2016 | 381 |
6,307 | Solving Marginal MAP Problems with NP Oracles and Parity Constraints Yexiang Xue Department of Computer Science Cornell University yexiang@cs.cornell.edu Zhiyuan Li∗ Institute of Interdisciplinary Information Sciences Tsinghua University lizhiyuan13@mails.tsinghua.edu.cn Stefano Ermon Department of Computer Science Stanford University ermon@cs.stanford.edu Carla P. Gomes, Bart Selman Department of Computer Science Cornell University {gomes,selman}@cs.cornell.edu Abstract Arising from many applications at the intersection of decision-making and machine learning, Marginal Maximum A Posteriori (Marginal MAP) problems unify the two main classes of inference, namely maximization (optimization) and marginal inference (counting), and are believed to have higher complexity than both of them. We propose XOR_MMAP, a novel approach to solve the Marginal MAP problem, which represents the intractable counting subproblem with queries to NP oracles, subject to additional parity constraints. XOR_MMAP provides a constant factor approximation to the Marginal MAP problem, by encoding it as a single optimization in a polynomial size of the original problem. We evaluate our approach in several machine learning and decision-making applications, and show that our approach outperforms several state-of-the-art Marginal MAP solvers. 1 Introduction Typical inference queries to make predictions and learn probabilistic models from data include the maximum a posteriori (MAP) inference task, which computes the most likely assignment of a set of variables, as well as the marginal inference task, which computes the probability of an event according to the model. Another common query is the Marginal MAP (MMAP) problem, which involves both maximization (optimization over a set of variables) and marginal inference (averaging over another set of variables). Marginal MAP problems arise naturally in many machine learning applications. For example, learning latent variable models can be formulated as a MMAP inference problem, where the goal is to optimize over the model’s parameters while marginalizing all the hidden variables. MMAP problems also arise naturally in the context of decision-making under uncertainty, where the goal is to find a decision (optimization) that performs well on average across multiple probabilistic scenarios (averaging). The Marginal MAP problem is known to be NPPP-complete [18], which is commonly believed to be harder than both MAP inference (NP-hard) and marginal inference (#P-complete). As supporting evidence, MMAP problems are NP-hard even on tree structured probabilistic graphical models [13]. Aside from attempts to solve MMAP problems exactly [17, 15, 14, 16], previous approximate approaches fall into two categories, in general. The core idea of approaches in both categories is ∗This research was done when Zhiyuan Li was an exchange student at Cornell University. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. to effectively approximate the intractable marginalization, which often involves averaging over an exponentially large number of scenarios. One class of approaches [13, 11, 19, 12] use variational forms to represent the intractable sum. Then the entire problem can be solved with message passing algorithms, which correspond to searching for the best variational approximation in an iterative manner. As another family of approaches, Sample Average Approximation (SAA) [20, 21] uses a fixed set of samples to represent the intractable sum, which then transforms the entire problem into a restricted optimization, only considering a finite number of samples. Both approaches treat the optimization and marginalizing components separately. However, we will show that by solving these two tasks in an integrated manner, we can obtain significant computational benefits. Ermon et al. [8, 9] recently proposed an alternative approach to approximate intractable counting problems. Their key idea is a mechanism to transform a counting problem into a series of optimization problems, each corresponding to the original problem subject to randomly generated XOR constraints. Based on this mechanism, they developed an algorithm providing a constant-factor approximation to the counting (marginalization) problem. We propose a novel algorithm, called XOR_MMAP, which approximates the intractable sum with a series of optimization problems, which in turn are folded into the global optimization task. Therefore, we effectively reduce the original MMAP inference to a single joint optimization of polynomial size of the original problem. We show that XOR_MMAP provides a constant factor approximation to the Marginal MAP problem. Our approach also provides upper and lower bounds on the final result. The quality of the bounds can be improved incrementally with increased computational effort. We evaluate our algorithm on unweighted SAT instances and on weighted Markov Random Field models, comparing our algorithm with variational methods, as well as sample average approximation. We also show the effectiveness of our algorithm on applications in computer vision with deep neural networks and in computational sustainability. Our sustainability application shows how MMAP problems are also found in scenarios of searching for optimal policy interventions to maximize the outcomes of probabilistic models. As a first example, we consider a network design application to maximize the spread of cascades [20], which include modeling animal movements or information diffusion in social networks. In this setting, the marginals of a probabilistic decision model represent the probabilities for a cascade to reach certain target states (averaging), and the overall network design problem is to make optimal policy interventions on the network structure to maximize the spread of the cascade (optimization). As a second example, in a crowdsourcing domain, probabilistic models are used to model people’s behavior. The organizer would like to find an optimal incentive mechanism (optimization) to steer people’s effort towards crucial tasks, taking into account the probabilistic behavioral model (averaging) [22]. We show that XOR_MMAP is able to find considerably better solutions than those found by previous methods, as well as provide tighter bounds. 2 Preliminaries Problem Definition Let A = {0, 1}m be the set of all possible assignments to binary variables a1, . . . , am and X = {0, 1}n be the set of assignments to binary variables x1, . . . , xn. Let w(x, a) : X × A →R+ be a function that maps every assignment to a non-negative value. Typical queries over a probabilistic model include the maximization task, which requires the computation of maxa∈A w(a), and the marginal inference task P x∈X w(x), which sums over X. Arising naturally from many machine learning applications, the following Marginal Maximum A Posteriori (Marginal MAP) problem is a joint inference task, which combines the two aforementioned inference tasks: max a∈A X x∈X w(x, a). (1) We consider the case where the counting problem P x∈X w(x, a) and the maximization problem maxa∈A #w(a) are defined over sets of exponential size, therefore both are intractable in general. Counting by Hashing and Optimization Our approach is based on a recent theoretical result that transforms a counting problem to a series of optimization problems [8, 9, 2, 1]. A family of functions H = {h : {0, 1}n →{0, 1}k} is said to be pairwise independent if the following two conditions 2 Algorithm 1: XOR_Binary(w : A × X →{0, 1}, a0, k) Sample function hk : X →{0, 1}k from a pair-wise independent function family; Query an NP Oracle on whether W(a0, hk) = {x ∈X : w(a0, x) = 1, hk(x) = 0} is empty; Return true if W(a0, hk) ̸= ∅, otherwise return false. hold for any function h randomly chosen from the family H: (1) ∀x ∈{0, 1}n, the random variable h(x) is uniformly distributed in {0, 1}k and (2) ∀x1, x2 ∈{0, 1}n, x1 ̸= x2, the random variables h(x1) and h(x2) are independent. We sample matrices A ∈{0, 1}k×n and vector b ∈{0, 1}k uniformly at random to form the function family HA,b = {hA,b : hA,b(x) = Ax + b mod 2}. It is possible to show that HA,b is pairwise independent [8, 9]. Notice that in this case, each function hA,b(x) = Ax + b mod 2 corresponds to k parity constraints. One useful way to think about pairwise independent functions is to imagine them as functions that randomly project elements in {0, 1}n into 2k buckets. Define Bh(g) = {x ∈{0, 1}n : hA,b(x) = g} to be a “bucket” that includes all elements in {0, 1}n whose mapped value hA,b(x) is vector g (g ∈{0, 1}k). Intuitively, if we randomly sample a function hA,b from a pairwise independent family, then we get the following: x ∈{0, 1}n has an equal probability to be in any bucket B(g), and the bucket locations of any two different elements x, y are independent. 3 XOR_MMAP Algorithm 3.1 Binary Case We first solve the Marginal MAP problem for the binary case, in which the function w : A × X → {0, 1} outputs either 0 or 1. We will extend the result to the weighted case in the next section. Since a ∈A often represent decision variables when MMAP problems are used in decision making, we call a fixed assignment to vector a = a0 a “solution strategy”. To simplify the notation, we use W(a0) to represent the set {x ∈X : w(a0, x) = 1}, and use W(a0, hk) to represent the set {x ∈X : w(a0, x) = 1 and hk(x) = 0}, in which hk is sampled from a pairwise independent function family that maps X to {0, 1}k. We write #w(a0) as shorthand for the count |{x ∈X : w(a0, x) = 1}| = P x∈X w(a0, x). Our algorithm depends on the following result: Theorem 3.1. (Ermon et. al.[8]) For a fixed solution strategy a0 ∈A, • Suppose #w(a0) ≥2k0, then for any k ≤k0, with probability 1 − 2c (2c−1)2 , Algorithm XOR_Binary(w, a0, k −c)=true. • Suppose #w(a0) < 2k0, then for any k ≥k0, with probability 1 − 2c (2c−1)2 , Algorithm XOR_Binary(w, a0, k + c)=false. To understand Theorem 3.1 intuitively, we can think of hk as a function that maps every element in set W(a0) into 2k buckets. Because hk comes from a pairwise independent function family, each element in W(a0) will have an equal probability to be in any one of the 2k buckets, and the buckets in which any two elements end up are mutually independent. Suppose the count of solutions for a fixed strategy #w(a0) is 2k0, then with high probability, there will be at least one element located in a randomly selected bucket if the number of buckets 2k is less than 2k0. Otherwise, with high probability there will be no element in a randomly selected bucket. Theorem 3.1 provides us with a way to obtain a rough count on #w(a0) via a series of tests on whether W(a0, hk) is empty, subject to extra parity functions hk. This transforms a counting problem to a series of NP queries, which can also be thought of as optimization queries. This transformation is extremely helpful for the Marginal MAP problem. As noted earlier, the main challenge for the marginal MAP problem is the intractable sum embedded in the maximization. Nevertheless, the whole problem can be re-written as a single optimization if the intractable sum can be approximated well by solving an optimization problem over the same domain. We therefore design Algorithm XOR_MMAP, which is able to provide a constant factor approximation to the Marginal MAP problem. The whole algorithm is shown in Algorithm 3. In its main procedure 3 Algorithm 2: XOR_K(w : A × X →{0, 1}, k, T) Sample T pair-wise independent hash functions h(1) k , h(2) k , . . . , h(T ) k : X →{0, 1}k; Query Oracle max a∈A,x(i)∈X T X i=1 w(a, x(i)) s.t. h(i) k (x(i)) = 0, i = 1, . . . , T. (2) Return true if the max value is larger than ⌈T/2⌉, otherwise return false. Algorithm 3: XOR_MMAP(w : A × X → {0, 1},n = log2 |X|,m = log2 |A|,T) k = n; while k > 0 do if XOR_K(w, k, T) then Return 2k; end k ←k −1; end Return 1; XOR_K, the algorithm transforms the Marginal MAP problem into an optimization over the sum of T replicates of the original function w. Here, x(i) ∈X is a replicate of the original x, and w(a, x(i)) is the original function w but takes x(i) as one of the inputs. All replicates share common input a. In addition, each replicate is subject to an independent set of parity constraints on x(i). Theorem 3.2 states that XOR_MMAP provides a constant-factor approximation to the Marginal MAP problem: Theorem 3.2. For T ≥m ln 2+ln(n/δ) α∗(c) , with probability 1 −δ, XOR_MMAP(w, log2 |X|, log2 |A|, T) outputs a 22c-approximation to the Marginal MAP problem: maxa∈A #w(a). α∗(c) is a constant. Let us first understand the theorem in an intuitive way. Without losing generality, suppose the optimal value maxa∈A #w(a) = 2k0. Denote a∗as the optimal solution, ie, #w(a∗) = 2k0. According to Theorem 3.1, the set W(a∗, hk) has a high probability to be non-empty, for any function hk that contains k < k0 parity constraints. In this case, the optimization problem maxx(i)∈X,h(i) k (x(i))=0 w(a∗, x(i)) for one replicate x(i) almost always returns 1. Because h(i) k (i = 1 . . . T) are sampled independently, the sum PT i=1 w(a∗, x(i)) is likely to be larger than ⌈T/2⌉, since each term in the sum is likely to be 1 (under the fixed a∗). Furthermore, since XOR_K maximizes this sum over all possible strategies a ∈A, the sum it finds will be at least as good as the one attained at a∗, which is already over ⌈T/2⌉. Therefore, we conclude that when k < k0, XOR_K will return true with high probability. We can develop similar arguments to conclude that XOR_K will return false with high probability when more than k0 XOR constraints are added. Notice that replications and an additional union bound argument are necessary to establish the probabilistic guarantee in this case. As a counter-example, suppose function w(x, a) = 1 if and only if x = a, otherwise w(x, a) = 0 (m = n in this case). If we set the number of replicates T = 1, then XOR_K will almost always return 1 when k < n, which suggests that there are 2n solutions to the MMAP problem. Nevertheless, in this case the true optimal value of maxx #w(x, a) is 1, which is far away from 2n. This suggests that at least two replicates are needed. Lemma 3.3. For T ≥ln 2·m+ln(n/δ) α∗(c) , procedure XOR_K(w,k) satisfies: • Suppose ∃a∗∈A, s.t. #w(a∗) ≥2k, then with probability 1 − δ n2m , XOR_K(w, k −c, T) returns true. • Suppose ∀a0 ∈A, s.t. #w(a0) < 2k, then with probability 1 −δ n, XOR_K(w, k + c, T) returns false. Proof. Claim 1: If there exists such a∗satisfying #w(a∗) ≥2k, pick a0 = a∗. Let X(i)(a0) = maxx(i)∈X,h(i) k−c(x(i))=0 w(a0, x(i)), for i = 1 . . . , T. From Theorem 3.1, X(i)(a0) = 1 holds with probability 1 − 2c (2c−1)2 . Let α∗(c) = D( 1 2∥ 2c (2c−1)2 ). By Chernoff bound, we have Pr " max a∈A T X i=1 X(i)(a) ≤T/2 # ≤Pr " T X i=1 X(i)(a0) ≤T/2 # ≤e −D( 1 2 ∥ 2c (2c−1)2 )T = e−α∗(c)T , (3) where D 1 2∥ 2c (2c −1)2 = 2 ln(2c −1) −ln 2 −1 2 ln(2c) −1 2 ln((2c −1)2 −2c) ≥( c 2 −2) ln 2. 4 For T ≥ ln 2·m+ln(n/δ) α∗(c) , we have e−α∗(c)T ≤ δ n2m . Thus, with probability 1 − δ n2m , we have max a∈A PT i=1 X(i)(a) > T/2, which implies that XOR_K(w, k −c, T) returns true. Claim 2: The proof is almost the same as Claim 1, except that we need to use a union bound to let the property hold for all a ∈A simultaneously. As a result, the success probability will be 1 −δ n instead of 1 − δ n2m . The proof is left to supplementary materials. Proof. (Theorem 3.2) With probability 1 −n δ n = 1 −δ, the output of n calls of XOR_K(w, k, T) (with different k = 1 . . . n) all satisfy the two claims in Lemma 3.3 simultaneously. Suppose max a∈A #w(a) ∈[2k0, 2k0+1), we have (i) ∀k ≥k0 + c + 1, XOR_K(w, k, T) returns false, (ii) ∀k ≤k0 −c, XOR_K(w, k, T) returns true. Therefore, with probability 1 −δ, the output of XOR_MMAP is guaranteed to be among 2k0−c and 2k0+c. The approximation bound in Theorem 3.2 is a worst-case guarantee. We can obtain a tight bound (e.g. 16-approx) with a large number of T replicates. Nevertheless, we keep a small T, therefore a loose bound, in our experiments, after trading between the formal guarantee and the empirical complexity. In practice, our method performs well, even with loose bounds. Moreover, XOR_K procedures with different input k are not uniformly hard. We therefore can run them in parallel. We can obtain a looser bound at any given time, based on all completed XOR_K procedures. Finally, if we have access to a polynomial approximation algorithm for the optimization problem in XOR_K, we can propagate this bound through the analysis, and again get a guaranteed bound, albeit looser for the MMAP problem. Reduce the Number of Replicates We further develop a few variants of XOR_MMAP in the supplementary materials to reduce the number of replicates, as well as the number of calls to the XOR_K procedure, while preserving the same approximation bound. Implementation We solve the optimization problem in XOR_K using Mixed Integer Programming (MIP). Without losing generality, we assume w(a, x) is an indicator variable, which is 1 iff (a, x) satisfies constraints represented in Conjunctive Normal Form (CNF). We introduce extra variables to represent the sum P i w(a, x(i)) which is left in the supplementary materials. The XORs in Equation 2 are encoded as MIP constraints using the Yannakakis encoding, similar as in [7]. 3.2 Extension to the Weighted Case In this section, we study the more general case, where w(a, x) takes non-negative real numbers instead of integers in {0, 1}. Unlike in [8], we choose to build our proof from the unweighted case because it can effectively avoid modeling the median of an array of numbers [6], which is difficult to encode in integer programming. We noticed recent work [4]. It is related but different from our approach. Let w : A × X →R+, and M = maxa,x w(a, x). Definition 3.4. We define the embedding Sa(w, l) of X in X × {0, 1}l as: Sa(w, l) = (x, y)|∀1 ≤i ≤l, w(a, x) M ≤2i−1 2l ⇒yi = 0 . (4) Lemma 3.5. Let w′ l(a, x, y) be an indicator variable which is 1 if and only if (x, y) is in Sa(w, l), i.e., w′ l(a, x, y) = 1(x,y)∈Sa(w,l). We claim that max a X x w(a, x) ≤M 2l max a X (x,y) w′ l(a, x, y) ≤2 max a X x w(a, x) + M2n−l.2 (5) Proof. Define Sa(w, l, x0) as the set of (x, y) pairs within the set Sa(w, l) and x = x0, ie, Sa(w, l, x0) = {(x, y) ∈Sa(w, l) : x = x0}. It is not hard to see that P (x,y) w′ l(a, x, y) = P x |Sa(w, l, x)|. In the following, first we are going to establish the relationship between |Sa(w, l, x)| and w(a, x). Then we use the result to show the relationship between P x |Sa(w, l, x)| 2 If w satisfy the property that mina,x w(a, x) ≥2−l−1M, we don’t have the M2n−l term. 5 and P x w(x, a). Case (i): If w(a, x) is sandwiched between two exponential levels: M 2l 2i−1 < w(a, x) ≤M 2l 2i for i ∈{0, 1, . . . , l}, according to Definition 3.4, for any (x, y) ∈Sa(w, l, x), we have yi+1 = yi+2 = . . . = yl = 0. This makes |Sa(w, l, x)| = 2i, which further implies that M 2l · |Sa(w, l, x)| 2 < w(a, x) ≤M 2l · |Sa(w, l, x)|, (6) or equivalently, w(a, x) ≤M 2l · |Sa(w, l, x)| < 2w(a, x). (7) Case (ii): If w(a, x) ≤ M 2l+1 , we have |Sa(w, l, x)| = 1. In other words, w(a, x) ≤2w(a, x) ≤2 M 2l+1 |Sa(w, l, x)| = M 2l |Sa(w, l, x)|. (8) Also, M2−l|Sa(w, l, x)| = M2−l ≤2w(a, x) + M2−l. Hence, the following bound holds in both cases (i) and (ii): w(a, x) ≤M 2l |Sa(w, l, x)| ≤2w(a, x) + M2−l. (9) The lemma holds by summing up over X and maximizing over A on all sides of Inequality 9. With the result of Lemma 3.5, we are ready to prove the following approximation result: Theorem 3.6. Suppose there is an algorithm that gives a c-approximation to solve the unweighted problem: maxa P (x,y) w′ l(a, x, y), then we have a 3c-approximation algorithm to solve the weighted Marginal MAP problem maxa P x w(a, x). Proof. Let l = n in Lemma 3.5. By definition M = maxa,x w(a, x) ≤maxa P x w(a, x), we have: max a X x w(a, x) ≤M 2l max a X (x,y) w′ l(a, x, y) ≤2 max a X x w(a, x) + M ≤3 max a X x w(a, x). This is equivalent to: 1 3 · M 2l max a X (x,y) w′ l(a, x, y) ≤max a X x w(a, x) ≤M 2l max a X (x,y) w′ l(a, x, y). 4 Experiments We evaluate our proposed algorithm XOR_MMAP against two baselines – the Sample Average Approximation (SAA) [20] and the Mixed Loopy Belief Propagation (Mixed LBP) [13]. These two baselines are selected to represent the two most widely used classes of methods that approximate the embedded sum in MMAP problems in two different ways. SAA approximates the intractable sum with a finite number of samples, while the Mixed LBP uses a variational approximation. We obtained the Mixed LBP implementation from the author of [13] and we use their default parameter settings. Since Marginal MAP problems are in general very hard and there is currently no exact solver that scales to reasonably large instances, our main comparison is on the relative optimality gap: we first obtain the solution amethod for each approach. Then we compare the difference in objective function log P x∈X w(amethod, x) −log P x∈X w(abest, x), in which abest is the best solution among the three methods. Clearly a better algorithm will find a vector a which yields a larger objective function. The counting problem under a fixed solution a is solved using an exact counter ACE [5], which is only used for comparing the results of different MMAP solvers. Our first experiment is on unweighted random 2-SAT instances. Here, w(a, x) is an indicator variable on whether the 2-SAT instance is satisfiable. The SAT instances have 60 variables, 20 of which are randomly selected to form set A, and the remaining ones form set X. The number of clauses varies from 1 to 70. For a fixed number of clauses, we randomly generate 20 instances, and the left panel of Figure 1 shows the median objective function P x∈X w(amethod, x) of the solutions found by the three approaches. We tune the constants of our XOR_MMAP so it gives a 210 = 1024-approximation (2−5 · sol ≤OPT ≤25 · sol, δ = 10−3). The upper and lower bounds are shown in dashed lines. SAA uses 10,000 samples. On average, the running time of our algorithm is reasonable. When 6 0 10 20 30 40 50 60 70 Number of clauses 0 10 20 30 40 50 log of number of solutions upper bound lower bound MIXED_LBP XOR_MMAP SAA 0 10 20 30 40 50 60 70 Number of clauses 0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 % sol within 1/8 OPT MIXED_LBP XOR_MMAP SAA Figure 1: (Left) On median case, the solutions a0 found by the proposed Algorithm XOR_MMAP have higher objective P x∈X w(a0, x) than the solutions found by SAA and Mixed LBP, on random 2-SAT instances with 60 variables and various number of clauses. Dashed lines represent the proved bounds from XOR_MMAP. (Right) The percentage of instances that each algorithm can find a solution that is at least 1/8 value of the best solutions among 3 algorithms, with different number of clauses. 0.5 1.0 1.5 2.0 2.5 3.0 3.5 Coupling Strength −14 −12 −10 −8 −6 −4 −2 0 log #w(amethod) −log #w(abest) XOR MMAP SAA MIXED LBP 0.5 1.0 1.5 2.0 2.5 3.0 3.5 Coupling Strength −25 −20 −15 −10 −5 0 log #w(amethod) −log #w(abest) XOR MMAP SAA MIXED LBP 0.5 1.0 1.5 2.0 2.5 3.0 3.5 Coupling Strength −50 −40 −30 −20 −10 0 log #w(amethod) −log #w(abest) XOR MMAP SAA MIXED LBP 0.5 1.0 1.5 2.0 2.5 3.0 3.5 Coupling Strength −14 −12 −10 −8 −6 −4 −2 0 log #w(amethod) −log #w(abest) XOR MMAP SAA MIXED LBP 0.5 1.0 1.5 2.0 2.5 3.0 3.5 Coupling Strength −25 −20 −15 −10 −5 0 log #w(amethod) −log #w(abest) XOR MMAP SAA MIXED LBP 0.5 1.0 1.5 2.0 2.5 3.0 3.5 Coupling Strength −50 −40 −30 −20 −10 0 log #w(amethod) −log #w(abest) XOR MMAP SAA MIXED LBP Figure 2: On median case, the solutions a0 found by the proposed Algorithm XOR_MMAP are better than the solutions found by SAA and Mixed LBP, on weighted 12-by-12 Ising models with mixed coupling strength. (Up) Field strength 0.01. (Down) Field strength 0.1. (Left) 20% variables are randomly selected for maximization. (Mid) 50% for maximization. (Right) 80% for maximization. enforcing the 1024-approximation bound, the median time for a single XOR_k procedure is in seconds, although we occasionally have long runs (no more than 30-minute timeout). As we can see from the left panel of Figure 1, both Mixed LBP and SAA match the performance of our proposed XOR_MMAP on easy instances. However, as the number of clauses increases, their performance quickly deteriorates. In fact, for instances with more than 20 (60) clauses, typically the a vectors returned by Mixed LBP (SAA) do not yield non-zero solution values. Therefore we are not able to plot their performance beyond the two values. At the same time, our algorithm XOR_MMAP can still find a vector a yielding over 220 solutions on larger instances with more than 60 clauses, while providing a 1024-approximation. Next, we look at the performance of the three algorithms on weighted instances. Here, we set the number of replicates T = 3 for our algorithm XOR_MMAP, and we repeatedly start the algorithm with an increasing number of XOR constraints k, until it completes for all k or times out in an hour. For SAA, we use 1,000 samples, which is the largest we can use within the memory limit. All algorithms are given a one-hour time and a 4G memory limit. The solutions found by XOR_MMAP are considerably better than the ones found by Mixed LBP and SAA on weighted instances. Figure 2 shows the performance of the three algorithms on 12-by-12 Ising models with mixed coupling strength, different field strengths and number of variables to form set A. All values in the figure are median values across 20 instances (in log10). In all 6 cases in Figure 2, our algorithm XOR_MMAP is the best among the three approximate algorithms. In general, the difference in performance increases as the coupling strength increases. These instances are challenging for the state-of-the-art complete solvers. For example, the state-of-the-art exact solver 7 t=1 t=2 t=T puv u v S T 30 35 40 45 50 55 60 Budgets −30 −25 −20 −15 Log2 Probability SAA XOR_MMAP Figure 3: (Left) The image completion task. Solvers are given digits of the upper part as shown in the first row. Solvers need to complete the digits based on a two-layer deep belief network and the upper part. (2nd Row) completion given by XOR_MMAP. (3rd Row) SAA. (4th Row) Mixed Loopy Belief Propagation. (Middle) Graphical illustration of the network cascade problem. Red circles are nodes to purchase. Lines represent cascade probabilities. See main text. (Right) Our XOR_MMAP performs better than SAA on a set of network cascade benchmarks, with different budgets. AOBB with mini-bucket heuristics and moment matching [14] runs out of 4G memory on 60% of instances with 20% variables randomly selected as max variables. We also notice that the solution found by our XOR_MMAP is already close to the ground-truth. On smaller 10-by-10 Ising models which the exact AOBB solver can complete within the memory limit, the median difference between the log10 count of the solutions found by XOR_MMAP and those found by the exact solver is 0.3, while the differences between the solution values of XOR_MMAP against those of the Mixed BP or SAA are on the order of 10. We also apply the Marginal MAP solver to an image completion task. We first learn a two-layer deep belief network [3, 10] from a 14-by-14 MNIST dataset. Then for a binary image that only contains the upper part of a digit, we ask the solver to complete the lower part, based on the learned model. This is a Marginal MAP task, since one needs to integrate over the states of the hidden variables, and query the most likely states of the lower part of the image. Figure 3 shows the result of a few digits. As we can see, SAA performs poorly. In most cases, it only manages to come up with a light dot for all 10 different digits. Mixed Loopy Belief Propagation and our proposed XOR_MMAP perform well. The good performance of Mixed LBP may be due to the fact that the weights on pairwise factors in the learned deep belief network are not very combinatorial. Finally, we consider an application that applies decision-making into machine learning models. This network design application maximizes the spread of cascades in networks, which is important in the domain of social networks and computational sustainability. In this application, we are given a stochastic graph, in which the source node at time t = 0 is affected. For a node v at time t, it will be affected if one of its ancestor nodes at time t −1 is affected, and the configuration of the edge connecting the two nodes is “on”. An edge connecting node u and v has probability pu,v to be turned on. A node will not be affected if it is not purchased. Our goal is to purchase a set of nodes within a finite budget, so as to maximize the probability that the target node is affected. We refer the reader to [20] for more background knowledge. This application cannot be captured by graphical models due to global constraints. Therefore, we are not able to run mixed LBP on this problem. We consider a set of synthetic networks, and compare the performance of SAA and our XOR_MMAP with different budgets. As we can see from the right panel of Figure 3, the nodes that our XOR_MMAP decides to purchase result in higher probabilities of the target node being affected, compared to SAA. Each dot in the figure is the median value over 30 networks generated in a similar way. 5 Conclusion We propose XOR_MMAP, a novel constant approximation algorithm to solve the Marginal MAP problem. Our approach represents the intractable counting subproblem with queries to NP oracles, subject to additional parity constraints. In our algorithm, the entire problem can be solved by a single optimization. We evaluate our approach on several machine learning and decision-making applications. We are able to show that XOR_MMAP outperforms several state-of-the-art Marginal MAP solvers. XOR_MMAP provides a new angle to solving the Marginal MAP problem, opening the door to new research directions and applications in real world domains. Acknowledgments This research was supported by National Science Foundation (Awards #0832782, 1522054, 1059284, 1649208) and Future of Life Institute (Grant 2015-143902). 8 References [1] Dimitris Achlioptas and Pei Jiang. Stochastic integration via error-correcting codes. In Proc. Uncertainty in Artificial Intelligence, 2015. [2] Vaishak Belle, Guy Van den Broeck, and Andrea Passerini. Hashing-based approximate probabilistic inference in hybrid domains. In Proceedings of the 31st UAI Conference, 2015. [3] Yoshua Bengio, Pascal Lamblin, Dan Popovici, and Hugo Larochelle. Greedy layer-wise training of deep networks. In Advances in Neural Information Processing Systems 19, 2006. [4] Supratik Chakraborty, Dror Fried, Kuldeep S. Meel, and Moshe Y. Vardi. From weighted to unweighted model counting. In Proceedings of the 24th Interational Joint Conference on AI (IJCAI), 2015. [5] Mark Chavira, Adnan Darwiche, and Manfred Jaeger. Compiling relational bayesian networks for exact inference. Int. J. Approx. Reasoning, 2006. [6] Stefano Ermon, Carla P. Gomes, Ashish Sabharwal, and Bart Selman. Embed and project: Discrete sampling with universal hashing. In Advances in Neural Information Processing Systems (NIPS), pages 2085–2093, 2013. [7] Stefano Ermon, Carla P. Gomes, Ashish Sabharwal, and Bart Selman. Optimization with parity constraints: From binary codes to discrete integration. In Proceedings of the Twenty-Ninth Conference on Uncertainty in Artificial Intelligence, UAI, 2013. [8] Stefano Ermon, Carla P. Gomes, Ashish Sabharwal, and Bart Selman. Taming the curse of dimensionality: Discrete integration by hashing and optimization. In Proceedings of the 30th International Conference on Machine Learning, ICML, 2013. [9] Stefano Ermon, Carla P. Gomes, Ashish Sabharwal, and Bart Selman. Low-density parity constraints for hashing-based discrete integration. In Proceedings of the 31th International Conference on Machine Learning, ICML, 2014. [10] Geoffrey Hinton and Ruslan Salakhutdinov. Reducing the dimensionality of data with neural networks. Science, 313(5786):504 – 507, 2006. [11] Jiarong Jiang, Piyush Rai, and Hal Daumé III. Message-passing for approximate MAP inference with latent variables. In Advances in Neural Information Processing Systems 24, 2011. [12] Junkyu Lee, Radu Marinescu, Rina Dechter, and Alexander T. Ihler. From exact to anytime solutions for marginal MAP. In Proceedings of the Thirtieth AAAI Conference on Artificial Intelligence, AAAI, 2016. [13] Qiang Liu and Alexander T. Ihler. Variational algorithms for marginal MAP. Journal of Machine Learning Research, 14, 2013. [14] Radu Marinescu, Rina Dechter, and Alexander Ihler. Pushing forward marginal map with best-first search. In Proceedings of the 24th International Conference on Artificial Intelligence (IJCAI), 2015. [15] Radu Marinescu, Rina Dechter, and Alexander T. Ihler. AND/OR search for marginal MAP. In Proceedings of the Thirtieth Conference on Uncertainty in Artificial Intelligence, UAI, 2014. [16] Denis Deratani Mauá and Cassio Polpo de Campos. Anytime marginal MAP inference. In Proceedings of the 29th International Conference on Machine Learning, ICML, 2012. [17] James D. Park and Adnan Darwiche. Solving map exactly using systematic search. In Proceedings of the Nineteenth Conference on Uncertainty in Artificial Intelligence (UAI), 2003. [18] James D. Park and Adnan Darwiche. Complexity results and approximation strategies for map explanations. J. Artif. Int. Res., 2004. [19] Wei Ping, Qiang Liu, and Alexander T. Ihler. Decomposition bounds for marginal MAP. In Advances in Neural Information Processing Systems 28, 2015. [20] Daniel Sheldon, Bistra N. Dilkina, Adam N. Elmachtoub, Ryan Finseth, Ashish Sabharwal, Jon Conrad, Carla P. Gomes, David B. Shmoys, William Allen, Ole Amundsen, and William Vaughan. Maximizing the spread of cascades using network design. In UAI, 2010. [21] Shan Xue, Alan Fern, and Daniel Sheldon. Scheduling conservation designs for maximum flexibility via network cascade optimization. J. Artif. Intell. Res. (JAIR), 2015. [22] Yexiang Xue, Ian Davies, Daniel Fink, Christopher Wood, and Carla P. Gomes. Avicaching: A two stage game for bias reduction in citizen science. In Proceedings of the 15th International Conference on Autonomous Agents and Multiagent Systems (AAMAS), 2016. 9 | 2016 | 382 |
6,308 | Differential Privacy without Sensitivity Kentaro Minami The University of Tokyo kentaro minami@mist.i.u-tokyo.ac.jp Hiromi Arai The University of Tokyo arai@dl.itc.u-tokyo.ac.jp Issei Sato The University of Tokyo sato@k.u-tokyo.ac.jp Hiroshi Nakagawa The University of Tokyo nakagawa@dl.itc.u-tokyo.ac.jp Abstract The exponential mechanism is a general method to construct a randomized estimator that satisfies (ε, 0)-differential privacy. Recently, Wang et al. showed that the Gibbs posterior, which is a data-dependent probability distribution that contains the Bayesian posterior, is essentially equivalent to the exponential mechanism under certain boundedness conditions on the loss function. While the exponential mechanism provides a way to build an (ε, 0)-differential private algorithm, it requires boundedness of the loss function, which is quite stringent for some learning problems. In this paper, we focus on (ε, δ)-differential privacy of Gibbs posteriors with convex and Lipschitz loss functions. Our result extends the classical exponential mechanism, allowing the loss functions to have an unbounded sensitivity. 1 Introduction Differential privacy is a notion of privacy that provides a statistical measure of privacy protection for randomized statistics. In the field of privacy-preserving learning, constructing estimators that satisfy (ε, δ)-differential privacy is a fundamental problem. In recent years, differentially private algorithms for various statistical learning problems have been developed [8, 14, 3]. Usually, the estimator construction procedure in statistical learning contains the following minimization problem of a data-dependent function. Given a dataset Dn = {x1, . . . , xn}, a statistician chooses a parameter θ that minimizes a cost function L(θ, Dn). A typical example of cost function is the empirical risk function, that is, a sum of loss function ℓ(θ, xi) evaluated at each sample point xi ∈Dn. For example, the maximum likelihood estimator (MLE) is given by the minimizer of empirical risk with loss function ℓ(θ, x) = −log p(x | θ). To achieve a differentially private estimator, one natural idea is to construct an algorithm based on a posterior sampling, namely drawing a sample from a certain data-dependent probability distribution. The exponential mechanism [16], which can be regarded as a posterior sampling, provides a general method to construct a randomized estimator that satisfies (ε, 0)-differential privacy. The probability density of the output of the exponential mechanism is proportional to exp(−βL(θ, Dn))π(θ), where π(θ) is an arbitrary prior density function, and β > 0 is a parameter that controls the degree of concentration. The resulting distribution is highly concentrated around the minimizer θ∗∈argminθ L(θ, Dn). Note that most differential private algorithms involve a procedure to add some noise (e.g. the Laplace mechanism [12], objective perturbation [8, 14], and gradient perturbation [3]), while the posterior sampling explicitly designs the density of the output distribution. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. θ Loss ℓ(θ, x−) ℓ(θ, x+) θ Difference θ Loss gradient |∇ℓ(θ, x−)| |∇ℓ(θ, x+)| Figure 1: An example of a logistic loss function ℓ(θ, x) := log(1+exp(−yθ⊤z)). Considering two points x± = (z, ±1), the difference of the loss |ℓ(θ, x+) −ℓ(θ, x−)| increases proportionally to the size of the parameter space (solid lines). In this case, the value of the β in the exponential mechanism, which is inversely proportional to the maximum difference of the loss function, becomes very small. On the other hand, the difference of the gradient |∇ℓ(θ, x+) −∇ℓ(θ, x−)| does not exceed twice of the Lipschitz constant (dashed lines). Hence, our analysis based on Lipschitz property does not be influenced by the size of the parameter space. Table 1: Regularity conditions for (ε, δ)-differential privacy of the Gibbs posterior. Instead of the boundedness of the loss function, our analysis in Theorem 7 requires its Lipschitz property and convexity. Unlike the classical exponential mechanism, our result explains “shrinkage effect” or “contraction effect”, namely, the upper bound for β depends on the concavity of the prior π and the size of the dataset n. (ε, δ) Loss function ℓ Prior π Shrinkage Exponential mechanism [16] δ = 0 Bounded sensitivity Arbitrary No Theorem 7 δ > 0 Lipschitz and convex Log-concave Yes Theorem 10 δ > 0 Bounded, Lipschitz and strongly convex Log-concave Yes We define the density of the Gibbs posterior distribution as Gβ(θ | Dn) := exp(−β Pn i=1 ℓ(θ, xi))π(θ) R exp(−β Pn i=1 ℓ(θ, xi))π(θ)dθ. (1) The Gibbs posterior plays important roles in several learning problems, especially in PAC-Bayesian learning theory [6, 21]. In the context of differential privacy, Wang et al. [20] recently pointed out that the Bayesian posterior, which is a special version of (1) with β = 1 and a specific loss function, satisfies (ε, 0)-differential privacy because it is equivalent to the exponential mechanism under a certain regularity condition. Bassily, et al. [3] studied an application of the exponential mechanism to private convex optimization. In this paper, we study the (ε, δ)-differential privacy of the posterior sampling with δ > 0. In particular, we consider the following statement. Claim 1. Under a suitable condition on loss function ℓand prior π, there exists an upper bound B(ε, δ) > 0, and the Gibbs posterior Gβ(θ | Dn) with β ≤B(ε, δ) satisfies (ε, δ)-differential privacy. The value of B(ε, δ) does not depend on the boundedness of the loss function. 2 We point out here the analyses of (ε, 0)-differential privacy and (ε, δ)-differential privacy with δ > 0 are conceptually different in the regularity conditions they require. On one hand, the exponential mechanism essentially requires the boundedness of the loss function to satisfy (ε, 0)-differential privacy. On the other hand, the boundedness is not a necessary condition in (ε, δ)-differential privacy. In this paper, we give a new sufficient condition for (ε, δ)-differential privacy based on the convexity and the Lipschitz property. Our analysis widens the application ranges of the exponential mechanism in the following aspects (See also Table 1). • (Removal of boundedness assumption) If the loss function is unbounded, which is usually the case when the parameter space is unbounded, the Gibbs posterior does not satisfy (ε, 0)differential privacy in general. Still, in some cases, we can build an (ε, δ)-differential private estimator. • (Tighter evaluation of β) Even when the difference of the loss function is bounded, our analysis can yield a better scheme in determining the appropriate value of β for a given privacy level. Figure 1 shows an example of logistic loss. • (Shrinkage and contraction effect) Intuitively speaking, the Gibbs posterior becomes robust against a small change of the dataset, if the prior π has a strong shrinkage effect (e.g. a Gaussian prior with a small variance), or if the size of the dataset n tends to infinity. In our analysis, the upper bound of β depends on π and n, which explains such shrinkage and contraction effects. 1.1 Related work (ε, δ)-differential privacy of Gibbs posteriors has been studied by several authors. Mir ([18], Chapter 5) proved that a Gaussian posterior in a specific problem satisfies (ε, δ)-differential privacy. Dimitrakakis et al. [10] considered Lipschitz-type sufficient conditions, yet their result requires some modification of the definition of the neighborhood on the database. In general, the utility of sensitivity-based methods suffers from the size of the parameter space Θ. Thus, getting around the dependency on the size of Θ is a fundamental problem in the study of differential privacy. For discrete parameter spaces, a general range-independent algorithm for (ε, δ)-differential private maximization was developed in [7]. 1.2 Notations The set of all probability measures on a measurable space (Θ, T ) is denoted by M1 +(Θ). A map between two metric spaces f : (X, dX) →(Y, dY ) is said to be L-Lipschitz, if dY (f(x1), f(x2)) ≤ LdX(x1, x2) holds for all x1, x2 ∈X. Let f be a twice continuously differentiable function f defined on a subset of Rd. f is said to be m(> 0)-strongly convex, if the eigenvalues of its Hessian ∇2f are bounded by m from below. f is said to be M-smooth, 2 Differential privacy with sensitivity In this section, we review the definition of (ε, δ)-differential privacy and the exponential mechanism. 2.1 Differential privacy Differential privacy is a notion of privacy that provides a degree of privacy protection in a statistical sense. More precisely, differential privacy defines a closeness between any two output distributions that correspond to adjacent datasets. In this paper, we assume that a dataset D = Dn = (x1, . . . , xn) is a vector that consists of n points in abstract attribute space X, where each entry xi ∈X represents information contributed by one individual. Two datasets D, D′ are said to be adjacent if dH(D, D′) = 1, where dH is the Hamming distance defined on the space of all possible datasets X d. We describe the definition of differential privacy in terms of randomized estimators. A randomized estimator is a map ρ : X n →M1 +(Θ) from the space of datasets to the space of probability measures. 3 Definition 2 (Differential privacy). Let ε > 0 and δ ≥0 be given privacy parameters. We say that a randomized estimator ρ : X n →M1 +(Θ) satisfies (ε, δ)-differential privacy, if for any adjacent datasets D, D′ ∈X n, an inequality ρD(A) ≤eερD′(A) + δ (2) holds for every measurable set A ⊂Θ. 2.2 The exponential mechanism The exponential mechanism [16] is a general construction of (ε, 0)-differentially private distributions. For an arbitrary function L : Θ × X n →R, we define the sensitivity by ∆L := sup D,D′∈X n: dH(D,D′)=1 sup θ∈Θ |L(θ, D) −L(θ, D′)|, (3) which is the largest possible difference of two adjacent functions f(·, D) and f(·, D′) with respect to supremum norm. Theorem 3 (McSherry and Talwar). Suppose that the sensitivity of the function L(θ, Dn) is finite. Let π be an arbitrary base measure on Θ. Take a positive number β so that β ≤ε/2∆L. Then a probability distribution whose density with respect to π is proportional to exp(−βL(θ, Dn)) satisfies (ε, 0)-differential privacy. We consider the particular case that the cost function is given as sum form L(θ, Dn) = Pn i=1 ℓ(θ, xi). Recently, Wang et al. [20] examined two typical cases in which ∆L is finite. The following statement slightly generalizes their result. Theorem 4 (Wang, et al.). (a) Suppose that the loss function ℓis bounded by A, namely |ℓ(θ, x)| ≤ A holds for all x ∈X and θ ∈Θ. Then ∆L ≤2A, and the Gibbs posterior (1) satisfies (4βA, 0)differential privacy. (b) Suppose that for any fixed θ ∈Θ, the difference |ℓ(θ, x1) −ℓ(θ, x2)| is bounded by L for all x1, x2 ∈X. Then ∆L ≤L, and the Gibbs posterior (1) satisfies (2βL, 0)-differential privacy. The condition ∆L < ∞is crucial for Theorem 3 and cannot be removed. However, in practice, statistical models of interest do not necessarily satisfy such boundedness conditions. Here we have two simple examples of Gaussian and Bernoulli mean estimation problems, in which the sensitivities are unbounded. • (Bernoulli mean) Let ℓ(p, x) = −x log p−(1−x) log(1−p) (p ∈(0, 1), x ∈{0, 1}) be the negative log-likelihood of the Bernoulli distribution. Then |ℓ(p, 0) −ℓ(p, 1)| is unbounded. • (Gaussian mean) Let ℓ(θ, x) = 1 2(θ −x)2 (θ ∈R, x ∈R) be the negative log-likelihood of the Gaussian distribution with a unit variance. Then |ℓ(θ, x) −ℓ(θ, x′)| is unbounded if x ̸= x′. Thus, in the next section, we will consider an alternative proof technique for (ε, δ)-differential privacy so that it does not require such boundedness conditions. 3 Differential privacy without sensitivity In this section, we state our main results for (ε, δ)-differential privacy in the form of Claim 1. There is a well-known sufficient condition for the (ε, δ)-differential privacy: Theorem 5 (See for example Lemma 2 of [13]). Let ε > 0 and δ > 0 be privacy parameters. Suppose that a randomized estimator ρ : X n →M1 +(Θ) satisfies a tail-bound inequality of logdensity ratio ρD log dρD dρD′ ≥ε ≤δ (4) for every adjacent pair of datasets D, D′. Then ρ satisfies (ε, δ)-differential privacy. 4 To control the tail behavior (4) of the log-density ratio function log dρD dρD′ , we consider the concentration around its expectation. Roughly speaking, inequality (4) holds if there exists an increasing function α(t) that satisfies an inequality ∀t > 0, ρD log dρD dρD′ ≥DKL(ρD, ρD′) + t ≤exp(−α(t)), (5) where log dGβ,D dGβ,D′ is the log-density ratio function, and DKL(ρD, ρD′) := EρD log dρD dρD′ is the Kullback-Leibler (KL) divergence. Suppose that the Gibbs posterior Gβ,D, whose density G(θ | D) is defined by (1), satisfies an inequality (5) for a certain α(t) = α(t, β). Then Gβ,D satisfies (4) if there exist β, t > 0 that satisfy the following two conditions. 1. KL-divergence bound: DKL(Gβ,D, Gβ,D′) + t ≤ε 2. Tail-probability bound: exp(−α(t, β)) ≤δ 3.1 Convex and Lipschitz loss Here, we examine the case in which the loss function ℓis Lipschitz and convex, and the parameter space Θ is the entire Euclidean space Rd. Due to the unboundedness of the domain, the sensitivity ∆L can be infinite, in which case the exponential mechanism cannot be applied. Assumption 6. (i) Θ = Rd. (ii) For any x ∈X, ℓ(·, x) is non-negative, L-Lipschitz and convex. (iii) −log π(·) is twice differentiable and mπ-strongly convex. In Assumption 6, the loss function ℓ(·, x) and the difference |ℓ(·, x1) −ℓ(·, x2)| can be unbounded. Thus, the classical argument of the exponential mechanism in Section 2.2 cannot be applied. Nevertheless, our analysis shows that the Gibbs posterior satisfies (ε, δ)-differential privacy. Theorem 7. Let β ∈(0, 1] be a fixed parameter, and D, D′ ∈X n be an adjacent pair of datasets. Under Assumption 6, inequality Gβ,D log dGβ,D dGβ,D′ ≥ε ≤exp −mπ 8L2β2 ε −2L2β2 mπ 2! (6) holds for any ε > 2L2β2 mπ . Gibbs posterior Gβ,D satisfies (ε, δ)-differential privacy if β > 0 is taken so that the right-hand side of (6) is bounded by δ. It is elementary to check the following statement: Corollary 8. Let ε > 0 and 0 < δ < 1 be privacy parameters. Taking β so that it satisfies β ≤ε 2L r mπ 1 + 2 log(1/δ), (7) Gibbs posterior Gβ,D satisfies (ε, δ)-differential privacy. Note that the right-hand side of (6) depends on the strong concavity mπ. The strong concavity parameter corresponds to the precision (i.e. inverse variance) of the Gaussian, and a distribution with large mπ becomes spiky. Intuitively, if we use a prior that has a strong shrinkage effect, then the posterior becomes robust against a small change of the dataset, and consequently the differential privacy can be satisfied with a little effort. This observation is justified in the following sense: the upper bound of β grows proportionally to √mπ. In contrast, the classical exponential mechanism does not have that kind of prior-dependency. 3.2 Strongly convex loss Let ˜ℓbe a strongly convex function defined on the entire Euclidean space Rd. If ℓis a restriction of ˜ℓto a compact L2-ball, the Gibbs posterior can satisfy (ε, 0)-differential privacy with a certain privacy level ε > 0 because of the boundedness of ℓ. However, using the boundedness of ∇ℓrather than that of ℓitself, we can give another guarantee for (ε, δ)-differential privacy. 5 Assumption 9. Suppose that a function ˜ℓ: Rd × X →R is a twice differentiable and mℓ-strongly convex with respect to its first argument. Let ˜π be a finite measure over Rd that −log ˜π(·) is twice differentiable and mπ-strongly convex. Let ˜Gβ,D is a Gibbs posterior on Rd whose density with respect to the Lebesgue measure is proportional to exp(−β P i ˜ℓ(θ, xi))˜π(θ). Assume that the mean of ˜Gβ,D is contained in a L2-ball of radius κ: ∀D ∈X n,
E ˜ Gβ,D[θ]
2 ≤κ. (8) Define a positive number α > 1. Assume that (Θ, ℓ, π) satisfies the following conditions. (i) Θ is a compact L2-ball centered at the origin, and its radius RΘ satisfies RΘ ≤κ + α p d/mπ. (ii) For any x ∈ X, ℓ(·, x) is L-Lipschitz, and convex. In other words, L := supx∈X supθ∈Θ ∥∇θℓ(θ, x)∥2 is bounded. (iii) π is given by a restriction of ˜π to Θ. The following statements are the counterparts of Theorem 7 and its corollary. Theorem 10. Let β ∈(0, 1] be a fixed parameter, and D, D′ ∈X n be an adjacent pair of datasets. Under Assumption 9, inequality Gβ,D log dGβ,D dGβ,D′ ≥ε ≤exp −nmℓβ + mπ 4C′β2 ε − C′β2 nmℓβ + mπ 2! (9) holds for any ε > C′β2 nmℓβ+mπ . Here, we defined C′ := 2CL2(1 + log(α2/(α2 −1))), where C > 0 is a universal constant that does not depend on any other quantities. Corollary 11. Under Assumption 9, there exists an upper bound B(ε, δ) = B(ε, δ, n, mℓ, mπ, α) > 0, and Gβ(θ | Dn) with β ≤B(ε, δ) satisfies (ε, δ)-differential privacy. Similar to Corollary 8, the upper bound on β depends on the prior. Moreover, the right-hand side of (9) decreases to 0 as the size of dataset n increases, which implies that (ε, δ)-differential privacy is satisfied almost for free if the size of the dataset is large. 3.3 Example: Logistic regression In this section, we provide an application of Theorem 7 to the problem of linear binary classification. Let Z := {z ∈Rd, ∥z∥2 ≤r} be a space of the input variables. The space of the observation is the set of input variables equipped with binary label X := {x = (z, y) ∈Z ×{−1, +1}}. The problem is to determine a parameter θ = (a, b) of linear classifier fθ(z) = sgn(a⊤z + b). Define a loss function ℓLR by ℓLR(θ, x) := log(1 + exp(−y(a⊤z + b))). (10) The ℓ2-regularized logistic regression estimator is given by ˆθLR = argmin θ∈Rd+1 ( 1 n n X i=1 ℓLR(θ, xi) + λ 2 ∥θ∥2 2 ) , (11) where λ > 0 is a regularization parameter. Corresponding Gibbs posterior has a density Gβ(θ | D) ∝ n Y i=1 σ(yi(a⊤zi + b))βφd+1(θ | 0, (nλ)−1I), (12) where σ(u) = (1 + exp(−u))−1 is a sigmoid function, and φd+1(θ | µ, Σ) is a density of (d + 1)dimensional Gaussian distribution. It is easy to check that ℓLR(·,x) is r-Lipschitz and convex, and −log φd+1(· | 0, (nλ−1)I) is (nλ)-strongly convex. Hence, by Corollary 8, the Gibbs posterior satisfies (ε, δ)-differential privacy if β ≤ε 2r s nλ 1 + 2 log(1/δ). (13) 6 4 Approximation Arguments In practice, exact samplers of Gibbs posteriors (1) are rarely available. Actual implementations involve some approximation processes. Markov Chain Monte Carlo (MCMC) methods and Variational Bayes (VB) [1] are commonly used to obtain approximate samplers of Gibbs posteriors. The next proposition, which is easily obtained as a variant of Proposition 3 of [20], gives a differential privacy guarantee under approximation. Proposition 12. Let ρ : X n →M1 +(Θ) be a randomized estimator that satisfies (ε, δ)-differential privacy. If for all D, there exist approximate sampling procedure ρ′ D such that dTV(ρD, ρ′ D) ≤γ, then the randomized mechanism D 7→ρ′ D satisfies (εδ + (1 + eε)γ)-differential privacy. Here, dTV(µ, ν) = supA∈T |µ(A) −ν(A)| is the total variation distance. We now describe a concrete example of MCMC, the Langevin Monte Carlo (LMC). Let θ(0) ∈Rd be an initial point of the Markov chain. The LMC algorithm for Gibbs posterior Gβ,D contains the following iterations: θ(t+1) = θ(t) −h∇U(θ(t)) + √ 2hη(t+1) (14) U(θ) = β n X i=1 ℓ(θ, xi) −log π(θ). (15) Here η(1), η(2), . . . ∈Rd are noise vectors independently drawn from a centered Gaussian N(0, I). This algorithm can be regarded as a discretization of a stochastic differential equation that has a stationary distribution Gβ,D, and its convergence property has been studied in finite-time sense [9, 5, 11]. Let us denote by ρ(t) the law of θ(t). If dTV(ρ(t), Gβ,D) ≤γ holds for all t ≥T, then the privacy of the LMC sampler is obtained from Proposition 12. In fact, we can prove by Corollary 1 of [9] the following proposition. Proposition 13. Assume that Assumption 6 holds. Let ℓ(θ, x) be Mℓ-smooth for all x ∈X, and −log π(θ) be Mπ-smooth. Let d ≥2 and γ ∈(0, 1/2). We can choose β > 0, by Corollary 8, so that Gβ,D satisfies (ε, δ)-differential privacy. Let us set step size h of the LMC algorithm (14) as h = 2mπγ2 d(nβMℓ+ Mπ)2 h 4 log 1 γ + d log nβMℓ+Mπ mπ i, (16) and set T as T = d(nβMℓ+ Mπ)2 4mπγ2 4 log 1 γ + d log nβMℓ+ Mπ mπ 2 . (17) Then, after T iterations of (14), θ(T ) satisfies (ε, δ + (1 + eε)γ)-differential privacy. The algorithm suggested in Proposition 13 is closely related to the differentially private stochastic gradient Langevin dynamics (DP-SGLD) proposed by Wang, et al. [20]. Ignoring the computational cost, we can take the approximation error level γ > 0 arbitrarily small, while the convergence property to the target posterior distribution is not necessarily ensured about DP-SGLD. 5 Proofs In this section, we give a formal proof of Theorem 7 and a proof sketch of 10. There is a vast literature on techniques to obtain a concentration inequality in (5) (see, for example, [4]). Logarithmic Sobolev inequality (LSI) is a useful tool for this purpose. We say that a probability measure µ over Θ ⊂Rd satisfies LSI with constant DLS if inequality Eµ[f 2 log f 2] −Eµ[f 2] log Eµ[f 2] ≤2DLSEµ ∥∇f∥2 2 (18) holds for any integrable function f, provided the expectations in the expression are defined. It is known that [15, 4], if µ satisfies LSI, then every real-valued L-Lipschitz function F behaves in a sub-Gaussian manner: µ{F ≥Eµ[F] + t} ≤exp − t2 2L2DLS . (19) 7 In our analysis, we utilize the LSI technique for the following two reasons: (a) a sub-Gaussian tail bound of the log-density ratio is obtained from (19), and (b) an upper bound on the KL-divergence is directly obtained from LSI, which appears to be difficult to prove by any other argument. Roughly speaking, LSI holds if the logarithm of the density is strongly concave. In particular, for a Gibbs measure on Rd, the following fact is known. Lemma 14 ([15]). Let U : Rd →R be a twice differential, m-strongly convex and integrable function. Let µ be a probability measure on Rd whose density is proportional to exp(−U). Then µ satisfies LSI (18) with constant DLS = m−1. In this context, the strong convexity of U is related to the curvature-dimension condition CD(m, ∞), which can be used to prove LSI on general Riemannian manifolds [19, 2]. Proof of Theorem 7. For simplicity, we assume that ℓ(·, x) (∀x ∈X) is twice differentiable. For general Lipschitz and convex loss functions (e.g. hinge loss), the theorem can be proved using a mollifier argument. Since U(·) = β P i ℓ(·, xi) −log π(·) is mπ-strongly convex, Gibbs posterior Gβ,D satisfies LSI with constant m−1 π . Let D, D′ ∈X n be a pair of adjacent datasets. Considering appropriate permutation of the elements, we can assume that D = (x1, . . . , xn) and D′ = (x′ 1, . . . , x′ n) differ in the first element, namely, x1 ̸= x′ 1 and xi = x′ i (i = 2, . . . , n). By the assumption that ℓ(·, x) is L-Lipschitz, we have
∇log dGβ,D dGβ,D′
2 = β∥∇(ℓ(θ, x1) −ℓ(θ, x′ 1))∥2 ≤2βL, (20) and log-density ratio log dGβ,D dGβ,D′ is 2βL-Lipschitz. Then, by concentration inequality for Lipschitz function (19), we have ∀t > 0, Gβ,D log dGβ,D dGβ,D′ ≥DKL(Gβ,D, Gβ,D′) + t ≤exp −mπt2 8L2β2 (21) We will show an upper bound of the KL-divergence. To simplify the notation, we will write F := dGβ,D dGβ,D′ . Noting that ∥∇ √ F∥2 2 = ∥∇exp(2−1 log F)∥2 2 = ∥ √ F 2 ∇log F∥2 2 ≤F 4 · (2βL)2 (22) and that DKL(Gβ,D, Gβ,D′) = EGβ,D[log F] = EGβ,D′ [F log F] −EGβ,D′ [F]EGβ,D′ [log F], (23) we have, from LSI (18) with f = √ F, DKL(Gβ,D, Gβ,D′) ≤ 2 mπ EGβ,D′ ∥∇ √ F∥2 2 ≤2L2β2 mπ EGβ,D′ [F] = 2L2β2 mπ . (24) Combining (21) and (24), we have Gβ,D log dGβ,D dGβ,D′ ≥ε ≤Gβ,D log dGβ,D dGβ,D′ ≥ε + DKL(Gβ,D, Gβ,D′) −2L2β2 mπ ≤exp −mπ 8L2β2 ε −2L2β2 mπ 2! (25) for any ε > 2L2β2 mπ . Proof sketch for Theorem 10. The proof is almost the same as that of Theorem 7. It is sufficient to show that the set of Gibbs posteriors {Gβ,D, D ∈X n} simultaneously satisfies LSI with the same constant. Since the logarithm of the density is m := (nmℓβ + mπ)-strongly convex, a probability measure ˜Gβ,D satisfies LSI with constant m−1. By the Poincar´e inequality for ˜Gβ,D, the variance of ∥θ∥2 is bounded by d/m ≤d/mπ. By the Chebyshev inequality, we can check that the mass of parameter space is lower-bounded as ˜Gβ,D(Θ) ≥p := 1 −α−2. Then, by Corollary 3.9 of [17], Gβ,D := ˜Gβ,D|Θ satisfies LSI with constant C(1 + log p−1)m−1, where C > 0 is a universal numeric constant. 8 Acknowledgments This work was supported by JSPS KAKENHI Grant Number JP15H02700. References [1] P. Alquier, J. Ridgway, and N. Chopin. On the properties of variational approximations of Gibbs posteriors, 2015. Available at http://arxiv.org/abs/1506.04091. [2] D. Bakry, I. Gentil, and M. Ledoux. Analysis and Geometry of Markov Diffusion Operators. Springer, 2014. [3] R. Bassily, A. Smith, and A. Thakurta. Differentially private empirical risk minimization: Efficient algorithms and tight error bounds. In FOCS, 2014. [4] S. Boucheron, G. Lugosi, and P. Massart. Concentration Inequalities: A Nonasymptotic Theory of Independence. Oxford University Press, 2013. [5] S. Bubeck, R. Eldan, and J. Lehec. Finite-time analysis of projected Langevin Monte Carlo. In NIPS, 2015. [6] O. Catoni. Pac-Bayesian Supervised Classification: The Thermodynamics of Statistical Learning. IMS, 2007. [7] K. Chaudhuri, D. Hsu, and S. Song. The large margin mechanism for differentially private maximization. In NIPS, 2014. [8] K. Chaudhuri, C. Monteleoni, and A.D. Sarwate. Differentially private empirical risk minimization. Journal of Machine Learning Research, 12:1069–1109, 2011. [9] A. Dalalyan. Theoretical guarantees for approximate sampling from smooth and log-concave densities, 2014. Available at http://arxiv.org/abs/1412.7392. [10] C. Dimitrakakis, B. Nelson, and B. Rubinstein. Robust and private Bayesian inference. In Algorithmic Learning Theory, 2014. [11] A. Durmus and E. Moulines. Non-asymptotic convergence analysis for the unadjusted langevin algorithm, 2015. Available at http://arxiv.org/abs/1507.05021. [12] C. Dwork. Differential privacy. In ICALP, pages 1–12, 2006. [13] R. Hall, A. Rinaldo, and L. Wasserman. Differential privacy for functions and functional data. Journal of Machine Learning Research, 14:703–727, 2013. [14] D. Kifer, A. Smith, and A. Thakurta. Private convex empirical risk minimization and highdimensional regression. In COLT, 2012. [15] M. Ledoux. Concentration of Measure and Logarithmic Sobolev Inequalities, volume 1709 of S´eminaire de Probabilit´es XXXIII Lecture Notes in Mathematics. Springer, 1999. [16] F. McSherry and K. Talwar. Mechanism design via differential privacy. In FOCS, 2007. [17] E. Milman. Properties of isoperimetric, functional and Transport-Entropy inequalities via concentration. Probability Theory and Related Fields, 152:475–507, 2012. [18] D. Mir. Differential privacy: an exploration of the privacy-utility landscape. PhD thesis, Rutgers University, 2013. [19] C. Villani. Optimal Transport: Old and New. Springer, 2009. [20] Y. Wang, S. Fienberg, and A. Smola. Privacy for free: Posterior sampling and stochastic gradient monte carlo. In ICML, 2015. [21] T. Zhang. From ε-entropy to KL-entropy: Analysis of minimum information complexity density estimation. The Annals of Statistics, 34(5):2180–2210, 2006. 9 | 2016 | 383 |
6,309 | Adaptive Smoothed Online Multi-Task Learning Keerthiram Murugesan∗ Carnegie Mellon University kmuruges@cs.cmu.edu Hanxiao Liu∗ Carnegie Mellon University hanxiaol@cs.cmu.edu Jaime Carbonell Carnegie Mellon University jgc@cs.cmu.edu Yiming Yang Carnegie Mellon University yiming@cs.cmu.edu Abstract This paper addresses the challenge of jointly learning both the per-task model parameters and the inter-task relationships in a multi-task online learning setting. The proposed algorithm features probabilistic interpretation, efficient updating rules and flexible modulation on whether learners focus on their specific task or on jointly address all tasks. The paper also proves a sub-linear regret bound as compared to the best linear predictor in hindsight. Experiments over three multitask learning benchmark datasets show advantageous performance of the proposed approach over several state-of-the-art online multi-task learning baselines. 1 Introduction The power of joint learning in multiple tasks arises from the transfer of relevant knowledge across said tasks, especially from information-rich tasks to information-poor ones. Instead of learning individual models, multi-task methods leverage the relationships between tasks to jointly build a better model for each task. Most existing work in multi-task learning focuses on how to take advantage of these task relationships, either to share data directly [1] or to learn model parameters via cross-task regularization techniques [2, 3, 4]. In a broad sense, there are two settings to learn these task relationships 1) batch learning, in which an entire training set is available to the learner 2) online learning, in which the learner sees the data in a sequential fashion. In recent years, online multi-task learning has attracted extensive research attention [5, 6, 7, 8, 9]. Following the online setting, particularly from [6, 7], at each round t, the learner receives a set of K observations from K tasks and predicts the output label for each of these observations. Subsequently, the learner receives the true labels and updates the model(s) as necessary. This sequence is repeated over the entire data, simulating a data stream. Our approach follows an error-driven update rule in which the model for a given task is updated only when the prediction for that task is in error. The goal of an online learner is to minimize errors compared to the full hindsight learner. The key challenge in online learning with large number of tasks is to adaptively learn the model parameters and the task relationships, which potentially change over time. Without manageable efficient updates at each round, learning the task relationship matrix automatically may impose a severe computational burden. In other words, we need to make predictions and update the models in an efficient real time manner. We propose an online learning framework that efficiently learns multiple related tasks by estimating the task relationship matrix from the data, along with the model parameters for each task. We learn the model for each task by sharing data from related task directly. Our model provides a natural way to specify the trade-off between learning the hypothesis from each task’s own (possibly quite ∗Both student authors contributed equally. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. limited) data and data from multiple related tasks. We propose an iterative algorithm to learn the task parameters and the task-relationship matrix alternatively. We first describe our proposed approach under a batch setting and then extend it to the online learning paradigm. In addition, we provide a theoretical analysis for our online algorithm and show that it can achieve a sub-linear regret compared to the best linear predictor in hindsight. We evaluate our model with several state-of-the-art online learning algorithms for multiple tasks. There are many useful application areas for online multi-task learning, including optimizing financial trading, email prioritization, personalized news, and spam filtering. Consider the latter, where some spam is universal to all users (e.g. financial scams), some messages might be useful to certain affinity groups, but spam to most others (e.g. announcements of meditation classes or other special interest activities), and some may depend on evolving user interests. In spam filtering each user is a task, and shared interests and dis-interests formulate the inter-task relationship matrix. If we can learn the matrix as well as improving models from specific spam/not-spam decisions, we can perform mass customization of spam filtering, borrowing from spam/not-spam feedback from users with similar preferences. The primary contribution of this paper is precisely the joint learning of inter-task relationships and its use in estimating per-task model parameters in an online setting. 1.1 Related Work While there is considerable literature in online multi-task learning, many crucial aspects remain largely unexplored. Most existing work in online multi-task learning focuses on how to take advantage of task relationships. To achieve this, Lugosi et. al [7] imposed a hard constraint on the K simultaneous actions taken by the learner in the expert setting, Agarwal et. al [10] used matrix regularization, and Dekel et. al [6] proposed a global loss function, as an absolute norm, to tie together the loss values of the individual tasks. Different from existing online multi-task learning models, our paper proposes an intuitive and efficient way to learn the task relationship matrix automatically from the data, and to explicitly take into account the learned relationships during model updates. Cavallanti et. al [8] assumes that task relationships are available a priori. Kshirsagar et. al [11] does the same but in a more adaptive manner. However such task-relation prior knowledge is either unavailable or infeasible to obtain for many applications especially when the number of tasks K is large [12] and/or when the manual annotation of task relationships is expensive [13]. Saha et. al [9] formulated the learning of task relationship matrix as a Bregman-divergence minimization problem w.r.t. positive definite matrices. The model suffers from high computational complexity as semi-definite programming is required when updating the task relationship matrix at each online round. We show that with a different formulation, we can obtain a similar but much cheaper updating rule for learning the inter-task weights. The most related work to ours is Shared Hypothesis model (SHAMO) from Crammer and Mansour [1], where the key idea is to use a K-means-like procedure that simultaneously clusters different tasks and learns a small pool of m ≪K shared hypotheses. Specifically, each task is free to choose a hypothesis from the pool that better classifies its own data, and each hypothesis is learned from pooling together all the training data that belongs to the same cluster. A similar idea was explored by Abernathy et. al [5] under expert settings. 2 Smoothed Multi-Task Learning 2.1 Setup Suppose we are given K tasks where the jth task is associated with Nj training examples. For brevity we consider a binary classification problem for each task, but the methods generalize to multi-class and are also applicable to regression tasks. We denote by [N] the consecutive integers ranging from 1 to N. Let (x(i) j , y(i) j ) Nj i=1 and Lj(w) = 1 Nj P i∈[Nj] 1 −y(i) j ⟨x(i) j , w⟩ + be the training set and batch empirical loss for task j, respectively, where (z)+ = max(0, z), x(i) j ∈Rd is the ith instance from the jth task and y(i) j is its corresponding true label. We start from the motivation of our formulation in Section 2.2, based on which we first propose a batch formulation in Section 2.3. Then, we extend the method to the online setting in Section 2.4. 2 2.2 Motivation Learning tasks may be addressed independently via w∗ k = argminwk Lk(wk), ∀k ∈[K]. However, when each task has limited training data, it is often beneficial to allow information sharing among the tasks, which can be achieved via the following optimization: w∗ k = argminwk X j∈[K] ηkjLj(wk) ∀k ∈[K] (1) Beyond each task k, optimization (1) encourages hypothesis w∗ k to do well on the remaining K −1 tasks thus allowing tasks to borrow information from each other. In the extreme case where the K tasks have an identical data distribution, optimization (1) amounts to using P j∈[K] Nj examples for training as compared to Nk in independent learning. The weight matrix η is in essence a task relationship matrix, and a prior may be manually specified according to domain knowledge about the tasks. For instance, ηkj would typically be set to a large value if tasks k and j share similar nature. If η = I, (1) reduces to learning tasks independently. It is clear that manual specification of η is feasible only when K is small. Moreover, tasks may be statistically correlated even if a domain expert is unavailable to identify an explicit relation, or if the effort required is too great. Hence, it is often desirable to automatically estimate the optimal η adapted to the inter-task problem structure. We propose to learn η in a data-driven manner. For the kth task, we optimize w∗ k, η∗ k = argminwk,ηk∈Θ X j∈[K] ηkjLj(wk) + λr(ηk) (2) where Θ defines the feasible domain of ηk, and regularizer r prevents degenerate cases, e.g., where ηk becomes an all-zero vector. Optimization (2) shares the same underlying insight with Self-Paced Learning (SPL) [14, 15] where the algorithm automatically learns the weights over data points during training. However, the process and scope in the two methods differ fundamentally: SPL minimizes the weighted loss over datapoints within a single domain, while optimization (2) minimizes the weighted loss over multiple tasks across possibly heterogeneous domains. A common choice of Θ and r(ηk) in SPL is Θ = [0, 1]K and r(ηk) = −∥ηk∥1. There are several drawbacks of naively applying this type of settings to the multitask scenario: (i) Lack of focus: there is no guarantee that the kth learner will put more focus on the kth task itself. When task k is intrinsically difficult, η∗ kk could simply be set near zero and w∗ k becomes almost independent of the kth task. (ii) Weak interpretability, the learned η∗ k may not be interpretable as it is not directly tied to any physical meanings (iii) Lack of worst-case guarantee in the online setting. All those issues will be addressed by our proposed model in the following. 2.3 Batch Formulation We parametrize the aforementioned task relationship matrix η ∈RK×K as follows: η = αIK + (1 −α) P (3) where IK ∈RK×K is an identity matrix, P ∈RK×K is a row-stochastic matrix and α is a scalar in [0, 1]. Task relationship matrix η defined as above has the following interpretations: 1. Concentration Factor α quantifies the learners’ “concentration” on their own tasks. Setting α = 1 amounts to independent learning. We will see from the forthcoming Theorem 1 how to specify α to ensure the optimality of the online regret bound. 2. Smoothed Attention Matrix P quantifies to which degree the learners are attentive to all tasks. Specifically, define the kth row of P , namely pk ∈∆K−1, as a probability distribution over all tasks where ∆K−1 denotes the probability simplex. Our goal of learning a data-adaptive η now becomes learning a data-adaptive attention matrix P . Common choices about η in several existing algorithms are special cases of (3). For instance, domain adaptation assumes α = 0 and a fixed row-stochastic matrix P ; in multi-task learning, we obtain the 3 effective heuristics of specifying η by Cavallanti et. al. [8] when α = 1 1+K and P = 1 K 11⊤. When there are m ≪K unique distributions pk, then the problem reduces to SHAMO model [1]. Equation (3) implies the task relationship matrix η is also row-stochastic, where we always reserve probability α for the kth task itself as ηkk ≥α. For each learner, the presence of α entails a trade off between learning from other tasks and concentrating on its own task. Note that we do not require P to be symmetric due to the asymmetric nature of information transferability—while classifiers trained on a resource-rich task can be well transferred to a resource-scarce task, the inverse is not usually true. Motivated by the above discussion, our batch formulation instantiates (2) as follows w∗ k, p∗ k = argminwk,pk∈∆K−1 X j∈[K] ηkj(pk)Lj(wk) −λH (pk) (4) = argminwk,pk∈∆K−1 Ej∼Multinomial(ηk(pk))Lj(wk) −λH (pk) (5) where H(pk) = −P j∈[K] pkj log pkj denotes the entropy of distribution pk. Optimization (4) can be viewed as to balance between minimizing the cross-task loss with mixture weights ηk and maximizing the smoothness of cross-task attentions. The max-entropy regularization favours a uniform attention over all tasks and leads to analytical updating rules for pk (and ηk). Optimization (4) is biconvex over wk and pk. With p(t) k fixed, solution for wk can be obtained using off-the-shelf solvers. With w(t) k fixed, solution for pk is given in closed-form: p(t+1) kj = e−1−α λ Lj(w(t) k ) PK j′=1 e−1−α λ Lj′(w(t) k ) ∀j ∈[K] (6) The exponential updating rule in (6) has an intuitive interpretation. That is, our algorithm attempts to use hypothesis w(t) k obtained from the kth task to classify training examples in all other tasks. Task j will be treated as related to task k if its training examples can be well classified by wk. The intuition is that two tasks are likely to relate to each other if they share similar decision boundaries, thus combining their associated data should yield to a stronger model, trained over larger data. 2.4 Online Formulation In this section, we extend our batch formulation to the online setting. We assume that all tasks will be performed at each round, though the assumption can be relaxed with some added complexity to the method. At time t, the kth task receives a training instance x(t) k , makes a prediction ⟨x(t) k , w(t) k ⟩and suffers a loss after y(t) is revealed. Our algorithm follows a error-driven update rule in which the model is updated only when a task makes a mistake. Let ℓ(t) kj (w) = 1 −y(t) j ⟨x(t) j , w⟩if y(t) j ⟨x(t) j , w(t) k ⟩< 1 and ℓkj(w) = 0 otherwise. For brevity, we introduce shorthands ℓ(t) kj = ℓ(t) kj (w(t) k ) and η(t) kj = ηkj(p(t) k ). For the kth task we consider the following optimization problem at each time: w(t+1) k , p(t+1) k = argmin wk,pk∈∆K−1 C X j∈[K] ηkj(pk)ℓ(t) kj (wk) + ∥wk −w(t) k ∥2 + λDKL pk∥p(t) k (7) where P j∈[K] ηkj(pk)ℓ(t) kj (wk) = Ej∼Multi(ηk(pk))ℓ(t) kj (wk), and DKL pk∥p(t) k denotes the Kullback–Leibler (KL) divergence between current and previous soft-attention distributions. The presence of last two terms in (7) allows the model parameters to evolve smoothly over time. Optimization (7) is naturally analogous to the batch optimization (4), where the batch loss Lj(wk) is replaced by its noisy version ℓ(t) kj (wk) at time t, and negative entropy −H(pk) = P j pkj log pkj is replaced by DKL(pk∥p(t) k ) also known as the relative entropy. We will show the above formulation leads to analytical updating rules for both wk and pk, a desirable property particularly as an online algorithm. 4 Solution for w(t+1) k conditioned on p(t) k is given in closed-form by the proximal operator w(t+1) k = prox(w(t) k ) = argminwk C X j∈[K] ηkj(p(t) k )ℓ(t) kj (wk) + ∥wk −w(t) k ∥2 (8) = w(t) k + C X j:y(t) j ⟨x(t) j ,w(t) k ⟩<1 ηkj(p(t) k )y(t) j x(t) j (9) Solution for p(t+1) k conditioned on w(t) k is also given in closed-form, analogous to mirror descent [16] p(t+1) k = argminpk∈∆K−1 C(1 −α) X j∈[K] pkjℓ(t) kj + λDKL pk∥p(t) k (10) =⇒p(t+1) kj = p(t) kj e−C(1−α) λ ℓ(t) kj P j′ p(t) kj′e−C(1−α) λ ℓ(t) kj′ j ∈[K] (11) The pseudo-code is in Algorithm 22. Our algorithm is “passive” in the sense that updates are carried out only when a classification error occurs, namely when ˆy(t) k ̸= y(t) k . An alternative is to perform “aggressive” updates only when the active set {j : y(t) j ⟨x(t) j , w(t) k ⟩< 1} is non-empty. Algorithm 1: Batch Algorithm (SMTL-e) while not converge do for k ∈[K] do w(t) k ←argminwk αLk(wk) + (1 − α) P j∈[K] p(t) kj Lj(wk); for j ∈[K] do p(t+1) kj ← e−1−α λ Lj (w(t) k ) PK j′=1 e −1−α λ Lj′ (w(t) k ) ; end end t ←t + 1; end Algorithm 2: Online Algorithm (OSMTL-e) for t ∈[T] do for k ∈[K] do if y(t) k ⟨x(t) k , w(t) k ⟩< 1 then w(t+1) k ←w(t) k + Cα1ℓ(t) kk >0y(t) k x(t) k + C(1 −α) P j:ℓ(t) kj >0 p(t) kj y(t) j x(t) j ; for j ∈[K] do p(t+1) kj ← p(t) kj e −C(1−α) λ ℓ(t) kj PK j′=1 p(t) kj′ e −C(1−α) λ ℓ(t) kj′ ; end else w(t+1) k , p(t+1) k ←w(t) k , p(t) k ; end end end 2.5 Regret Bound Theorem 1. ∀k ∈[K], let Sk = x(t) k , y(t) k T t=1 be a sequence of T examples for the kth task where x(t) k ∈Rd, y(t) k ∈{−1, +1} and ∥x(t) k ∥2 ≤R, ∀t ∈[T]. Let C be a positive constant and let α be some predefined parameter in [0, 1]. Let {w∗ k}k∈[K] be any arbitrary vectors where w∗ k ∈Rd and its hinge loss on the examples x(t) k , y(t) k and x(t) j , y(t) j j̸=k are given by ℓ(t)∗ kk = 1 −y(t) k ⟨x(t) k , w∗ k⟩ + and ℓ(t)∗ kj = 1 −y(t) j ⟨x(t) j , w∗ k⟩ +, respectively. If {Sk}k∈[K] is presented to OSMTL algorithm, then ∀k ∈[K] we have X t∈[T ] (ℓ(t) kk −ℓ(t)∗ kk ≤ 1 2Cα∥w∗ k∥2 + (1 −α)T α ℓ(t)∗ kk + max j∈[K],j̸=k ℓ(t)∗ kj + CR2T 2α (12) Notice when α →1, the above reduces to the perceptron mistake bound [17]. 2It is recommended to set α ∝ √ T 1+ √ T and C ∝1+ √ T T , as suggested by Corollary 2. 5 Corollary 2. Let α = √ T 1+ √ T and C = 1+ √ T T in Theorem 1, we have X t∈[T ] (ℓ(t) kk −ℓ(t)∗ kk ≤ √ T 1 2∥w∗ k∥2 + ℓ(t)∗ kk + max j∈[K],j̸=k ℓ(t)∗ kj + 2R2 (13) Proofs are given in the supplementary. Theorem 1 and Corollary 2 have several implications: 1. Quality of the bound depends on both ℓ(t)∗ kk and the maximum of {ℓ(t)∗ kj }j∈[K],j̸=k. In other words, the worst-case regret will be lower if the kth true hypothesis w∗ k can well distinguish training examples in both the kth task itself as well as those in all the other tasks. 2. Corollary 2 indicates the difference between the cumulative loss achieved by our algorithm and by any fixed hypothesis for task k is bounded by a term growing sub-linearly in T. 3. Corollary 2 provides a principled way to set hyperparameters to achieve the sub-linear regret bound. Specifically, recall α quantifies the self-concentration of each task. Therefore, α = √ T 1+ √ T T →∞ −→1 implies for large horizon it would be less necessary to rely on other tasks as available supervision for the task itself is already plenty; C = 1+ √ T T T →∞ −→0 suggests diminishing learning rate over the horizon length. 3 Experiments We evaluate the performance of our algorithm under batch and online settings. All reported results in this section are averaged over 30 random runs or permutations of the training data. Unless otherwise specified, all model parameters are chosen via 5-fold cross validation. 3.1 Benchmark Datasets We use three datasets for our experiments. Details are given below: Landmine Detection3 consists of 19 tasks collected from different landmine fields. Each task is a binary classification problem: landmines (+) or clutter (−) and each example consists of 9 features extracted from radar images with four moment-based features, three correlation-based features, one energy ratio feature and a spatial variance feature. Landmine data is collected from two different terrains: tasks 1-10 are from highly foliated regions and tasks 11-19 are from desert regions, therefore tasks naturally form two clusters. Any hypothesis learned from a task should be able to utilize the information available from other tasks belonging to the same cluster. Spam Detection4 We use the dataset obtained from ECML PAKDD 2006 Discovery challenge for the spam detection task. We used the task B challenge dataset which consists of labeled training data from the inboxes of 15 users. We consider each user as a single task and the goal is to build a personalized spam filter for each user. Each task is a binary classification problem: spam (+) or non-spam (−) and each example consists of approximately 150K features representing term frequency of the word occurrences. Since some spam is universal to all users (e.g. financial scams), some messages might be useful to certain affinity groups, but spam to most others. Such adaptive behavior of user’s interests and dis-interests can be modeled efficiently by utilizing the data from other users to learn per-user model parameters. Sentiment Analysis5 We evaluated our algorithm on product reviews from amazon. The dataset contains product reviews from 24 domains. We consider each domain as a binary classification task. Reviews with rating > 3 were labeled positive (+), those with rating < 3 were labeled negative (−), reviews with rating = 3 are discarded as the sentiments were ambiguous and hard to predict. Similar to the previous dataset, each example consists of approximately 350K features representing term frequency of the word occurrences. We choose 3040 examples (160 training examples per task) for landmine, 1500 emails for spam (100 emails per user inbox) and 2400 reviews for sentiment (100 reviews per domain) for our experiments. 3http://www.ee.duke.edu/~lcarin/LandmineData.zip 4http://ecmlpkdd2006.org/challenge.html 5http://www.cs.jhu.edu/~mdredze/datasets/sentiment 6 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0 50 100 150 200 250 300 AUC Training Size STL ITL SHAMO SMTL-t SMTL-e 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 Figure 1: Average AUC calculated for compared models (left). A visualization of the task relationship matrix in Landmine learned by SMTL-t (middle) and SMTL-e (right). The probabilistic formulation of SMTL-e allows it to discover more interesting patterns than SMTL-t. Note that we intentionally kept the size of the training data small to drive the need for learning from other tasks, which diminishes as the training sets per task become large. Since all these datasets have a class-imbalance issue (with few (+) examples as compared to (−) examples), we use average Area Under the ROC Curve (AUC) as the performance measure. 3.2 Batch Setting Since the main focus of this paper is online learning, we briefly conduct an experiment on landmine detection dataset for our batch learning to demonstrate the advantages of learning from shared data. We implement two versions of our proposed algorithm with different updates: SMTL-t (SMTL with thresholding updates) where p(t+1) kj ∝(λ −ℓ(t) kj )+6 and SMTL-e (SMTL with exponential updates) as in Algorithm 1. We compare our SMTL* with two standard baseline methods for our batch setting: Independent Task Learning (ITL)—learning a single model for each task and Single Task Learning (STL)—learning a single classification model for pooled data from all the tasks. In addition we compare our models with SHAMO, which is closest in spirit with our proposed models. We select the value for λ and α for SMTL* and M for SHAMO using cross validation. Figure 1 (left) shows the average AUC calculated for different training size on landmine. We can see that the baseline results are similar to the ones reported by Xue et. al [3]. Our proposed algorithm (SMTL*) outperforms the other baselines but when we have very few training examples (say 20 per task), the performance of STL improves as it has more examples than the others. Since η depends on the loss incurred on the data from related tasks, this loss-based measure can be unreliable for a small training sample size. To our surprise, SHAMO performs worse than the other models which tells us that assuming two tasks are exactly same (in the sense of hypothesis) may be inappropriate in real-world applications. Figure 1 (middle & left) show the task relationship matrix η for SMTL-t and SMTL-e on landmine when the number of training instances is 160 per task. 3.3 Online Setting To evaluate the performance of our algorithm in the online setting, we use all three datasets (landmine, spam and sentiment) and compare our proposed methods to 5 baselines. We implemented two variations of Passive-Aggressive algorithm (PA) [18]. PA-ITL learns independent model for each task and PA-ONE builds a single model for all the tasks. We also implemented the algorithm proposed by Dekel et. al for online multi-task learning with shared loss (OSGL) [6]. These three baselines do not exploit the task-relationship or the data from other tasks during model update. Next, we implemented two online multi-task learning related to our approach: FOML – initializes η with fixed weights [8], Online Multi-Task Relationship Learning (OMTRL) [9] – learns a task covariance matrix along with task parameters. We could not find a better way to implement the online version of the SHAMO algorithm, since the number of shared hypotheses or clusters varies over time. 6Our algorithm and theorem can be easily generalized to other types of updating rules by replacing exp in (6) with other functions. In latter cases, however, η may no longer have probabilistic interpretations. 7 Table 1: Average performance on three datasets: means and standard errors over 30 random shuffles. Models Landmine Detection Spam Detection Sentiment Analysis AUC nSV Time (s) AUC nSV Time (s) AUC nSV Time (s) PA-ONE 0.5473 (0.12) 2902.9 (4.21) 0.01 0.8739 (0.01) 1455.0 (4.64) 0.16 0.7193 (0.03) 2350.7 (6.36) 0.19 PA-ITL 0.5986 (0.04) 618.1 (27.31) 0.01 0.8350 (0.01) 1499.9 (0.37) 0.16 0.7364 (0.02) 2399.9 (0.25) 0.16 OSGL 0.6482 (0.03) 740.8 (42.03) 0.01 0.9551 (0.007) 1402.6 (13.57) 0.17 0.8375 (0.02) 2369.3 (14.63) 0.17 FOML 0.6322 (0.04) 426.5 (36.91) 0.11 0.9347 (0.009) 819.8 (18.57) 1.5 0.8472 (0.02) 1356.0 (78.49) 1.20 OMTRL 0.6409 (0.05) 432.2 (123.81) 6.9 0.9343 (0.008) 840.4 (22.67) 53.6 0.7831 (0.02) 1346.2 (85.99) 128 OSMTL-t 0.6776 (0.03) 333.6 (40.66) 0.18 0.9509 (0.007) 809.5 (19.35) 1.4 0.9354 0.01 1312.8 (79.15) 2.15 OSMTL-e 0.6404 (0.04) 458 (36.79) 0.19 0.9596 (0.006) 804.2 (19.05) 1.3 0.9465 (0.01) 1322.2 (80.27) 2.16 Table 1 summarizes the performance of all the above algorithms on the three datasets. In addition to the AUC scores, we report the average total number of support vectors (nSV) and the CPU time taken for learning from one instance (Time). From the table, it is evident that OSMTL* outperforms all the baselines in terms of both AUC and nSV. This is expected for the two default baselines (PA-ITL and PA-ONE). We believe that PA-ONE shows better result than PA-ITL in spam because the former learns the global information (common spam emails) that is quite dominant in spam detection problem. The update rule for FOML is similar to ours but using fixed weights. The results justify our claim that making the weights adaptive leads to improved performance. In addition to better results, our algorithm consumes less or comparable CPU time than the baselines which take into account inter-task relationships. Compared to the OMTRL algorithm that recomputes the task covariance matrix every iteration using expensive SVD routines, the adaptive weights in our are updated independently for each task. As specified in [9], we learn the task weight vectors for OMTRL separately as K independent perceptron for the first half of the training data available (EPOCH=0.5). OMTRL potentially looses half the data without learning task-relationship matrix as it depends on the quality of the task weight vectors. It is evident from the table that algorithms which use loss-based update weights η (OSGL, OSMTL*) considerably outperform the ones that do not use it (FOML,OMTRL). We believe that loss incurred per instance gives us valuable information for the algorithm to learn from that instance, as well as to evaluate the inter-dependencies among tasks. That said, task relationship information does help by learning from the related tasks’ data, but we demonstrate that combining both the task relationship and the loss information can give us a better algorithm, as is evident from our experiments. We would like to note that our proposed algorithm OSMTL* does exceptionally better in sentiment, which has been used as a standard benchmark application for domain adaptation experiments in the existing literature [19]. We believe the advantageous results on sentiment dataset implies that even with relatively few examples, effectively knowledge transfer among the tasks/domains can be achieved by adaptively choosing the (probabilistic) inter-task relationships from the data. 4 Conclusion We proposed a novel online multi-task learning algorithm that jointly learns the per-task hypothesis and the inter-task relationships. The key idea is based on smoothing the loss function of each task w.r.t. a probabilistic distribution over all tasks, and adaptively refining such distribution over time. In addition to closed-form updating rules, we show our method achieves the sub-linear regret bound. Effectiveness of our algorithm is empirically verified over several benchmark datasets. Acknowledgments This work is supported in part by NSF under grants IIS-1216282 and IIS-1546329. 8 References [1] Koby Crammer and Yishay Mansour. Learning multiple tasks using shared hypotheses. In Advances in Neural Information Processing Systems, pages 1475–1483, 2012. [2] Andreas Argyriou, Theodoros Evgeniou, and Massimiliano Pontil. Convex multi-task feature learning. Machine Learning, 73(3):243–272, 2008. [3] Ya Xue, Xuejun Liao, Lawrence Carin, and Balaji Krishnapuram. Multi-task learning for classification with dirichlet process priors. The Journal of Machine Learning Research, 8:35–63, 2007. [4] Yu Zhang and Dit-Yan Yeung. A regularization approach to learning task relationships in multitask learning. ACM Transactions on Knowledge Discovery from Data (TKDD), 8(3):12, 2014. [5] Jacob Abernethy, Peter Bartlett, and Alexander Rakhlin. Multitask learning with expert advice. In Learning Theory, pages 484–498. Springer, 2007. [6] Ofer Dekel, Philip M Long, and Yoram Singer. Online learning of multiple tasks with a shared loss. Journal of Machine Learning Research, 8(10):2233–2264, 2007. [7] Gábor Lugosi, Omiros Papaspiliopoulos, and Gilles Stoltz. Online multi-task learning with hard constraints. arXiv preprint arXiv:0902.3526, 2009. [8] Giovanni Cavallanti, Nicolo Cesa-Bianchi, and Claudio Gentile. Linear algorithms for online multitask classification. The Journal of Machine Learning Research, 11:2901–2934, 2010. [9] Avishek Saha, Piyush Rai, Suresh Venkatasubramanian, and Hal Daume. Online learning of multiple tasks and their relationships. In International Conference on Artificial Intelligence and Statistics, pages 643–651, 2011. [10] Alekh Agarwal, Alexander Rakhlin, and Peter Bartlett. Matrix regularization techniques for online multitask learning. EECS Department, University of California, Berkeley, Tech. Rep. UCB/EECS-2008-138, 2008. [11] Meghana Kshirsagar, Jaime Carbonell, and Judith Klein-Seetharaman. Multisource transfer learning for host-pathogen protein interaction prediction in unlabeled tasks. In NIPS Workshop on Machine Learning for Computational Biology, 2013. [12] 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. [13] Meghana Kshirsagar, Jaime Carbonell, and Judith Klein-Seetharaman. Multitask learning for host–pathogen protein interactions. Bioinformatics, 29(13):i217–i226, 2013. [14] M Pawan Kumar, Benjamin Packer, and Daphne Koller. Self-paced learning for latent variable models. In Advances in Neural Information Processing Systems, pages 1189–1197, 2010. [15] Lu Jiang, Deyu Meng, Shoou-I Yu, Zhenzhong Lan, Shiguang Shan, and Alexander Hauptmann. Self-paced learning with diversity. In Advances in Neural Information Processing Systems, pages 2078–2086, 2014. [16] A-S Nemirovsky, D-B Yudin, and E-R Dawson. Problem complexity and method efficiency in optimization. 1982. [17] Shai Shalev-Shwartz and Yoram Singer. Online learning: Theory, algorithms, and applications. PhD Dissertation, 2007. [18] Koby Crammer, Ofer Dekel, Joseph Keshet, Shai Shalev-Shwartz, and Yoram Singer. Online passive-aggressive algorithms. The Journal of Machine Learning Research, 7:551–585, 2006. [19] John Blitzer, Mark Dredze, Fernando Pereira, et al. Biographies, bollywood, boom-boxes and blenders: Domain adaptation for sentiment classification. In ACL, volume 7, pages 440–447, 2007. 9 | 2016 | 384 |
6,310 | Efficient and Robust Spiking Neural Circuit for Navigation Inspired by Echolocating Bats Pulkit Tandon, Yash H. Malviya Indian Institute of Technology, Bombay pulkit1495,yashmalviya94@gmail.com Bipin Rajendran New Jersey Institute of Technology bipin@njit.edu Abstract We demonstrate a spiking neural circuit for azimuth angle detection inspired by the echolocation circuits of the Horseshoe bat Rhinolophus ferrumequinum and utilize it to devise a model for navigation and target tracking, capturing several key aspects of information transmission in biology. Our network, using only a simple local-information based sensor implementing the cardioid angular gain function, operates at biological spike rate of approximately 10 Hz. The network tracks large angular targets (60◦) within 1 sec with a 10% RMS error. We study the navigational ability of our model for foraging and target localization tasks in a forest of obstacles and show that it requires less than 200X spike-triggered decisions, while suffering less than 1% loss in performance compared to a proportional-integral-derivative controller, in the presence of 50% additive noise. Superior performance can be obtained at a higher average spike rate of 100 Hz and 1000 Hz, but even the accelerated networks require 20X and 10X lesser decisions respectively, demonstrating the superior computational efficiency of bio-inspired information processing systems. 1 Introduction One of the most remarkable engineering marvels of nature is the ability of many species such as bats, toothed whales and dolphins to navigate and identify preys and predators by echolocation, i.e., emit sounds with complex characteristics, and use neural circuits to discern the location, velocity and features of obstacles or targets based on the echo of the signal. Echolocation problem can be sub-divided into estimating range, height and azimuth angle of objects in the environment. These coordinates are resolved by the bat using separate mechanisms and networks [1, 2]. While the bat’s height detection capability is obtained through the unique structure of its ear that creates patterns of interference in the spectrum of incoming echoes [3], the coordinates of range and azimuth are estimated using specialized neural networks [1, 2]. Artificial neural networks are of great engineering interest, as they are suitable for a wide variety of autonomous data analytics applications [4]. In spite of their impressive successes in solving complex cognitive tasks [5], the commonly used neuronal and synaptic models today do not capture the most crucial aspects of the animal brain where neuronal signals are encoded and transmitted as spikes or action potentials and the synaptic strength which encodes memory and other computational capabilities is adjusted autonomously based on the time of spikes [6, 7]. Spiking neural networks (SNNs) are believed to be computationally more efficient than their second-generation counterparts[8]. Bat’s echolocation behavior has two distinct attributes – prey catching and random foraging. It is believed that an ‘azimuth echolocation network’ in the bat’s brain plays a major role in helping it to forage randomly as it enables obstacle detection and avoidance, while a ‘range detection network’ helps in modulating the sonar vocalizations of the bat which enable better detection, tracking and catching of prey [1, 2]. In this paper, we focus on the relatively simple azimuth detection network of the greater horseshoe bat to develop a SNN for object tracking and navigation. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. AUDIO SOURCE NOISE SENSOR 1 LEFT EAR SENSOR 2 RIGHT EAR NETWORK 8-Neurons DYNAMICS SPATIAL PARAMETERS f(𝜽, 𝑹𝒓) SPATIAL PARAMETERS f(𝜽, 𝑹𝒍) SPIKES 𝒅𝜽 𝒅𝒕= 𝒈(𝑺𝒑𝒊𝒌𝒆𝒔) 𝒅𝜽 𝒅𝜽 𝜽 HEAD AIM LEFT EAR RIGHT EAR Rl AUDIO SOURCE HEAD Rr 𝜶𝒍 𝜶𝒓 Figure 1: Schematic diagram of the navigation system based on a spiking neural network (SNN) for azimuth detection, inspired by bat echolocation. The two input sensors (mimicking the ears), encode incoming sound signals as spike arrival rates which is used by the SNN to generate output spikes that controls the head aim. Spikes from the top channel induces an anti-clockwise turn, and the bottom channel induces a clockwise turn. Thus, the head-aim is directed towards maximum intensity. We use small-head approximation (i.e., Rl = Rr, αl = π/2 −θ and αr = π/2 + θ). 2 System Design We now discuss the broad overview of the design of our azimuth detection network and the navigation system, and the organization of the paper. The functioning of our echolocation based navigation model can be divided into five major parts. Figure 1 illustrates these parts along with a model of the tracking head and the object to be detected. Firstly, we assume that all objects in the environment emit sound isotropically in all our simulations. This mimics the echo signal, and is assumed to be of the same magnitude for simplicity. Let the intensity of an arbitrary source be denoted as Is. We assume that the intensity decays in accordance with an inverse square dependence on the distance from the source. Hence, the intensity at the ears (sensors) at a distance Rl and Rr will be given as Il = Is R2 l Ir = Is R2r (1) The emitted sound travels through the environment where it is corrupted with noise and falls on the receivers (bat’s ears). In our model, the two receivers are positioned symmetric to the head aim, 180◦apart. Like most mammals, we rely on sound signal received at the two receivers to determine azimuth information [1]. By distinguishing the sound signals received at the two receivers, the network formulates a direction for the potential obstacle or target that is emitting the signal. In our model, we use a cardioid angular gain function as input sensor, described in detail in Section 3. We filter incoming sound signals using the cardioid, which are then translated to spike domain and forwarded to the azimuth detection network. The SNN we design (Section 4) is inspired by several studies that have identified the different neurons that are part of the bat’s azimuth detection network and how they are inter-connected [1], [2]. We have critically analyzed the internal functioning of this biological network and identified components that enable the network to function effectively. The spiking neural network that processes the input sound signals generates an output spike train which determines the direction in which the head-aim of our artificial bat should turn to avoid obstacles or track targets. The details of this dynamics are discussed in Section 5. We evaluate the performance of our system in the presence of ambient noise by adding slowly varying noise signals to the input (section 6). The simulation results are discussed in Section 7, and the performance of the model evaluated in Section 8, before summarizing our conclusions. 3 Input and Receiver Modeling The bat has two ears to record the incoming signal and like most mammals relies on them for identifying the differences at these two sensors to detect azimuth information [1]. These differences could either be in the time of arrival or intensity of signal detected at the two ears. Since the bat’s head is small (and the ears are only about 1 −2 cm apart) the interaural time difference (ITD), defined as the time difference of echo arrival at the two ears, is very small [9]. Hence, the bat relies on measurement of the interaural level difference (ILD), also known as interaural intensity difference 2 (a) (b) Figure 2: a) The Interaural Level Difference, defined as relative intensity of input signals received at the two sensors in the bat is strongly correlated with the azimuth deviation between the sound source and the head aim. Adapted from [9]. b) In our model, sensitivity of the sensor (in dB) as a function of the angle with source obeys cardioid dependence (readily available in commercial sensors). (IID) for azimuth angle detection. As shown in Figure 2a, the ILD signal detected by the ears is a strong function of the azimuth angle; our network is engineered to mimic this characteristic feature. In most animals, the intensity of the signal detected by the ear depends on the angle between the ear and the source; this arises due to the directionality of the ear. To model this feature of the receiver, we use a simple cardioid based receiver gain function as shown in Figure 2b, which is the most common gain characteristic of audio sensors available in the market. Hence, if αr/l is the angle between the source and the normal to the right/left ear, the detected intensity is given as Id,r/l = Ir/l × 10−1+cos(αr/l) (2) We model the output of the receiver as a spike stream, whose inter-arrival rate, λ encodes this filtered intensity information λr/l = kId,r/l (3) where k is a proportionality constant chosen to ensure a desired average spiking rate in the network. We chose two different encoding schemes for our network. In the uniform signal encoding scheme, the inter-arrival time of the spikes at the output of the receiver is a constant and equal to 1/λ. In the Poisson signal encoding scheme, we assume that the spikes are generated according to a Poisson process with an inter-arrival rate equal to λ. Poisson source represents a more realistic version of an echo signal observed in biological settings. In order to update the sound intensity space seen by the bat as it moves, we sample the received sound intensity (Id,r/l) for a duration of 300 ms at every 450 ms. The fallow 150 ms between the sampling periods allows the bat to process received signals, and reduces interference between consecutive samples. 4 Spiking Neural Network Model Figure 3a shows our azimuth detection SNN inspired by the bat. It consists of 16 sub-networks whose spike outputs are summed up to generate the network output. In each sub-network, Antroventral Cochlear Nucleus (AVCN) neurons receive the input signal translated to spike domain from the front-end receiver as modeled above and deliver it to Lateral Superior Olive (LSO) neurons. Except for the synaptic weights from AVCN layer to LSO layer, the 16 sub-networks are identical. The left LSO neuron further projects excitatory synapses to the right Dorsal Nucleus of Lateral Lemniscus (DNLL) neuron and to the right Inferior Colliculus (IC) neuron and inhibitory synapses to the left DNLL and IC neurons. Additionally, inhibitory synapses connect the DNLL neurons to both IC neurons which also inhibit each other. The AVCN and IC neurons trigger navigational decisions. Minor variations in the spike patterns at the input of multi-layered spiking neural networks could result in vastly divergent spiking behaviors at the output due to the rich variations in synaptic dynamics. To avoid this, we use 16 clone networks which are identical except for the weights of synapse from AVCN layer to LSO layer (which are incremented linearly for each clone). These clones operate in 3 (a) (b) Figure 3: (a) Our azimuth detection SNN consists of 16 sub-networks whose spike outputs are summed up to generate the network output. Except for the synaptic weights from AVCN layer to LSO layer, sub-networks are identical (see Supplementary Materials). Higher spike rate at the left input results in higher output spike rate of neurons N1 and N8. (b) Top panel shows normalized response of the SNN with impulses presented to input neuron N1 at t = 50 ms and N2 at t = 150 ms. Bottom panel shows that the output spike rate difference of our SNN mimics that in Figure 2a. parallel and the output spike stream of the left and right IC neurons are merged for the 16 clones, generating the net output spike train of the network. We use the adaptive exponential integrate and fire model for all our neurons as they can exhibit different kinds of spiking behavior seen in biological neurons [10]. All the neurons implemented in our model are regular spiking (RS), except the IC layer neurons which are chattering neurons (CH). CH neurons aggregate the input variations over a period and then produce brisk spikes for a fixed duration, thereby improving accuracy. The weights for the various excitatory and inhibitory synapses have been derived by parameter space exploration. The selected values enable the network to operate for the range of spike frequencies considered and allows spike responses to propagate through the depth of the network (All simulation parameters are listed in Supplementary Materials). An exemplary behavior of the network corresponding to short impulses received by AVCNleft at t = 50 ms and by AVCNright at t = 150 ms is shown in Figure 3b. If λright of a particular sound input is higher than λleft, the right AVCN neuron will have a higher spiking rate than its left counterpart. This in turn induces a higher spiking rate in the right LSO neuron, while at the same time suppressing the spikes in left LSO neuron. Thereafter, the LSO neurons excite spikes in the opposite DNLL and IC neurons, while suppressing any spikes on the DNLL and IC neurons on its side. Consequently, an input signal with higher λright will produce a higher spike rate at the left IC neuron. It has been proposed that the latter layers enable extraction of useful information by correlating the past input signals with the current input signals [11]. The LSO neuron that sends excitatory signals to an IC neuron also inhibits the DNLL neuron which suppresses IC neuron. Inhibition of DNLL neuron lasts for a few seconds even after the input signal stops. Consequently, for a short period, the IC neuron receives reduced inhibition. Lack of inhibition changes the network’s response to future input signals. Hence, depending on the recent history of signals received, the output spike difference may vary for the same instantaneous input, thus enabling the network to exhibit proportional-integral-derivative controller like behavior. Figure 4 highlights this feature. 4 (a) (b) (c) Figure 4: Spike response of the network (blue) depends not only on the variations in the present input (red) but also on its past history, akin to a proportional-integral-derivative controller. Input spike trains are fed to neurons N1 and N2. Choosing the input spikes in (a) as reference, in (b) second half of the input pattern is modified, whereas in (c) first half of the input pattern is modified. 5 Head-Rotation Dynamics The difference in the spike rate of the two output neurons generated by the network indicates angular deviation between the head-aim and the object detected (Figure 3b). In order to orient the trackinghead in the direction of maximum sound intensity, the head-aim is rotated by a pre-specified angle for every spike, defined as the Angle of Rotation (AoR). AoR is a function of the operating spike frequency of the network and the nature of input source coding (Poisson/Uniform). It is an engineered parameter obtained by minimizing RMS error during constant angle tracking. We have provided AoR values for a range of SNN frequency operation also ensuring that AoR chosen can be achieved by commercial motors (Details in Supplementary Materials). In a biological system, not every spike will necessarily cause a head turn as information transmission through the neuromuscular junction is stochastic in nature. To model this, we specify that an AoR turn is executed according to a probability model given as ˙θ = [(sl −sr)pi −(rl −rr)pj] AoR (4) where sl,r is 1 if spike is issued in left (or right) IC neuron and 0 otherwise and rl,r is 1 if a spike is issued in left (or right) AVCN neurons. pi and pj are Bernoulli random variables (with mean values ⟨pi⟩= 0.5 and ⟨pj⟩= 0.0005) denoting the probability that an output and input spike causes a turn respectively. The direction and amplitude of the turn is naturally encoded in the spike rates of output and input neurons. The sign of rl −rr is opposite to sl −sr as a higher spike rate in right (or left) AVCN layer implies higher spike rate in left (or right) IC layer and hence they should have same causal effect on head aim. We have assigned our ‘artificial bat’ a fixed speed of 15 mph (6.8 m/s) consistent with biologically observed bat speeds [12]. 6 Noise Modeling In order to study the impact of realistic noisy environments on the performance of our network, we incorporate noise in our simulations by adding a slowly varying component to the source sound Intensity, Is. Hence, (3) is modified as λr/l = k(Id,r/l + n) (5) where n is obtained by low-pass filtering uniform noise. Also note that for Poisson input source encoding, since we are sampling a random signal for a fixed duration, large variations in the stimulus spike count is possible for the same values of input intensity. We will study the effect of the above additive uniform noise for both encoding schemes. 7 Simulation Results We first show our system’s response to a stair-case input, i.e., the source is moving along a circle with the ‘bat’ fixed at the center, but free to turn along the central axis (Figure 5). It can be seen that the network performs reasonably well in tracking the moving source within a second. 5 Figure 5: Response of the azimuth tracking network for time varying staircase input for Poisson input encoding at 10 Hz operating frequency. We now study the step response of our SNN based azimuth tracking system for both uniform and Poisson source encoding schemes at various operating frequencies of the network, with and without additive noise (Figure 6). To quantify the performance of our system, we report the following two metrics: (a) Time of Arrival (ToA) which is the first time when the head aim comes within 5% of target head aim (source angle); and (b) RMS error in head aim measured in the interval [ToA, 4.5 s]. At t = 0, the network starts tracking a stationary source placed at −60◦; the ToA is ∼1 s in all cases, even in the presence of 50% additive noise. The trajectories for 1 kHz Poisson encoding is superior to that corresponding to its low frequency counterpart. At low frequencies, there are not enough spikes to distinguish between small changes in angles as the receiver’s sampling period is only 300 ms. It is possible to tune the system to have much better RMS error by increasing the sampling period or decreasing AoR, but at the cost of larger ToA. Our design parameters are chosen to mimic the biologically observed ToA while minimizing the RMS error [13]. We observed that uniform source encoding performs better than Poisson encoding in terms of average jitter after ToA, as there is no sampling noise present in former. (a) Poisson source 10 Hz (b) Poisson source 1 kHz (c) Uniform source 1 kHz (d) Poisson source 10 Hz, 50% noise (e) Poisson source 1 kHz, 50% noise (f) Uniform source 1kHz,50% noise Figure 6: Step response of our SNN based azimuth tracking system, for five different exemplary tracks for different input signal encoding schemes, network frequencies and input noise levels. At t = 0, the network starts tracking a stationary source placed at −60◦. The time taken to reach within 5% of the target angle, denoted as Time of Arrival (ToA), is ∼1 s for all cases. We expect RMS error to increase with decrease in operation frequency and increase in percentage channel noise. Figure 7a clearly shows this behavior for uniform source encoding. With no additive noise (pink label), the RMS error decreases with increase in frequency. Although RMS error remains almost constant with varying noise level for 10 Hz (in terms of median error and variance in error), it clearly increases for 1 kHz case. This can be attributed to the fact that since our ‘artificial bat’ moves whenever a spike occurs, at lower frequency, the network itself filters the noise by using it’s slowly varying nature and averaging it. At higher frequencies, this averaging effect is reduced making 6 (a) RMS error, Uniform source encoding (b) RMS error, Poisson source encoding Figure 7: a) RMS error in head aim for Uniform source encoding measured after the ToA during tracking a constant target angle in response to varying noise levels. At zero noise, increasing the frequency improves performance due to fine-grained decisions. However, in the presence of additive noise, increasing the frequency worsens the RMS error, as more error-prone decisions are likely. b) RMS error with Poisson source encoding: at zero noise, an increase in operation frequency reduces the RMS error but compared to Figure 7a, the performance even at 1 kHz is unaffected by noise. the trajectory more susceptible to noise. A trade-off can be seen for 50% noise (red label), where addition of noise is more dominating and hence the system performs worse when operated at higher frequencies. Figure 7b reports the frequency dependence of the RMS error for the Poisson encoding scheme. Performance improves with increase in operation frequency as before, but the effect of added noise is negligible even at 50% additive noise, showing that this scheme is more noise resilient. It should however be noted that performance of Poisson is at best equal to that of uniform encoding. 8 Performance Evaluation To test the navigational efficiency of our design, we test its ability to track down targets while avoiding obstacles on its path in a 2D arena (120 × 120 m). The target and obstacles are modeled as a point sources which emit fixed intensity sound signals. Net detected intensity due to these sources is calculated as a linear superposition of all the intensities by modifying (2) as Id = X t It R2 t × 10−1+cos(αt) + X o Io R2o × 10−1+cos(π+αo) (6) where subscript t refers to targets and o to obstacles. Choosing the effective angle of the obstacles as π + αo has the effect of steering the ‘bat’ 180◦away from the obstacles. There are approximately 10 obstacles for every target in the arena placed at random locations. Neurobiological studies have identified a range detection network which determines the modulation of bat’s voice signal depending on the distance to its prey [1]. Our model does not include it; we replace the process of the bat generating sound signals and receiving echoes after reflection from surrounding objects, by the targets and obstacles themselves emitting sound signals isotropically. It is known that the bat can differentiate between prey and obstacles by detecting slight differences in their echoes [14]. This ability is aided by specialized neural networks in bat’s nervous system. Since our ‘artificial bat’ employs a network which detects azimuth information, we model it artificially. To benchmark the efficiency of our SNN based navigation model, we compare it with the performance of a particle that obeys standard second-order PID control system dynamics governed by the equation d2(θ −θt) dt2 + k1 d(θ −θt) dt + k2(θ −θt) = 0 (7) The particle calculates a target angle θt, which is chosen to be the angle at which the net detected intensity calculated using (6) is a maximum. This calculation is performed periodically (every 450 ms, SNN sampling period). The above PID controller thus tries to steer the instantaneous angle of the particle θ towards the desired target angle. The parameters k1 and k2 (Refer Supplementary material) have been chosen to match the rise-time and overshoot characteristics of the SNN-model. In order to compare performance under noisy conditions we add 50% slow varying noise to the sound signal emitted by targets and obstacles as explained in Section 6. We simulate the trajectory for 7 18 s (40 sampling periods of the bat) and report the number of successful cases where the particle ‘reached’ the target without ‘running’ into any obstacles (i.e., particle-target separation was less than 2 m and particle-obstacle separation was always more than 2 m). Table 1 summarizes the results for these scenarios - the SNN model operating at 1000 Hz has significantly higher % Success and comparable average success time, though the PID particle is highly efficient in avoiding obstacles. Table 1: Performance Validation Results SNN 1 kHz SNN 100 Hz SNN 10 Hz PID % Success 68 66.2 28.4 29.13 % No-collision 2.4 3.6 21.6 60.86 % Obstacle 29.6 30.2 50 10 Avg. success time (sec) 6.27 6.66 6.68 5.08 To compare the computational effort of these approaches, we define ‘number of decisions’ as number of changes made in head aim while navigating. The SNN model utilizes 220X times less number of decisions while suffering < 1% decrease in % Success and a 31.5% increase in average success time as compared to PID particle. Our network when operated at 100Hz (1000Hz) still retains its efficiency in terms of decision making as it incurs 20 (10) times lesser decisions respectively, as compared to the PID particle while achieving much higher % Success. A closer look at the trajectories traced by the bat and the PID particle shows that the PID particle has a tendency to get stuck in local maxima of sound intensity space, explaining why it shows high % No-collision but poor foraging (Figure 8b). (a) (b) Figure 8: a) At 50% slowly-varying additive noise, our network requires up to 220x lesser spiketriggered decisions, while suffering less than 1% loss in performance compared to a PID control algorithm. Superior performance can be obtained at a higher spike rate of ∼100 Hz and ∼1000 Hz, but even the accelerated networks requires 20x and 10x lesser decisions respectively (a decision corresponds to a change in the head aim). b) Exemplary tracks traced by the SNN (blue) and the PID particle (black) in a forest of obstacles (red dots) with sparse targets (green dots). 9 Conclusion We have devised an azimuth detection spiking neural network for navigation and target tracking, inspired by the echolocating bat. Our network can track large angular targets (60◦) within 1 sec with a 10% mean RMS error, capturing the main features of observed biological behavior. Our network performance is highly resilient to additive noise in the input and exhibits efficient decision making while navigating and tracking targets in a forest of obstacles. Our SNN based model that mimics several aspects of information processing of biology requires less than 200X decisions while suffering < 1% loss in performance, compared to a standard proportional-integral-derivative based control. We thus demonstrate that appropriately engineered neural information processing systems can outperform conventional control algorithms in real-life noisy environments. Acknowledgments This research was supported in part by the CAMPUSENSE project grant from CISCO Systems Inc. 8 References [1] C. F. Moss and S. R. Sinha. Neurobiology of echolocation in bats. 13(6):751–8, 2003. [2] N. Suga. Biosonar and neural computation in bats. 262(6):60–8, 1990. [3] Ferragamo M. J. Simmons J. A. Wotton J. M., Haresign T. Sound source elevation and external ear cues influence the discrimination of spectral notches by the big brown bat, Eptesicus fuscus. 100(3):1764–76, 1996. [4] Y. Bengio Y. LeCun and G. Hinton. Deep learning. 521(7553):436–44, 2015. [5] A. Huang et al. D. Silver. Mastering the game of go with deep neural networks and tree search. 529:484–89, 2016. [6] E. R. Kandel. Nobel lecture, phisiology or medicine, 2000. [7] Gerstner W. Markram H. and Sjostrom P. J. Spike-timing-dependent plasticity: A comprehensive overview. 4:2, 2012. [8] W. Maass. Networks of spiking neurons: The third generation of neural network models. 10(9):1659–1671, 1997. [9] R. Z. Shi and T. K. Horiuchi. A neuromorphic VLSI model of bat interaural level difference processing for azimuthal echolocation. pages 74 – 88, 2007. [10] Romain Brette and Wulfram Gerstner. Adaptive exponential integrate-and-fire model as an effective description of neuronal activity. Journal of Neurophysiology, 94(5):3637–3642, 2005. [11] R. M. Burger and G. D. Pollak. Reversible inactivation of the dorsal nucleus of the lateral lemniscus reveals its role in the processing of multiple sound.. 21(13):4830, 2001. [12] B. Hayward and R. Davis. Flight speeds in western bats. 45(2):236, 1964. [13] C. F. Moss and A. Surlykke. Probing the natural scene by echolocation in bats. 2010. [14] H.-U. Schnitzler J. Ostwald and Schuller G. Target discrimination and target classification in echo locating bats, page 413. 1988. 9 | 2016 | 385 |
6,311 | Optimal Cluster Recovery in the Labeled Stochastic Block Model Se-Young Yun CNLS, Los Alamos National Lab. Los Alamos, NM 87545 syun@lanl.gov Alexandre Proutiere Automatic Control Dept., KTH Stockholm 100-44, Sweden alepro@kth.se Abstract We consider the problem of community detection or clustering in the labeled Stochastic Block Model (LSBM) with a finite number K of clusters of sizes linearly growing with the global population of items n. Every pair of items is labeled independently at random, and label ℓappears with probability p(i, j, ℓ) between two items in clusters indexed by i and j, respectively. The objective is to reconstruct the clusters from the observation of these random labels. Clustering under the SBM and their extensions has attracted much attention recently. Most existing work aimed at characterizing the set of parameters such that it is possible to infer clusters either positively correlated with the true clusters, or with a vanishing proportion of misclassified items, or exactly matching the true clusters. We find the set of parameters such that there exists a clustering algorithm with at most s misclassified items in average under the general LSBM and for any s = o(n), which solves one open problem raised in [2]. We further develop an algorithm, based on simple spectral methods, that achieves this fundamental performance limit within O(npolylog(n)) computations and without the a-priori knowledge of the model parameters. 1 Introduction Community detection consists in extracting (a few) groups of similar items from a large global population, and has applications in a wide spectrum of disciplines including social sciences, biology, computer science, and statistical physics. The communities or clusters of items are inferred from the observed pair-wise similarities between items, which, most often, are represented by a graph whose vertices are items and edges are pairs of items known to share similar features. The stochastic block model (SBM), introduced three decades ago in [12], constitutes a natural performance benchmark for community detection, and has been, since then, widely studied. In the SBM, the set of items V = {1, . . . , n} are partitioned into K non-overlapping clusters V1, . . . , VK, that have to be recovered from an observed realization of a random graph. In the latter, an edge between two items belonging to clusters Vi and Vj, respectively, is present with probability p(i, j), independently of other edges. The analyses presented in this paper apply to the SBM, but also to the labeled stochastic block model (LSBM) [11], a more general model to describe the similarities of items. There, the observation of the similarity between two items comes in the form of a label taken from a finite set L = {0, 1, . . . , L}, and label ℓis observed between two items in clusters Vi and Vj, respectively, with probability p(i, j, ℓ), independently of other labels. The standard SBM can be seen as a particular instance of its labeled counterpart with two possible labels 0 and 1, and where the edges present (resp. absent) in the SBM correspond to item pairs with label 1 (resp. 0). The problem of cluster recovery under the LSBM consists in inferring the hidden partition V1, . . . , VK from the observation of the random labels on each pair of items. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Over the last few years, we have seen remarkable progresses for the problem of cluster recovery under the SBM (see [7] for an exhaustive literature review), highlighting its scientific relevance and richness. Most recent work on the SBM aimed at characterizing the set of parameters (i.e., the probabilities p(i, j) that there exists an edge between nodes in clusters i and j for 1 ≤i, j ≤K) such that some qualitative recovery objectives can or cannot be met. For sparse scenarios where the average degree of items in the graph is O(1), parameters under which it is possible to extract clusters positively correlated with the true clusters have been identified [5, 18, 16]. When the average degree of the graph is ω(1), one may predict the set of parameters allowing a cluster recovery with a vanishing (as n grows large) proportion of misclassified items [22, 17], but one may also characterize parameters for which an asymptotically exact cluster reconstruction can be achieved [1, 21, 8, 17, 2, 3, 13]. In this paper, we address the finer and more challenging question of determining, under the general LSBM, the minimal number of misclassified items given the parameters of the model. Specifically, for any given s = o(n), our goal is to identify the set of parameters such that it is possible to devise a clustering algorithm with at most s misclassified items. Of course, if we achieve this goal, we shall recover all the aforementioned results on the SBM. Main results. We focus on the labeled SBM as described above, and where each item is assigned to cluster Vk with probability αk > 0, independently of other items. We assume w.l.o.g. that α1 ≤α2 ≤· · · ≤αK. We further assume that α = (α1, . . . , αK) does not depend on the total population of items n. Conditionally on the assignment of items to clusters, the pair or edge (v, w) ∈V2 has label ℓ∈L = {0, 1, . . . , L} with probability p(i, j, ℓ), when v ∈Vi and w ∈Vj. W.l.o.g., 0 is the most frequent label, i.e., 0 = arg maxℓ PK i=1 PK j=1 αiαjp(i, j, ℓ). Throughout the paper, we typically assume that ¯p = o(1) and ¯pn = ω(1) where ¯p = maxi,j,ℓ≥1 p(i, j, ℓ) denotes the maximum probability of observing a label different than 0. We shall explicitly state whether these assumption are made when deriving our results. In the standard SBM, the second assumption means that the average degree of the corresponding random graph is ω(1). This also means that we can hope to recover clusters with a vanishing proportion of misclassified items. We finally make the following assumption: there exist positive constants η and ε such that for every i, j, k ∈[K] = {1, . . . , K}, (A1) ∀ℓ∈L, p(i, j, ℓ) p(i, k, ℓ) ≤η and (A2) PK k=1 PL ℓ=1(p(i, k, ℓ) −p(j, k, ℓ))2 ¯p2 ≥ε. (A2) imposes a certain separation between the clusters. For example, in the standard SBM with two communities, p(1, 1, 1) = p(2, 2, 1) = ξ, and p(1, 2, 1) = ζ, (A2) is equivalent to 2(ξ −ζ)2/ξ2 ≥ϵ. In summary, the LSBM is parametrized by α and p = (p(i, j, ℓ))1≤i,j≤K,0≤ℓ≤L, and recall that α does not depend on n, whereas p does. For the above LSBM, we derive, for any arbitrary s = o(n), a necessary condition under which there exists an algorithm inferring clusters with s misclassified items. We further establish that under this condition, a simple extension of spectral algorithms extract communities with less than s misclassified items. To formalize these results, we introduce the divergence of (α, p). We denote by p(i) the K × (L + 1) matrix whose element on the j-th row and the (ℓ+ 1)-th column is p(i, j, ℓ) and denote by p(i, j) ∈[0, 1]L+1 the vector describing the probability distribution of the label of a pair of items in Vi and Vj, respectively. Let PK×(L+1) denote the set of K × (L + 1) matrices such that each row represents a probability distribution. The divergence D(α, p) of (α, p) is defined as follows: D(α, p) = mini,j:i̸=j DL+(α, p(i), p(j)) with DL+(α, p(i), p(j)) = min y∈PK×(L+1) max ( K X k=1 αkKL(y(k), p(i, k)), K X k=1 αkKL(y(k), p(j, k)) ) where KL denotes the Kullback-Leibler divergence between two label distributions, i.e., KL(y(k), p(i, k)) = PL ℓ=0 y(k, ℓ) log y(k,ℓ) p(i,k,ℓ). Finally, we denote by επ(n) the number of misclassified items under the clustering algorithm π, and by E[επ(n)] its expectation (with respect to the randomness in the LSBM and in the algorithm). We first derive a tight lower bound on the average number of misclassified items when the latter is o(n). Note that such a bound was unknown even for the SBM [2]. Theorem 1 Assume that (A1) and (A2) hold, and that ¯pn = ω(1). Let s = o(n). If there exists a clustering algorithm π misclassifying in average less than s items asymptotically, i.e., 2 lim supn→∞ E[επ(n)] s ≤1, then the parameters (α, p) of the LSBM satisfy: lim inf n→∞ nD(α, p) log(n/s) ≥1. (1) To state the corresponding positive result (i.e., the existence of an algorithm misclassifying only s items), we make an additional assumption to avoid extremely sparse labels: (A3) there exists a constant κ > 0 such that np(j, i, ℓ) ≥(n¯p)κ for all i, j and ℓ≥1. Theorem 2 Assume that (A1), (A2), and (A3) hold, and that ¯p = o(1), ¯pn = ω(1). Let s = o(n). If the parameters (α, p) of the LSBM satisfy (1), then the Spectral Partition (SP) algorithm presented in Section 4 misclassifies at most s items with high probability, i.e., limn→∞P[εSP (n) ≤s] = 1. These theorems indicate that under the LSBM with parameters satisfying (A1) and (A2), the number of misclassified items scales at least as n exp(−nD(α, p)(1 + o(1)) under any clustering algorithm, irrespective of its complexity. They further establish that the Spectral Partition algorithm reaches this fundamental performance limit under the additional condition (A3). We note that the SP algorithm runs in polynomial time, i.e., it requires O(n2¯p log(n)) floating-point operations. We further establish a necessary and sufficient condition on the parameters of the LSBM for the existence of a clustering algorithm recovering the clusters exactly with high probability. Deriving such a condition was also open [2]. Theorem 3 Assume that (A1) and (A2) hold. If there exists a clustering algorithm that does not misclassify any item with high probability, then the parameters (α, p) of the LSBM satisfy: lim infn→∞ nD(α,p) log(n) ≥1. If this condition holds, then under (A3), the SP algorithm recovers the clusters exactly with high probability. The paper is organized as follows. Section 2 presents the related work and example of application of our results. In Section 3, we sketch the proof of Theorem 1, which leverages change-of-measure and coupling arguments. We present in Section 4 the Spectral Partition algorithm, and analyze its performance (we outline the proof of Theorem 2). All results are proved in details in the supplementary material. 2 Related Work and Applications 2.1 Related work Cluster recovery in the SBM has attracted a lot of attention recently. We summarize below existing results, and compare them to ours. Results are categorized depending on the targeted level of performance. First, we consider the notion of detectability, the lowest level of performance requiring that the extracted clusters are just positively correlated with the true clusters. Second, we look at asymptotically accurate recovery, stating that the proportion of misclassified items vanishes as n grows large. Third, we present existing results regarding exact cluster recovery, which means that no item is misclassified. Finally, we report recent work whose objective, like ours, is to characterize the optimal cluster recovery rate. Detectability. Necessary and sufficient conditions for detectability have been studied for the binary symmetric SBM (i.e., L = 1, K = 2, α1 = α2, p(1, 1, 1) = p(2, 2, 1) = ξ, and p(1, 2, 1) = p(2, 1, 1) = ζ). In the sparse regime where ξ, ζ = o(1), and for the binary symmetric SBM, the main focus has been on identifying the phase transition threshold (a condition on ξ and ζ) for detectability: It was conjectured in [5] that if n(ξ −ζ) < p 2n(ξ + ζ) (i.e., under the threshold), no algorithm can perform better than a simple random assignment of items to clusters, and above the threshold, clusters can partially be recovered. The conjecture was recently proved in [18] (necessary condition), and [16] (sufficient condition). The problem of detectability has been also recently studied in [24] for the asymmetric SBM with more than two clusters of possibly different sizes. Interestingly, it is shown that in most cases, the phase transition for detectability disappears. 3 The present paper is not concerned with conditions for detectability. Indeed detectability means that only a strictly positive proportion of items can be correctly classified, whereas here, we impose that the proportion of misclassified items vanishes as n grows large. Asymptotically accurate recovery. A necessary and sufficient condition for asymptotically accurate recovery in the SBM (with any number of clusters of different but linearly increasing sizes) has been derived in [22] and [17]. Using our notion of divergence specialized to the SBM, this condition is nD(α, p) = ω(1). Our results are more precise since the minimal achievable number of misclassified items is characterized, and apply to a broader setting since they are valid for the generic LSBM. Asymptotically exact recovery. Conditions for exact cluster recovery in the SBM have been also recently studied. [1, 17, 8] provide a necessary and sufficient condition for asymptotically exact recovery in the binary symmetric SBM. For example, it is shown that when ξ = a log(n) n and ζ = b log(n) n for a > b, clusters can be recovered exactly if and only if a+b 2 − √ ab ≥1. In [2, 3], the authors consider a more general SBM corresponding to our LSBM with L = 1. They define CH-divergence as: D+(α, p(i), p(j)) = n log(n) max λ∈[0,1] K X k=1 αk (1 −λ)p(i, k, 1) + λp(j, k, 1) −p(i, k, 1)1−λp(j, k, 1)λ , and show that mini̸=j D+(α, p(i), p(j)) > 1 is a necessary and sufficient condition for asymptotically exact reconstruction. The following claim, proven in the supplementary material, relates D+ to DL+. Claim 4 When ¯p = o(1), we have for all i, j: DL+(α, p(i), p(j)) n→∞ ∼ max λ∈[0,1] L X ℓ=1 K X k=1 αk (1 −λ)p(i, k, ℓ) + λp(j, k, ℓ) −p(i, k, ℓ)1−λp(j, k, ℓ)λ . Thus, the results in [2, 3] are obtained by applying Theorem 3 and Claim 4. In [13], the authors consider a symmetric labeled SBM where communities are balanced (i.e., αk = 1 K for all k) and where label probabilities are simply defined as p(i, i, ℓ) = p(ℓ) for all i and p(i, j, ℓ) = q(ℓ) for all i ̸= j. It is shown that nI log(n) > 1 is necessary and sufficient for asymptotically exact recovery, where I = −2 K log PL ℓ=0 p p(ℓ)q(ℓ) . We can relate I to D(α, p): Claim 5 In the LSBM with K clusters, if ¯p = o(1), and for all i, j, ℓsuch that i ̸= j, αi = 1 K , p(i, i, ℓ) = p(ℓ), and p(j, k, ℓ) = q(ℓ), we have: D(α, p) n→∞ ∼ −2 K log PL ℓ=0 p p(ℓ)q(ℓ) . Again from this claim, the results derived in [13] are obtained by applying Theorem 3 and Claim 5. Optimal recovery rate. In [6, 19], the authors consider the binary SBM in the sparse regime where the average degree of items in the graph is O(1), and identify the minimal number of misclassified items for very specific intra- and inter-cluster edge probabilities ξ and ζ. Again the sparse regime is out of the scope of the present paper. [23, 7] are concerned with the general SBM corresponding to our LSBM with L = 1, and with regimes where asympotically accurate recovery is possible. The authors first characterize the optimal recovery rate in a minimax framework. More precisely, they consider a (potentially large) set of possible parameters (α, p), and provide a lower bound on the expected number of misclassified items for the worst parameters in this set. Our lower bound (Theorem 1) is more precise as it is model-specific, i.e., we provide the minimal expected number of misclassified items for a given parameter (α, p) (and for a more general class of models). Then the authors propose a clustering algorithm, with time complexity O(n3 log(n)), and achieving their minimax recovery rate. In comparison, our algorithm yields an optimal recovery rate O(n2¯p log(n)) for any given parameter (α, p), exhibits a lower running time, and applies to the generic LSBM. 4 2.2 Applications We provide here a few examples of application of our results, illustrating their versatility. In all examples, f(n) is a function such that f(n) = ω(1), and a, b are fixed real numbers such that a > b. The binary SBM. Consider the binary SBM where the average item degree is Θ(f(n)), and represented by a LSBM with parameters L = 1, K = 2, α = (α1, 1−α1), p(1, 1, 1) = p(2, 2, 1) = af(n) n , and p(1, 2, 1) = p(2, 1, 1) = bf(n) n . From Theorems 1 and 2, the optimal number of misclassified vertices scales as n exp(−g(α1, a, b)f(n)(1 + o(1))) when α1 ≤1/2 (w.l.o.g.) and where g(α1, a, b) := max λ∈[0,1](1 −α1 −λ + 2α1λ)a + (α1 + λ −2αλ)b −α1aλb(1−λ) −(1 −α1)a(1−λ)bλ. It can be easily checked that g(α1, a, b) ≥g(1/2, a, b) = 1 2(√a − √ b)2 (letting λ = 1 2). The worst case is hence obtained when the two clusters are of equal sizes. When f(n) = log(n), we also note that the condition for asymptotically exact recovery is g(α1, a, b) ≥1. Recovering a single hidden community. As in [9], consider a random graph model with a hidden community consisting of αn vertices, edges between vertices belonging the hidden community are present with probability af(n) n , and edges between other pairs are present with probability bf(n) n . This is modeled by a LSBM with parameters K = 2, L = 1, α1 = α, p(1, 1, 1) = af(n) n , and p(1, 2, 1) = p(2, 1, 1) = p(2, 2, 1) = bf(n) n . The minimal number of misclassified items when searching for the hidden community scales as n exp(−h(α, a, b)f(n)(1 + o(1))) where h(α, a, b) := α a −(a −b)1 + log(a −b) −log(a log(a/b)) log(a/b) . When f(n) = log(n), the condition for asymptotically exact recovery of the hidden community is h(α, a, b) ≥1. Optimal sampling for community detection under the SBM. Consider a dense binary symmetric SBM with intra- and inter-cluster edge probabilities a and b. In practice, to recover the clusters, one might not be able to observe the entire random graph, but sample its vertex (here item) pairs as considered in [22]. Assume for instance that any pair of vertices is sampled with probability δf(n) n for some fixed δ > 0, independently of other pairs. We can model such scenario using a LSBM with three labels, namely ×, 0 and 1, corresponding to the absence of observation (the vertex pair is not sampled), the observation of the absence of an edge and of the presence of an edge, respectively, and with parameters for all i, j ∈{1, 2}, p(i, j, ×) = 1 −δf(n) n , p(1, 1, 1) = p(2, 2, 1) = a δf(n) n , and p(1, 2, 1) = p(2, 1, 1) = b δf(n) n . The minimal number of misclassified vertices scales as n exp(−l(δ, a, b)f(n)(1+o(1))) where l := δ(1− √ ab− p (1 −a)(1 −b)). When f(n) = log(n), the condition for asymptotically exact recovery is l(α, a+, a−, b+, b−) ≥1. Signed networks. Signed networks [15, 20] are used in social sciences to model positive and negative interactions between individuals. These networks can be represented by a LSBM with three possible labels, namely 0, + and -, corresponding to the absence of interaction, positive and negative interaction, respectively. Consider such LSBM with parameters: K = 2, α1 = α2, p(1, 1, +) = p(2, 2, +) = a+f(n) n , p(1, 1, −) = p(2, 2, −) = a−f(n) n , p(1, 2, +) = p(2, 1, +) = b+f(n) n , and p(1, 2, −) = p(2, 1, −) = b−f(n) n , for some fixed a+, a−, b+, b−such that a+ > b+ and a−< b−. The minimal number of misclassified individuals here scales as n exp(−m(α, a+, a−, b+, b−)f(n)(1 + o(1))) where m(α, a+, a−, b+, b−) := 1 2 (√a+ − p b+)2 + (√a−− p b−)2 . When f(n) = log(n), the condition for asymptotically exact recovery is l(α, a+, a−, b+, b−) ≥1. 3 Fundamental Limits: Change of Measures through Coupling In this section, we explain the construction of the proof of Theorem 1. The latter relies on an appropriate change-of-measure argument, frequently used to identify upper performance bounds in 5 online stochastic optimization problems [14]. In the following, we refer to Φ, defined by parameters (α, p), as the true stochastic model under which all the observed random labels are generated, and denote by PΦ = P (resp. EΦ[·] = E[·]) the corresponding probability measure (resp. expectation). In our change-of-measure argument, we construct a second stochastic model Ψ (whose corresponding probability measure and expectation are PΨ and EΨ[·], respectively). Using a change of measures from PΦ to PΨ, we relate the expected number of misclassified items EΦ[επ(n)] under any clustering algorithm π to the expected (w.r.t. PΨ) log-likelihood ratio Q of the observed labels under PΦ and PΨ. Specifically, we show that, roughly, log(n/EΦ[επ(n)]) must be smaller than EΨ[Q] for n large enough. Construction of ψ. Let (i⋆, j⋆) = arg mini,j:i<j DL+(α, p(i), p(j)), and let v⋆denote the smallest item index that belongs to cluster i⋆or j⋆. If both Vi⋆and Vj⋆are empty, we define v⋆= n. Let q ∈PK×(L+1) such that: D(α, p) = PK k=1 αkKL(q(k), p(i⋆, k)) = PK k=1 αkKL(q(k), p(j⋆, k)). The existence of such q is proved in Lemma 7 in the supplementary material. Now to define the stochastic model Ψ, we couple the generation of labels under Φ and Ψ as follows. 1. We first generate the random clusters V1, . . . , VK under Φ, and extract i⋆, j⋆, and v⋆. The clusters generated under Ψ are the same as those generated under Φ. For any v ∈V, we denote by σ(v) the cluster of item v. 2. For all pairs (v, w) such that v ̸= v⋆and w ̸= v⋆, the labels generated under Ψ are the same as those generated under Φ, i.e., the label ℓis observed on the edge (v, w) with probability p(σ(v), σ(w), ℓ). 3. Under Ψ, for any v ̸= v⋆, the observed label on the edge (v, v⋆) under Ψ is ℓwith probability q(σ(v), ℓ). Let xv,w denote the label observed for the pair (v, w). We introduce Q, the log-likelihood ratio of the observed labels under PΦ and PΨ as: Q = v⋆−1 X v=1 log q(σ(v), xv⋆,v) p(σ(v⋆), σ(v), xv⋆,v) + n X v=v⋆+1 log q(σ(v), xv⋆,v) p(σ(v⋆), σ(v), xv⋆,v). (2) Let π be a clustering algorithm with output (ˆVk)1≤k≤K, and let E = S 1≤k≤K ˆVk \ Vk be the set of misclassified items under π. Note that in general in our analysis, we always assume without loss of generality that | S 1≤k≤K ˆVk \ Vk| ≤| S 1≤k≤K ˆVγ(k) \ Vk| for any permutation γ, so that the set of misclassified items is indeed E. By definition, επ(n) = |E|. Since under Φ, items are interchangeable (remember that items are assigned to the various clusters in an i.i.d. manner), we have: nPΦ{v ∈E} = EΦ[επ(n)] = E[επ(n)]. Next, we establish a relationship between E[επ(n)] and the distribution of Q under PΨ. For any function f(n), we can prove that: PΨ{Q ≤f(n)} ≤exp(f(n)) EΦ[επ(n)] (αi⋆+αj⋆)n + αj⋆ αi⋆+αj⋆. Using this result with f(n) = log (n/EΦ[επ(n)]) −log(2/αi⋆), and Chebyshev’s inequality, we deduce that: log (n/EΦ[επ(n)]) −log(2/αi⋆) ≤EΨ[Q] + q 4 αi⋆EΨ[(Q −EΨ[Q])2], and thus, a necessary condition for E[επ(n)] ≤s is: log (n/s) −log(2/αi⋆) ≤EΨ[Q] + r 4 αi⋆EΨ[(Q −EΨ[Q])2]. (3) Analysis of Q. In view of (3), we can obtain a necessary condition for E[επ(n)] ≤s if we evaluate EΨ[Q] and EΨ[(Q −EΨ[Q])2]. To evaluate EΨ[Q], we can first prove that v⋆≤log(n)2 with high probability. From this, we can approximate EΨ[Q] by EΨ[Pn v=v⋆+1 log q(σ(v),xv⋆,v) p(σ(v⋆),σ(v),xv⋆,v)], which is itself well-approximated by nD(α, p). More formally, we can show that: EΨ[Q] ≤ n + 2 log(η) log(n)2 D(α, p) + log η n3 . (4) Similarly, we prove that EΨ[(Q −EΨ[Q])2] = O(n¯p), which in view of Lemma 8 (refer to the supplementary material) and assumption (A2), implies that: EΨ[(Q −EΨ[Q])2] = o(nD(α, p)). 6 We complete the proof of Theorem 1 by putting the above arguments together: From (3), (4) and the above analysis of Q, when the expected number of misclassified items is less than s (i.e., E[επ(n)] ≤s), we must have: lim infn→∞ nD(α,p) log(n/s) ≥1. 4 The Spectral Partition Algorithm and its Optimality In this section, we sketch the proof of Theorem 2. To this aim, we present the Spectral Partition (SP) algorithm and analyze its performance. The SP algorithm consists in two parts, and its detailed pseudo-code is presented at the beginning of the supplementary document (see Algorithm 1). The first part of the algorithm can be interpreted as an initialization for its second part, and consists in applying a spectral decomposition of a n × n random matrix A constructed from the observed labels. More precisely, A = PL ℓ=1 wℓAℓ, where Aℓis the binary matrix identifying the item pairs with observed label ℓ, i.e., for all v, w ∈V, Aℓ vw = 1 if and only if (v, w) has label ℓ. The weight wℓfor label ℓ∈{1, . . . , L} is generated uniformly at random in [0, 1], independently of other weights. From the spectral decomposition of A, we estimate the number of communities and provide asymptotically accurate estimates S1, . . . , SK of the hidden clusters asymptotically accurately, i.e., we show that when n¯p = ω(1), with high probability, ˆK = K and there exists a permutation γ of {1, . . . , K} such that 1 n ∪K k=1Vk \ Sγ(k) = O log(n¯p)2 n¯p . This first part of the SP algorithm is adapted from algorithms proposed for the standard SBM in [4, 22] to handle the additional labels in the model without the knowledge of the number K of clusters. The second part is novel, and is critical to ensure the optimality of the SP algorithm. It consists in first constructing an estimate ˆp of the true parameters p of the model from the matrices (Aℓ)1≤ℓ≤L and the estimated clusters S1, . . . , SK provided in the first part of SP. We expect p to be well estimated since S1, . . . , SK are asymptotically accurate. Then our cluster estimates are iteratively improved. We run ⌊log(n)⌋iterations. Let S(t) 1 , . . . , S(t) K denote the clusters estimated after the t-th iteration, initialized with (S(0) 1 , . . . , S(0) K ) = (S1, . . . , SK). The improved clusters S(t+1) 1 , . . . , S(t+1) K are obtained by assigning each item v ∈V to the cluster maximizing a loglikelihood formed from ˆp, S(t) 1 , . . . , S(t) K , and the observations (Aℓ)1≤ℓ≤L: v is assigned to S(t+1) k⋆ where k⋆= arg maxk{PK i=1 P w∈S(t−1) i PL ℓ=0 Aℓ vw log ˆp(k, i, ℓ)}. Part 1: Spectral Decomposition. The spectral decomposition is described in Lines 1 to 4 in Algorithm 1. As usual in spectral methods, the matrix A is first trimmed (to remove lines and columns corresponding to items with too many observed labels – as they would perturb the spectral analysis). To this aim, we estimate the average number of labels per item, and use this estimate, denoted by ˜p in Algorithm 1, as a reference for the trimming process. Γ and AΓ denote the set of remaining items after trimming, and the corresponding trimmed matrix, respectively. If the number of clusters K is known and if we do not account for time complexity, the two step algorithm in [4] can extract the clusters from AΓ: first the optimal rank-K approximation A(K) of AΓ is derived using the SVD; then, one applies the k-mean algorithm to the columns of A(K) to reconstruct the clusters. The number of misclassified items after this two step algorithm is obtained as follows. Let M ℓ= E[Aℓ Γ], and M = PL ℓ=1 wℓM ℓ(using the same weights as those defining A). Then, M is of rank K. If v and w are in the same cluster, Mv = Mw and if v and w do not belong to the same cluster, from (A2), we must have with high probability: ∥Mv −Mw∥2 = Ω(¯p√n). Thus, the k-mean algorithm misclassifies v only if ∥A(K) v −Mv∥2 = Ω(¯p√n). By leveraging elements of random graph and random matrix theories, we can establish that P v ∥A(k) v −Mv∥2 2 = ∥A(k) −M∥2 F = O(n¯p) with high probability. Hence the algorithm misclassifies O(1/¯p) items with high probability. Here the number of clusters K is not given a-priori. In this scenario, Algorithm 2 estimates the rank of M using a singular value thresholding procedure. To reduce the complexity of the algorithm, the singular values and singular vectors are obtained using the iterative power method instead of a direct SVD. It is known from [10] that with Θ (log(n)) iterations, the iterative power method find singular values and the rank-K approximation very accurately. Hence, when n¯p = ω(1), we can easily 7 estimate the rank of M by looking at the number of singular values above the threshold √n˜p log(n˜p), since we know from random matrix theory that the (K + 1)-th singular value of AΓ is much less than √n˜p log(n˜p) with high probability. In the pseudo-code of Algorithm 2, the estimated rank of M is denoted by ˜K. The rank- ˜K approximation of AΓ obtained by the iterative power method is ˆA = ˆU ˆV = ˆU ˆU ⊤AΓ. From the columns of ˆA, we can estimate the number of clusters and classify items. Almost every column of ˆA is located around the corresponding column of M within a distance 1 2 q n˜p2 log(n˜p), since P v ∥ˆAv −Mv∥2 2 = ∥ˆA −M∥2 F = O(n¯p log(n¯p)2) with high probability (we rigorously analyze this distance in the supplementary material Section D.2). From this observation, the columns can be categorised into K groups. To find these groups, we randomly pick log(n) reference columns and for each reference column, search all columns within distance q n˜p2 log(n˜p). Then, with high probability, each cluster has at least one reference column and each reference column can find most of its cluster members. Finally, the K groups are identified using the reference columns. To this aim, we compute the distance of n log(n) column pairs ˆAv, ˆAw. Observe that ∥ˆAv −ˆAw∥2 = ∥ˆVv −ˆVw∥2 for any u, v ∈Γ, since the columns of ˆU are orthonormal. Now ˆVv is of dimension ˜K, and hence we can identify the groups using O(n ˜K log(n)) operations. Theorem 6 Assume that (A1) and (A2) hold, and that n¯p = ω(1). After Step 4 (spectral decomposition) in the SP algorithm, with high probability, ˆK = K and there exists a permutation γ of {1, . . . , K} such that: ∪K k=1Vk \ Sγ(k) = O log(n¯p)2 ¯p . Part 2: Successive clusters improvements. Part 2 of the SP algorithm is described in Lines 5 and 6 in Algorithm 1. To analyze the performance of each improvement iteration, we introduce the set of items H as the largest subset of V such that for all v ∈H: (H1) e(v, V) ≤10ηn¯pL; (H2) when v ∈Vk, PK i=1 PL ℓ=0 e(v, Vi, ℓ) log p(k,i,ℓ) p(j,i,ℓ) ≥ n¯p log(n¯p)4 for all j ̸= k; (H3) e(v, V \ H) ≤2 log(n¯p)2, where for any S ⊂V and ℓ, e(v, S, ℓ) = P w∈S Aℓ vw, and e(v, S) = PL ℓ=1 e(v, S, ℓ). Condition (H1) means that there are not too many observed labels ℓ≥1 on pairs including v, (H2) means that an item v ∈Vk must be classified to Vk when considering the log-likelihood, and (H3) states that v does not share too many labels with items outside H. We then prove that |V \ H| ≤s with high probability when nD(α, p) − n¯p log(n¯p)3 ≥log(n/s) + p log(n/s). This is mainly done using concentration arguments to relate the quantity PK i=1 PL ℓ=0 e(v, Vi, ℓ) log p(k,i,ℓ) p(j,i,ℓ) involved in (H2) to nD(α, p). Finally, we establish that if the clusters provided after the first part of the SP algorithm are asymptotically accurate, then after log(n) improvement iterations, there is no misclassified items in H. To that aim, we denote by E(t) the set of misclassified items after the t-th iteration, and show that with high probability, for all t, |E(t+1)∩H| |E(t)∩H| ≤ 1 √n¯p. This completes the proof of Theorem 2, since after log(n) iterations, the only misclassified items are those in V \ H. Acknowledgments We gratefully acknowledge the support of the U.S. Department of Energy through the LANL/LDRD Program for this work. 8 References [1] E. Abbe, A. Bandeira, and G. Hall. Exact recovery in the stochastic block model. CoRR, abs/1405.3267, 2014. [2] E. Abbe and C. Sandon. Community detection in general stochastic block models: fundamental limits and efficient recovery algorithms. In FOCS, 2015. [3] E. Abbe and C. Sandon. Recovering communities in the general stochastic block model without knowing the parameters. In NIPS, 2015. [4] A. Coja-Oghlan. Graph partitioning via adaptive spectral techniques. Combinatorics, Probability & Computing, 19(2):227–284, 2010. [5] A. Decelle, F. Krzakala, C. Moore, and L. Zdeborová. Inference and phase transitions in the detection of modules in sparse networks. Phys. Rev. Lett., 107, Aug 2011. [6] Y. Deshpande, E. Abbe, and A. Montanari. Asymptotic mutual information for the two-groups stochastic block model. CoRR, abs/1507.08685, 2015. [7] C. Gao, Z. Ma, A. Zhang, and H. Zhou. Achieving optimal misclassification proportion in stochastic block model. CoRR, abs/1505.03772, 2015. [8] B. Hajek, Y. Wu, and J. Xu. Achieving exact cluster recovery threshold via semidefinite programming. CoRR, abs/1412.6156, 2014. [9] B. Hajek, Y. Wu, and J. Xu. Information limits for recovering a hidden community. CoRR, abs/1509.07859, 2015. [10] N. Halko, P. Martinsson, and J. Tropp. Finding structure with randomness: Probabilistic algorithms for constructing approximate matrix decompositions. SIAM review, 53(2):217–288, 2011. [11] S. Heimlicher, M. Lelarge, and L. Massoulié. Community detection in the labelled stochastic block model. In NIPS Workshop on Algorithmic and Statistical Approaches for Large Social Networks, 2012. [12] P. Holland, K. Laskey, and S. Leinhardt. Stochastic blockmodels: First steps. Social Networks, 5(2):109 – 137, 1983. [13] V. Jog and P. Loh. Information-theoretic bounds for exact recovery in weighted stochastic block models using the renyi divergence. CoRR, abs/1509.06418, 2015. [14] T. Lai and H. Robbins. Asymptotically efficient adaptive allocation rules. Advances in Applied Mathematics, 6(1):4–22, 1985. [15] J. Leskovec, D. Huttenlocher, and J. Kleinberg. Signed networks in social media. In CHI, 2010. [16] L. Massoulié. Community detection thresholds and the weak ramanujan property. In STOC, 2014. [17] E. Mossel, J. Neeman, and A. Sly. Consistency thresholds for binary symmetric block models. In STOC, 2015. [18] E. Mossel, J. Neeman, and A. Sly. Reconstruction and estimation in the planted partition model. Probability Theory and Related Fields, 162(3-4):431–461, 2015. [19] E. Mossel and J. Xu. Density evolution in the degree-correlated stochastic block model. CoRR, abs/1509.03281, 2015. [20] V. Traag and J. Bruggeman. Community detection in networks with positive and negative links. Physical Review E, 80(3):036115, 2009. [21] S. Yun and A. Proutiere. Accurate community detection in the stochastic block model via spectral algorithms. CoRR, abs/1412.7335, 2014. [22] S. Yun and A. Proutiere. Community detection via random and adaptive sampling. In COLT, 2014. [23] A. Zhang and H. Zhou. Minimax rates of community detection in stochastic block models. CoRR, abs/1507.05313, 2015. [24] P. Zhang, C. Moore, and M. Newman. Community detection in networks with unequal groups. CoRR, abs/1509.00107, 2015. 9 | 2016 | 386 |
6,312 | Relevant sparse codes with variational information bottleneck Matthew Chalk IST Austria Am Campus 1 A - 3400 Klosterneuburg, Austria Olivier Marre Institut de la Vision 17, Rue Moreau 75012, Paris, France Gasper Tkacik IST Austria Am Campus 1 A - 3400 Klosterneuburg, Austria Abstract In many applications, it is desirable to extract only the relevant aspects of data. A principled way to do this is the information bottleneck (IB) method, where one seeks a code that maximizes information about a ‘relevance’ variable, Y , while constraining the information encoded about the original data, X. Unfortunately however, the IB method is computationally demanding when data are high-dimensional and/or non-gaussian. Here we propose an approximate variational scheme for maximizing a lower bound on the IB objective, analogous to variational EM. Using this method, we derive an IB algorithm to recover features that are both relevant and sparse. Finally, we demonstrate how kernelized versions of the algorithm can be used to address a broad range of problems with non-linear relation between X and Y . 1 Introduction An important problem, for both humans and machines, is to extract relevant information from complex data. To do so, one must be able to define which aspects of data are relevant and which should be discarded. The ‘information bottleneck’ (IB) approach, developed by Tishby and colleagues [1], provides a principled way to approach this problem. The idea behind the IB approach is to use additional ‘variables of interest’ to determine which aspects of a signal are relevant. For example, for speech signals, variables of interest could be the words being pronounced, or alternatively, the speaker identity. One then seeks a coding scheme that retains maximal information about these variables of interest, constrained on the information encoded about the input. The IB approach has been used to tackle a wide variety of problems, including filtering, prediction and learning [2-5]. However, it quickly becomes intractable with high-dimensional and/or non-gaussian data. Consequently, previous research has primarily focussed on tractable cases, where the data comprises a countably small number of discrete states [1-5], or is gaussian [6]. Here, we extend the IB algorithm of Tishby et al. [1] using a variational approximation. The algorithm maximizes a lower bound on the IB objective function, and is closely related to variational EM. Using this approach, we derive an IB algorithm that can be effectively applied to ‘sparse’ data in which input and relevance variables are generated by sparsely occurring latent features. The resulting solutions share many properties with previous sparse coding models, used to model early sensory processing [7]. However, unlike these sparse coding models, the learned representation depends on: (i) the relation between the input and variable of interest; (ii) the trade-off between encoding quality and compression. Finally, we present a kernelized version of the algorithm, that can be applied to a large range of problems with non-linear relation between the input data and variables of interest. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. 2 Variational IB Let us define an input variable X, as well as a ‘relevance variable’, Y , with joint distribution p (y, x). The goal of the IB approach is to compress the variable X through another variable R, while conserving information about Y . Mathematically, we seek an encoding model, p (r|x), that maximizes: Lp(r|x) = I (R; Y ) −γI (R; X) ≡ ⟨log p (y|r) −log p (y) + γ log p (r) −γ log p (r|x)⟩p(r,x,y) , (1) where 0 < γ < 1 is a Lagrange multiplier that determines the strength of the bottleneck. Tishby and colleagues showed that the IB loss function can be optimized by applying iterative updates: pt+1 (r|x) ∝pt (r) exp h −1 γ R y p (y|x) log p(y|x) pt(y|r) i , pt+1 (r) = R x p (x) pt+1 (r|x) and pt+1 (y|r) = R x p (y|x) pt+1 (x|r) [1]. Unfortunately however, when p (x, y) is high-dimensional and/or non-gaussian these updates become intractable, and approximations are required. Due to the positivity of the KL divergence, we can write, ⟨log q (·)⟩p(·) ≤⟨log p (·)⟩p(·) for any approximative distribution q(·). This allows us to formulate a variational lower bound for the IB objective function: ˜Lp(r|x),q(y|r),q(r) = 1 N N X n=1 ⟨log q (yn|r) + γ log q (r) −γ log p (r|xn)⟩p(r|xn) (2) ≤ Lp(r|x), where q (yn|r) and q (r) are variational distributions, and we have replaced the expectation over p (x, y) with the empirical expectation over training data. (Note that, for notational simplicity we have also omitted the constant term, HY = −⟨log p (y)⟩p(y).) Setting q (yn|r) ←p (yn|r) and q (r) ←p (r) fully tightens the bound (so that ˜L = L), and leads to the iterative algorithm of Tishby et al. However, when these exact updates are not possible, one can instead choose a restricted class of distributions q (y|r) ∈Qy|r and q (r) ∈Qr for which inference is tractable. Thus, to maximize ˜L with respect to parameters Θ of the encoding distribution p (r|x, Θ), we repeat the following steps until convergence: • For fixed Θ, find {qnew (y|r) , qnew (r)} = arg max{q(y|r),q(r)}∈{Qy|r,Qr} ˜L • For fixed q (y|r) and q (r), find Θ = arg maxΘ ˜L. We note that using a simple approximation for the decoding distribution, q(y|r), can carry additional benefits, besides rendering the IB algorithm tractable. Specifically, while an advantage of mutual information is its generality, in certain cases this can also be a drawback. That is, because Shannon information does not make any assumptions about the code, it is not always apparent how information should be best extracted from the responses: just because information is ‘there’ does not mean we know how to get at it. In contrast, using a simple approximation for the decoding distribution, q(y|r) (e.g. linear gaussian), constrains the IB algorithm to find solutions where information about Y can be easily extracted from the responses (e.g. via linear regression). 3 Sparse IB In previous work on gaussian IB [6], responses were equal to a linear projection of the input, plus noise: r = Wx + η, where W is an Nr × Nx matrix of encoding weights, and η ∼N (η|0, Σ), where Σ is an Nr ×Nr covariance matrix. When the joint distribution, p (x, y), is gaussian, it follows that the marginal and decoding distributions, p (r) and p (y|r), are also gaussian, and the parameters of the encoding distribution, W and Σ, can be found analytically. To illustrate the capabilities of the variational algorithm, while permitting comparison to gaussian IB, we begin by adding a single degree of complexity. In common with gaussian IB, we consider 2 a linear gaussian encoder, p (r|x) = N (r|Wx, Σ), and decoder, q (y|r) = N (y|Ur, Λ). However, unlike gaussian IB, we use a student-t distribution to approximate the response marginal: q (r) = Q i Student ri|0, ω2 i , νi , with scale and shape parameters, ω2 i and νi, respectively. When the shape parameter, νi, is small then the student-t distribution is heavy-tailed, or ‘sparse’, compared to a gaussian distribution. Thus, we call the resulting algorithm ‘sparse IB’. Unlike gaussian IB, the introduction of a student-t marginal means the IB algorithm cannot be solved analytically, and one requires approximations. 3.1 Iterative algorithm Recall that the IB objective function consists of two terms: I (R; Y ), and I (R; X). We begin by describing how to optimize the lower and upper bound of each of these two terms with respect to the variational distributions q(y|r) and q(r), respectively. The first term of the IB objective function is bounded from below by: I (R; Y ) ≥−1 2 log |Λ| −1 2N X n D (yn −Ur)T Λ−1 (yn −Ur) E p(r|xn) + const. (3) Maximizing the lower bound on I (R; Y ) with respect to the decoding parameters, U and Λ, gives: Λ = Cyy −UWCxy, U = CT xyW T WCxxW T + Σ −1 (4) where Cyy = 1 N P n ynyT n , Cxy = 1 N P n xnyT n , and Cxx = 1 N P n xnxT n. Unfortunately, it is not straightforward to express the bound on I (R; X) in closed form. Instead, we use an additional variational approximation, utilising the fact that the student-t distribution can be expressed as an infinite mixture of gaussians: Student r|0, ω2, ν = R η N r|0, ω2 Gamma η| ν 2, ν 2 [8]. Following a standard EM procedure [9], one can thus write a tractable lower bound on the loglikelihood, l ≡log Student r|0, ω2, ν , which corresponds to an upper-bound on the bottleneck term: I (R; X) ≤ X i,n ⟨−log q (ri) + log p (ri|xn)⟩p(ri|xn) (5) ≤ X i " 1 2 log ω2 i + 1 2Nω2 i N X n=1 ξni r2 ni + f (νi, ξi, ai) # −1 2 log |Σ| + const. where ξni, and ai denote variational parameters for the ith unit and nth data instance. We used the shorthand notation, r2 ni = wixnxT nwT i + σ2 i , where σ2 i is the ith diagonal element of Σ and wi is the ith row of W. For notational simplicity, terms that do not depend on the encoding parameters were pushed into the function, f (νi, ξi, ai)1. Minimizing the upper bound on I (R; X) with respect to ω2 i , ξni and ai (for fixed νi) gives: ω2 i = 1 N N X n=1 ξni r2 ni , ξni = νi + 1 νi + ⟨r2 ni⟩/ω2 i , ai = 1 2(νi + 1), (6) The shape parameter, νi, is then found numerically on each iteration (for fixed ξni and ai), by solving: ψ νi 2 −log νi 2 = 1 + 1 N N X n=1 ψ(ai) −log ai ξni −ξni , (7) where ψ(·) is the digamma function [9]. Next we maximize the full variational objective function ˜L with respect to the encoding distribution, p (r|x) (for fixed q(y|r) and q(r)). Maximizing ˜L with respect to the encoding noise covariance, Σ, gives: Σ−1 = 1 γ U T Λ−1U + 1 N Ω−1 N X n=1 Ξn, (8) 1 f (νi, ξi, ai) = log Γ νi 2 −νi 2 log νi 2 −1 N P n h νi−1 2 ψ(ai) −ln ai ξni −νi 2 ξni + Hni i , where Hni is the entropy of a gamma distribution with shape and rate parameters: ai, and ai/ξni, respectively [9]. 3 decoding filters encoding filters decoding filters encoding filters gaussian IB sparse IB ˆY X R A B C D response (a.u.) −10 0 10 0.001 0.01 0.1 1 gaussian IB sparse IB prob density F 0 20 40 60 80 0 0.5 1 gaussian IB sparse IB σ2 s σ2s +σ2n Ilin(Y ; R) (nats) I(X; R) (nats) 0 50 100 150 0 50 100 E gaussian IB sparse IB null model W U units Figure 1: Behaviour of sparse IB and gaussian IB algorithms, on denoising task. (A) Artificial image patches were constructed from combinations of orientated edge-like features. Patches were corrupted with white noise to generate the input, X. The goal of the IB algorithm is to learn a linear code that maximized information about the original patches, Y , constrained on information encoded about the input, X. (B) A selection of linear encoding (left), and decoding (right) filters obtained with the gaussian IB algorithm. (C) Same as B, but for the sparse IB algorithm. (D) Response histograms for the 10 units with highest variance, for the gaussian (red) and sparse (blue) IB algorithms. (E) Information curves for the gaussian (red) and sparse (blue) algorithms, alongside a ‘null’ model, where responses were equal to the original input, plus white noise. (F) Fraction of response variance attributed to signal fluctuations, for each unit. Solid and dashed curves correspond to strong and weak bottlenecks, respectively (corresponding to the vertical dashed lines in panel E). where Ωand Ξn are Nr × Nr diagonal covariance matrices with diagonal elements Ωii = ω2 i , and (Ξn)ii = ξni, respectively. Finally, taking the derivative of ˜L with respect to the encoding weights, W, gives: ∂˜L ∂W = U T Λ−1CT xy −U T Λ−1UWCxx −γΩ−1 1 N X n ΞnWxnxT n, (9) Setting the derivative to zero, we can solve for W directly. One may verify that, when variational parameters, ξni, are unity, the above iterative updates are identical to the iterative gaussian IB algorithm described in [6]. 3.2 Simulations In our framework, the approximation of the response marginal, q (r), plays an analogous role to the prior distribution in a probabilistic generative model. Thus, we hypothesized that a sparse approximation for the response marginal, q(r), would permit the IB algorithm to recover sparsely occurring input features, analogous to the effect of using a sparse prior. 4 A D reconstruction Figure 2: spatially correlated noise C X Y B −90 −45 0 45 90 0 5 10 encoded orientation (relative to vertical) no. of units stim. Figure 2: Variant of the task in figure 1, in which the input noise is spatically correlated. (A) Example input X and patch, Y . Spatial noise correlations were aligned along the vertical direction. (B) Subset of decoding filters obtained with the sparse IB algorithm. (C) Distribution of encoded orientations. (D) Example stimulus (left) and reconstruction (right) of bars presented at variable orientations (presented with zero input noise, so that X ≡Y for this example). To show this, we constructed artificial 9 × 9 image patches from combinations of orientated bar features. Each bar had a gaussian cross-section, with maximum amplitude drawn from a standard normal distribution of width 1.2 pixels. Patches were constructed by linearly combining 3 bars, with uniformly random orientation and position. Initially, we considered a simple de-noising task, where the input, X, was a noisy version of the original image patches (gaussian noise, with variance σ2 = 0.005; figure 1A). Training data consisted of 10,000 patches. Figure 1B and 1C show a selection of encoding (W) and decoding (U) filters obtained with the gaussian and sparse IB models, respectively. As predicted, only the sparse IB model was able to recover the original bar features. In addition, response histograms were considerably more heavy-tailed for the sparse IB model (fig. 1D). The relevant information, I(R; Y ), encoded by the sparse model was greater than for the gaussian model, over a range of bottleneck strengths (fig. 1E). While the difference may appear small, it is consistent with work showing that sparse coding models achieve only a small improvement in log-likelihood for natural image patches [10]. We also plotted the information curve for a ‘null model’, with responses sampled from p(r|x) = N(r|x, σ2I). Interestingly, the performance of this null model was almost identical to the gaussian IB model. Figure 1F plots the fraction of response variance due to the signal, for each unit ( wiCxxwT i wiCxxwT i +σ2 i ). Solid and dashed curves denote strong and weak bottlenecks, respectively. In both cases, the gaussian model gave a smooth spectrum of response magnitudes, while the sparse model was more ‘all-or-nothing’. One way the sparse IB algorithm differs qualitatively from traditional sparse coding algorithms, is that the learned representation depends on the relation between X and Y , rather than just the input statistics. To illustrate this, we conducted simulations with patches corrupted by spatially correlated noise, aligned along the vertical direction (fig. 2A). The spatial covariance of the noise was described by a gaussian envelope, with standard deviation 3 pixels in the vertical direction and 1 pixel in horizontal direction. Figure 2B shows a selection of decoding filters obtained from the sparse IB model, with correlated input noise. The shape of individual filters was qualitatively similar to those obtained with uncorrelated noise (fig. 1C). However, with this stimulus, the IB model avoided ‘wasting’ bits by representing features co-orientated with the noise (fig. 2C). Consequently, it was not possible to reconstruct vertical bars from the responses, when bars were presented alone, even with zero noise (fig. 2D). 4 Kernel IB One way to improve the IB algorithm is to consider non-linear encoders. A general choice is: p (r|x) = N(r|Wφ(x), Σ), where φ(x) is an embedding to a high-dimensional non-linear feature space. 5 −10 0 10 0.0001 0.001 0.01 0.1 1 sparse kIB A B D I(X; R) (nats) gaussian kIB sparse IB gaussian IB Ilin(Y ; R) (nats) 0 20 40 0 5 10 15 20 E C gaussian kIB sparse kIB response (a.u.) prob density X R U f(X) ˆY −5 0 5 response (a.u.) stim 1 stim 2 stim 3 stim 1 stim 2 stim 3 G F recon. patches stim 1 stim 2 stim 3 gaussian kIB sparse kIB sparse IB Figure 3: Behaviour of kernel IB algorithm on occlusion task. (A) Image patches were the same as for figure 1. However, the input, X, was restricted to 2 columns to either side of the patch. The target variable, Y , was the central region. (B) Subset of decoding filters, U, for the sparse kernel IB (‘sparse kIB’) algorithm. (C) As for B, for other versions of the IB algorithm. (D) Information curves for the gaussian kIB (blue) sparse kIB (green) and sparse IB algorithms (red). The bottleneck strength for the other panels in this figure is indicated by a vertical dashed line. (E) Response histogram for the 10 units with highest variance, for the gaussian and sparse kIB models. (F) (above) Three test stimuli, used to demonstrate the non-linear properties of the sparse KIB code. (below) Reconstruction obtained from responses to test stimulus. (G) Responses of two units which showed strong responses to stimulus 3. The decoding filters for these units are shown above the bar plots. The variational objective functions for both gaussian and sparse IB algorithms are quadratic in the responses, and thus can be expressed in terms of dot products of the row vector, φ(x). Consequently, every solution for wi can be expressed as an expansion of mapped training data, wi = PN n=1 ainφ(xn) [11]. It follows that the variational IB algorithm can be expressed in‘dual space’, with responses to the nth input drawn from r ∼N(r|Akn, Σ), where A is an Nr ×N matrix of expansion coefficients, and kn is the nth column of the N × N kernel-gram matrix, K, with elements Knm = φ(xn)φ(xm)T . In this formulation, the problem of finding the linear encoding weights, W, is replaced by finding the expansion coefficients, A. The advantage of expressing the algorithm in the dual space is that we never have to deal with φ(x) directly, so are free to consider high- (or even infinite) dimensional feature spaces. However, without additional constraints on the expansion coefficients, A, the IB algorithm becomes degenerate (i.e. the solutions are independent of the input, X). A standard way to deal with this is to add an L2 regularization term that favours solutions with small expansion coefficients. Here, this is achieved here by replacing φT nφn with φT nφn + λI, where λ is a fixed regularization parameter. Doing so, the derivative of ˜L with respect to A becomes: ∂˜L ∂A = U T Λ−1Y K − X n U T Λ−1U + γΩ−1Ξn A knkT n + λK (10) Setting the derivative to zero and solving for A directly requires inverting an NNr × NNr matrix, which is expensive. Instead, one can use an iterative solver (we used the conjugate gradients squared 6 Figure 5: handwritten digits sparse kIB gaussian kIB sparse IB gaussian IB X R U f(X) −10 0 10 0.001 0.01 0.1 1 gaussian kIB sparse kIB response (a.u.) prob density A B D C ˆY Figure 4: Behaviour of kernel IB algorithm on handwritten digit data. (A) As with figure 4, we considered an occlusion task. This time, units were provided with the left hand side of the image patch, and had to reconstruct the right hand side. (B) Response distribution for 10 neurons with highest variance, for the gaussian (blue) and sparse (green) kIB algorithms. (C) Decoding filters for a subset of units, obtained with the sparse kIB algorithm. Note that, for clearer visualization, we show here the decoding filter for the entire image patch, not just the occluded region. (D) A selection of decoding filters obtained with the alternative IB algorithms. method). In addition, the computational complexity can be reduced by restricting the solution to lie on a subspace of training instances, such that, wi = PM n=1 ainφ(xn), where M < N. The derivation does not change, only now K has dimensions M × N [11]. When q(r) is gaussian (equivalent to setting Ξn = I), solving for A gives: A = U T Λ−1U + γΩ−1−1 U T Λ−1AKRR (11) where AKRR = Y (K + λI)−1 are the coefficients obtained from kernel ridge-regression (KRR). This suggests the following two stage algorithm: first, we learn the regularisation constant, λ, and parameters of the kernel matrix, K, to maximize KRR performance on hold-out data; next, we perform variational IB, with fixed K and λ. 4.1 Simulations To illustrate the capabilities of the kernel IB algorithm, we considered an ‘occlusion’ task, with the outer columns of each patch presented as input, X (2 columns to the far left and right), and the inner columns as the relevance variable Y , to be reconstructed. Image patches were as before. Note that performing the occlusion task optimally requires detecting combinations of features presented to either side of the occluded region, and is thus inherently nonlinear. We used gaussian kernels, with scale parameter, κ, and regularisation constant, λ, chosen to maximize KRR performance on test data. Both test and training data consisted of 10,000 images. However, A was restricted to lie on a subset of 1000 randomly chosen training patches (see earlier). Figure 3B shows a selection of decoding filters (U) learned by the sparse kernel IB algorithm (‘sparse kIB’). A large fraction of filters resembled near-horizontal bars, traversing the occluded region. This was not the case for the sparse linear IB algorithm, which recovered localized blobs either side of the occluded region, nor the gaussian linear or kernelized models, which recovered non-local features (fig. 3C). Figure 3D shows a small but significant improvement in performance for the sparse kIB versus the gaussian kIB model. Most noticeable, however, is the distribution of responses, which are much more heavy tailed for the sparse kIB algorithm (fig. 3E). To demonstrate the non-linear behaviour of the sparse kIB model, we presented bar segments: first to either side of the occluded patch, then to both sides simultaneously. When bar segments were presented to both sides simultaneously, the sparse KIB model ‘filled in’ the missing bar segment, 7 in contrast to the reconstruction obtained with single bar segments (fig. 3F). This behaviour was reflected in the non-linear responses of certain encoding units, which were large when two segments were presented together, but near zero when one segment was presented alone (fig. 3G). Finally, we repeated the occlusion task with handwritten digits, taken from the USPS dataset (www. gaussianprocess.org/gpml/data). We used 4649 training and 4649 test patches, of 16×16 pixels. However, expansion coeffecients were restricted to a lie on subset of 500 randomly patches. We set X and Y , to be the left and right side of each patch, respectively (fig. 4A). In common with the artificial data, the response distributions achieved with the sparse kIB algorithm were more heavy-tailed than for the gaussian kIB algorithm (fig. 4B). Likewise, recovered decoding filters closely resembled handwritten digits, and extended far into the occluded region (fig. 4C). This was not the case for the alternative IB algorithms (fig. 4D). 5 Discussion Previous work has shown close parallels between the IB framework and maximum-likelihood estimation in a latent variable model [12, 13]. For the sparse IB algorithm presented here, maximizing the IB objective function is closely related to maximizing the likelihood of a ‘sparse coding’ latent variable model, with student-t prior and linear gaussian likelihood function. However, unlike traditional sparse coding models, the encoding (or ‘recognition’) model p(r|x) is conditioned on a seperate set of inputs, X, distinct from the image patches themselves. Thus, the solutions depend on the relation between X and Y , not just the image statistics (e.g. see fig. 2). Second, an additional parameter, γ, not present in sparse coding models, controls the trade-off between encoding and compression. Finally, in contrast to traditional sparse coding algorithms, IB gives an unambiguous ordering of features, which can be arranged according to the response variance of each unit (fig. 1F). Our work is also closely related to the IM algorithm, proposed by Barber et al. to solve the information maximization (‘infomax’) problem [14]. However, a general issue with infomax problems is that they are usually ill-posed, necessitating additional ad hoc constraints on the encoding weights or responses [15]. In contrast, in the IB approach, such constraints emerge automatically from the bottleneck term. A related method to find low-dimensional projections of X/Y pairs is canonical correlation analysis (‘CCA’), and its kernel analogue [16]. In fact, the features obtained with gaussian IB are identical to those obtained with CCA [6]. However, unlike CCA, the number and ‘scale’ of the features are not specified in advance, but determined by the bottleneck parameter, γ. Secondly, kernel CCA is symmetric in X and Y , and thus performs nonlinear embedding of both X and Y . In contrast, the IB problem is assymetric: we are interested in recovering Y from an input X. Thus, only X is kernelized, while the decoder remains linear. Finally, the features obtained from gaussian IB (and thus, CCA) differ qualitatively from the sparse IB algorithm, which recovers sparse features that account jointly for X and Y . Sparse IB can be extended to the nonlinear regime using a kernel expansion. For the gaussian model, the expansion coefficients, A, are a linear projection of the coefficients used for kernel-ridgeregression (‘KRR’). A general disadvantage of KRR, is that it can be difficult to know which aspects of X are relied on to perform the regression. In contrast, the kernel IB framework provides an intermediate representation, allowing one to visualize the features that jointly account for both X and Y (figs. 3B & 4C). Furthermore, this learned representation permits generalisation across different tasks that rely on the same set of latent features; something not possible with KRR. Finally, the IB approach has important implications for models of early sensory processing [17, 18]. Notably, ‘efficient coding’ models typically consider the low-noise limit, where the goal is to reduce the neural response redundancy [7]. In contrast, the IB approach provides a natural way to explore the family of solutions that emerge as one varies internal coding constraints (by varying γ) and external constraints (by varying the input, X) [19, 20]. Further, our simulations suggest how the framework can be used to go beyond early sensory processing: for example to explain higher-level cognitive phenomena such as perceptual filling in (fig. 3G). In future, it would be interesting to explore how the IB framework can be used to extend the efficient coding theory, by accounting for modulations in sensory processing that occur due to changing task demands (i.e. via changes to the relevance variable, Y ), rather than just the input statistics (X). 8 References [1] Tishby, N. Pereira, F C. & Bialek, W. (1999) The information bottleneck method. The 37th annual Allerton Conference on Communication, Control and Computing. pp. 368–377 [2] Bialek, W. Nemenman, I. & Tishby, N. (2001) Predictability, complexity, and learning. Neural computation, 13(11) pp. 240- 63 [3] Slonim, N. (2003) Information bottleneck theory and applications. PhD thesis, Hebrew University of Jerusalem [4] Chechik, G. & Tishby, N. (2002) Extracting relevant structures with side information. In Advances in Neural Information Processing Systems 15 [5] Hofmann, T. & Gondek, D. (2003) Conditional information bottleneck clustering. In 3rd IEEE International conference in data mining, workshop on clustering large data sets [6] Chechik, G. Globerson, A., Tishby, N. & Weiss, Y. (2005) Information bottleneck for gaussian variables. Journal of Machine Learning Research, (6) pp. 165–188 [7] Simoncelli, E. P. & Olshausen, B. A. (2001) Natural image statistics and neural representation. Ann. Rev. Neurosci. 24:1194–216 [8] Andrews, D. F. & Mallows C. L. (1974). Scale mixtures of normal distributions. J. of the Royal Stat. Society. Series B 36(1) pp. 99–102 [9] Scheffler, C. (2008). A derivation of the EM updates for finding the maximum likelihood parameter estimates of the student-t distribution. Technical note. URL www.inference.phy.cam.ac.uk/cs482/publications/ scheffler2008derivation.pdf [10] Eichhorn, J. Sinz, F. & Bethge, M. (2009). Natural image coding in V1: how much use is orientation selectivity?. PLoS Comput Biol, 5(4), e1000336. [11] Mika, S. Ratsch, G. Weston, J. Scholkopf, B. Smola, A. J. & Muller, K. R. (1999). Invariant Feature Extraction and Classification in Kernel Spaces. In Advances in neural information processing systems 12 pp. 526–532. [12] Slonim, N., & Weiss, Y. (2002). Maximum likelihood and the information bottleneck. In Advances in neural information processing systems pp. 335–342 [13] Elidan, G., & Friedman, N. (2002). The information bottleneck EM algorithm. In Proceedings of the Nineteenth conference on Uncertainty in Artificial Intelligence pp. 200–208 [14] Barber, D. & Agakov, F. (2004) The IM algorithm: a variational approach to information maximization. In Advances in Neural Information Processing Systems 16 pp. 201–208 [15] Doi, E., Gauthier, J. L. Field, G. D. Shlens, J. Sher, A. Greschner, M. (2012). Efficient Coding of Spatial Information in the Primate Retina. The Journal of neuroscience 32(46), pp. 16256–16264 [16] Hardoon, D. R., Szedmak, S. & Shawe-Taylor, J. (2004). Canonical correlation analysis: An overview with application to learning methods. Neural computation, 16(12), 2639-2664. [17] Bialek, W., de Ruyter Van Steveninck, R. R., & Tishby, N. (2008). Efficient representation as a design principle for neural coding and computation. In Information Theory, 2006 IEEE International Symposium pp. 659–663 [18] Palmer, S. E., Marre, O., Berry, M. J., & Bialek, W. (2015). Predictive information in a sensory population. Proceedings of the National Academy of Sciences 112(22) pp. 6908–6913. [19] Doi, Eizaburo. & Lewicki, M. S. (2005). Sparse coding of natural images using an overcomplete set of limited capacity units. In Advances in Neural Information Processing Systems 17 pp. 377–384 [20] Tkacik, G. Prentice, J. S. Balasubramanian, V. & Schneidman, E. (2010). Optimal population coding by noisy spiking neurons. Proceedings of the National Academy of Sciences 107(32), pp. 14419-14424. 9 | 2016 | 387 |
6,313 | Learning What and Where to Draw Scott Reed1,∗ reedscot@google.com Zeynep Akata2 akata@mpi-inf.mpg.de Santosh Mohan1 santoshm@umich.edu Samuel Tenka1 samtenka@umich.edu Bernt Schiele2 schiele@mpi-inf.mpg.de Honglak Lee1 honglak@umich.edu 1University of Michigan, Ann Arbor, USA 2Max Planck Institute for Informatics, Saarbrücken, Germany Abstract Generative Adversarial Networks (GANs) have recently demonstrated the capability to synthesize compelling real-world images, such as room interiors, album covers, manga, faces, birds, and flowers. While existing models can synthesize images based on global constraints such as a class label or caption, they do not provide control over pose or object location. We propose a new model, the Generative Adversarial What-Where Network (GAWWN), that synthesizes images given instructions describing what content to draw in which location. We show high-quality 128 × 128 image synthesis on the Caltech-UCSD Birds dataset, conditioned on both informal text descriptions and also object location. Our system exposes control over both the bounding box around the bird and its constituent parts. By modeling the conditional distributions over part locations, our system also enables conditioning on arbitrary subsets of parts (e.g. only the beak and tail), yielding an efficient interface for picking part locations. 1 Introduction Generating realistic images from informal descriptions would have a wide range of applications. Modern computer graphics can already generate remarkably realistic scenes, but it still requires the substantial effort of human designers and developers to bridge the gap between high-level concepts and the end product of pixel-level details. Fully automating this creative process is currently out of reach, but deep networks have shown a rapidly-improving ability for controllable image synthesis. In order for the image-generating system to be useful, it should support high-level control over the contents of the scene to be generated. For example, a user might provide the category of image to be generated, e.g. “bird”. In the more general case, the user could provide a textual description like “a yellow bird with a black head”. Compelling image synthesis with this level of control has already been demonstrated using convolutional Generative Adversarial Networks (GANs) [Goodfellow et al., 2014, Radford et al., 2016]. Variational Autoencoders also show some promise for conditional image synthesis, in particular recurrent versions such as DRAW [Gregor et al., 2015, Mansimov et al., 2016]. However, current approaches have so far only used simple conditioning variables such as a class label or a non-localized caption [Reed et al., 2016b], and did not allow for controlling where objects appear in the scene. To generate more realistic and complex scenes, image synthesis models can benefit from incorporating a notion of localizable objects. The same types of objects can appear in many locations in different scales, poses and configurations. This fact can be exploited by separating the questions of “what” ∗Majority of this work was done while first author was at U. Michigan, but completed while at DeepMind. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. and “where” to modify the image at each step of computation. In addition to parameter efficiency, this yields the benefit of more interpretable image samples, in the sense that we can track what the network was meant to depict at each location. Beak Belly This bird is bright blue. Right leg This bird is completely black. Head a man in an orange jacket, black pants and a black cap wearing sunglasses skiing Figure 1: Text-to-image examples. Locations can be specified by keypoint or bounding box. For many image datasets, we have not only global annotations such as a class label but also localized annotations, such as bird part keypoints in Caltech-USCD birds (CUB) [Wah et al., 2011] and human joint locations in the MPII Human Pose dataset (MHP) [Andriluka et al., 2014]. For CUB, there are associated text captions, and for MHP we collected a new dataset of 3 captions per image. Our proposed model learns to perform locationand content-controllable image synthesis on the above datasets. We demonstrate two ways to encode spatial constraints (though there could be many more). First, we show how to condition on the coarse location of a bird by incorporating spatial masking and cropping modules into a text-conditional GAN, implemented using spatial transformers. Second, we can condition on part locations of birds and humans in the form of a set of normalized (x,y) coordinates, e.g. beak@(0.23,0.15). In the second case, the generator and discriminator use a multiplicative gating mechanism to attend to the relevant part locations. The main contributions are as follows: (1) a novel architecture for text- and location-controllable image synthesis, yielding more realistic and higher-resolution CUB samples, (2) a text-conditional object part completion model enabling a streamlined user interface for specifying part locations, and (3) exploratory results and a new dataset for pose-conditional text to human image synthesis. 2 Related Work In addition to recognizing patterns within images, deep convolutional networks have shown remarkable capability to generate images. Dosovitskiy et al. [2015] trained a deconvolutional network to generate 3D chair renderings conditioned on a set of graphics codes indicating shape, position and lighting. Yang et al. [2015] followed with a recurrent convolutional encoder-decoder that learned to apply incremental 3D rotations to generate sequences of rotated chair and face images. Oh et al. [2015] used a similar approach in order to predict action-conditional future frames of Atari games. Reed et al. [2015] trained a network to generate images that solved visual analogy problems. The above models were all deterministic (i.e. conventional feed-forward and recurrent neural networks), trained to learn one-to-one mappings from the latent space to pixel space. Other recent works take the approach of learning probabilistic models with variational autoencoders [Kingma and Welling, 2014, Rezende et al., 2014]. Kulkarni et al. [2015] developed a convolutional variational autoencoder in which the latent space was “disentangled” into separate blocks of units corresponding to graphics codes. Gregor et al. [2015] created a recurrent variational autoencoder with attention mechanisms for reading and writing portions of the image canvas at each time step (DRAW). In addition to VAE-based image generation models, simple and effective Generative Adversarial Networks [Goodfellow et al., 2014] have been increasingly popular. In general, GAN image samples are notable for their relative sharpness compared to samples from the contemporary VAE models. Later, class-conditional GAN [Denton et al., 2015] incorporated a Laplacian pyramid of residual images into the generator network to achieve a significant qualitative improvement. Radford et al. [2016] proposed ways to stabilize deep convolutional GAN training and synthesize compelling images of faces and room interiors. Spatial Transformer Networks (STN) [Jaderberg et al., 2015] have proven to be an effective visual attention mechanism, and have already been incorporated into the latest deep generative models. Eslami et al. [2016] incorporate STNs into a form of recurrent VAE called Attend, Infer, Repeat (AIR), that uses an image-dependent number of inference steps, learning to generate simple multi-object 2D and 3D scenes. Rezende et al. [2016] build STNs into a DRAW-like recurrent network with impressive sample complexity visual generalization properties. 2 Larochelle and Murray [2011] proposed the Neural Autoregressive Density Estimator (NADE) to tractably model distributions over image pixels as a product of conditionals. Recently proposed spatial grid-structured recurrent networks [Theis and Bethge, 2015, van den Oord et al., 2016] have shown encouraging image synthesis results. We use GANs in our approach, but the same principle of separating “what” and “where” conditioning variables can be applied to these types of models. 3 Preliminaries 3.1 Generative Adversarial Networks Generative adversarial networks (GANs) consist of a generator G and a discriminator D that compete in a two-player minimax game. The discriminator’s objective is to correctly classify its inputs as either real or synthetic. The generator’s objective is to synthesize images that the discriminator will classsify as real. D and G play the following game with value function V (D, G): min G max D V (D, G) = Ex∼pdata(x)[log D(x)] + Ex∼pz(z)[log(1 −D(G(z)))] where z is a noise vector drawn from e.g. a Gaussian or uniform distribution. Goodfellow et al. [2014] showed that this minimax game has a global optimium precisely when pg = pdata, and that when G and D have enough capacity, pg converges to pdata. To train a conditional GAN, one can simply provide both the generator and discriminator with the additional input c as in [Denton et al., 2015, Radford et al., 2016] yielding G(z, c) and D(x, c). For an input tuple (x, c) to be intepreted as “real”, the image x must not only look realistic but also match its context c. In practice G is trained to maximize log D(G(z, c)). 3.2 Structured joint embedding of visual descriptions and images To encode visual content from text descriptions, we use a convolutional and recurrent text encoder to learn a correspondence function between images and text features, following the approach of Reed et al. [2016a] (and closely related to Kiros et al. [2014]). Sentence embeddings are learned by optimizing the following structured loss: 1 N N X n=1 ∆(yn, fv(vn)) + ∆(yn, ft(tn)) (1) where {(vn, tn, yn), n = 1, ..., N} is the training data set, ∆is the 0-1 loss, vn are the images, tn are the corresponding text descriptions, and yn are the class labels. fv and ft are defined as fv(v) = arg max y∈Y Et∼T (y)[φ(v)T ϕ(t))], ft(t) = arg max y∈Y Ev∼V(y)[φ(v)T ϕ(t))] (2) where φ is the image encoder (e.g. a deep convolutional network), ϕ is the text encoder, T (y) is the set of text descriptions of class y and likewise V(y) for images. Intuitively, the text encoder learns to produce a higher compatibility score with images of the correspondong class compared to any other class, and vice-versa. To train the text encoder we minimize a surrogate loss related to Equation 1 (see Akata et al. [2015] for details). We modify the approach of Reed et al. [2016a] in a few ways: using a char-CNN-GRU [Cho et al., 2014] instead of char-CNN-RNN, and estimating the expectations in Equation 2 using the average of 4 sampled captions per image instead of 1. 4 Generative Adversarial What-Where Networks (GAWWN) In the following sections we describe the bounding-box- and keypoint-conditional GAWWN models. 4.1 Bounding-box-conditional text-to-image model Figure 2 shows a sketch of the model, which can be understood by starting from input noise z ∈RZ and text embedding t ∈RT (extracted from the caption by pre-trained 2 encoder ϕ(t)) and following the arrows. Below we walk through each step. First, the text embedding (shown in green) is replicated spatially to form a M × M × T feature map, and then warped spatially to fit into the normalized bounding box coordinates. The feature map 2Both φ and ϕ could be trained jointly with the GAN, but pre-training allows us to use the best available image features from higher resolution images (224 × 224) and speeds up GAN training. 3 entries outside the box are all zeros.3 The diagram shows a single object, but in the case of multiple localized captions, these feature maps are averaged. Then, convolution and pooling operations are applied to reduce the spatial dimension back to 1 × 1. Intuitively, this feature vector encodes the coarse spatial structure in the image, and we concatenate this with the noise vector z. A red bird with a black face Generator Network Discriminator Network = Deconv = Conv { 0, 1 } 1 1 16 16 Spatial replicate, crop to bbox Global Local depth concat 16 16 128 128 16 16 16 16 128 128 128 crop to bbox replicate spatial A red bird with a black face Local 1 1 depth concat crop to bbox 16 16 Global 16 16 16 16 Figure 2: GAWWN with bounding box location control. In the next stage, the generator branches into local and global processing stages. The global pathway is just a series of stride-2 deconvolutions to increase spatial dimension from 1 × 1 to M × M. In the local pathway, upon reaching spatial dimension M × M, a masking operation is applied so that regions outside the object bounding box are set to 0. Finally, the local and global pathways are merged by depth concatenation. A final series of deconvolution layers are used to reach the final spatial dimension. In the final layer we apply a Tanh nonlinearity to constrain the outputs to [−1, 1]. In the discriminator, the text is similarly replicated spatially to form a M ×M ×T tensor. Meanwhile the image is processed in local and global pathways. In the local pathway, the image is fed through stride-2 convolutions down to the M × M spatial dimension, at which point it is depth-concatenated with the text embedding tensor. The resulting tensor is spatially cropped to within the bounding box coordinates, and further processed convolutionally until the spatial dimension is 1 × 1. The global pathway consists simply of convolutions down to a vector, with additive contribution of the orignal text embedding t. Finally, the local and global pathway output vectors are combined additively and fed into the final layer producing the scalar discriminator score. 4.2 Keypoint-conditional text-to-image model Figure 3 shows the keypoint-conditional version of the GAWWN, described in detail below. Global Local Global A red bird with a black face part locs Local { 0, 1 } Generator Network Discriminator Network = Deconv = Conv depth concat max, replicate depth depth concat 128 128 part locs depth concat max, replicate depth depth concat 16 16 16 16 16 16 16 16 16 16 1 1 A red bird with a black face depth concat pointwise multiply 128 128 128 replicate spatial 16 16 Figure 3: Text and keypoint-conditional GAWWN.. Keypoint grids are shown as 4 × 4 for clarity of presentation, but in our experiments we used 16 × 16. The location keypoints are encoded into a M × M × K spatial feature map in which the channels correspond to the part; i.e. head in channel 1, left foot in channel 2, and so on. The keypoint tensor is fed into several stages of the network. First, it is fed through stride-2 convolutions to produce a vector that is concatenated with noise z and text embedding t. The resulting vector provides coarse information about content and part locations. Second, the keypoint tensor is flattened into a binary matrix with a 1 indicating presence of any part at a particular spatial location, then replicated depth-wise into a tensor of size M × M × H. In the local and global pathways, the noise-text-keypoint vector is fed through deconvolutions to produce another M × M × H tensor. The local pathway activations are gated by pointwise multiplication with the keypoint tensor of the same size. Finally, the original M × M × K keypoint tensor is 3For details of how to apply this warping see equation 3 in [Jaderberg et al., 2015] 4 depth-concatenated with the local and global tensors, and processed with further deconvolutions to produce the final image. Again a Tanh nonlinearity is applied. In the discriminator, the text embedding t is fed into two stages. First, it is combined additively with the global pathway that processes the image convolutionally producing a vector output. Second, it is spatially replicated to M × M and then depth-concatenated with another M × M feature map in the local pathway. This local tensor is then multiplicatively gated with the binary keypoint mask exactly as in the generator, and the resulting tensor is depth-concatenated with the M × M × T keypoints. The local pathway is fed into further stride-2 convolutions to produce a vector, which is then additively combined with the global pathway output vector, and then into the final layer producing the scalar discriminator score. 4.3 Conditional keypoint generation model From a user-experience perspective, it is not optimal to require users to enter every single keypoint of the parts of the object they wish to be drawn (e.g. for birds our model would require 15). Therefore, it would be very useful to have access to all of the conditional distributions of unobserved keypoints given a subset of observed keypoints and the text description. A similar problem occurs in data imputation, e.g. filling in missing records or inpainting image occlusions. However, in our case we want to draw convincing samples rather than just fill in the most likely values. Conditioned on e.g. only the position of a bird’s beak, there could be several very different plausible poses that satisfy the constraint. Therefore, a simple approach such as training a sparse autoencoder over keypoints would not suffice. A DBM [Salakhutdinov and Hinton, 2009] or variational autoencoder [Rezende et al., 2014] could in theory work, but for simplicity we demonstrate the results achieved by applying the same generic GAN framework to this problem. The basic idea is to use the assignment of each object part as observed (i.e. conditioning variable) or unobserved as a gating mechanism. Denote the keypoints for a single image as ki := {xi, yi, vi}, i = 1, ..., K, where x and y indicate the row and column position, respectively, and v is a bit set to 1 if the part is visible and 0 otherwise. If the part is not visible, x and y are also set to 0. Let k ∈[0, 1]K×3 encode the keypoints into a matrix. Let the conditioning variables (e.g. a beak position specified by the user) be encoded into a vector of switch units s ∈{0, 1}K, with the i-th entry set to 1 if the i-th part is a conditioning variable and 0 otherwise. We can formulate the generator network over keypoints Gk, conditioned on text t and a subset of keypoints k, s, as follows: Gk(z, t, k, s) := s ⊙k + (1 −s) ⊙f(z, t, k) (3) where ⊙denotes pointwise multiplication and f : RZ+T +3K →R3K is an MLP. In practice we concatenated z, t and flattened k and chose f to be a 3-layer fully-connected network. The discriminator Dk learns to distinguish real keypoints and text (kreal, treal) from synthetic. In order for Gk to capture all of the conditional distributions over keypoints, during training we randomly sample switch units s in each mini-batch. Since we would like to usually specify 1 or 2 keypoints, in our experiments we set the “on” probability to 0.1. That is, each of the 15 bird parts only had a 10% chance of acting as a conditioning variable for a given training image. 5 Experiments In this section we describe our experiments on generating images from text descriptions on the Caltech-UCSD Birds (CUB) and MPII Human Pose (MHP) datasets. CUB [Wah et al., 2011] has 11,788 images of birds belonging to one of 200 different species. We also use the text dataset from Reed et al. [2016a] including 10 single-sentence descriptions per bird image. Each image also includes the bird location via its bounding box, and keypoint (x,y) coordinates for each of 15 bird parts. Since not all parts are visible in each image, the keypoint data also provides an additional bit per part indicating whether the part can be seen. MHP Andriluka et al. [2014] has 25K images with 410 different common activities. For each image, we collected 3 single-sentence text descriptions using Mechanical Turk. We asked the workers to describe the most distinctive aspects of the person and the activity they are engaged in, e.g. “a man in a yellow shirt preparing to swing a golf club”. Each image has potentially multiple sets of (x,y) keypoints for each of the 16 joints. During training we filtered out images with multiple people, and for the remaining 19K images we cropped the image to the person’s bounding box. 5 We encoded the captions using a pre-trained char-CNN-GRU as described in [Reed et al., 2016a]. During training, the 1024-dimensional text embedding for a given image was taken to be the average of four randomly-sampled caption encodings corresponding to that image. Sampling multiple captions per image provides further information required to draw the object. At test time one can average together any number of description embeddings, including a single caption. For both CUB and MHP, we trained our GAWWN using the ADAM solver with batch size 16 and learning rate 0.0002 (See Alg. 1 in [Reed et al., 2016b] for the conditional GAN training algorithm). The models were trained on all categories and we show samples on a set of held out captions. For the spatial transformer module, we used a Torch implementation provided by Oquab [2016]. Our GAN implementation is loosely based on dcgan.torch4. In experiments we analyze how accurately the GAWWN samples reflect the text and location constraints. First we control the location of the bird by interpolation via bounding boxes and keypoints. We consider both the case of (1) ground-truth keypoints from the data set, and (2) synthetic keypoints generated by our model, conditioned on the text. Case (2) is advantageous because it requires less effort from a hypothetical user (i.e. entering 15 keypoint locations). We then compare our CUB results to representative samples from the previous work. Finally, we show samples on textand pose-conditional generation of images of human actions. 5.1 Controlling bird location via bounding boxes We first demonstrate sampling from the text-conditional model while varying the bird location. Since location is specified via bounding box coordinates, we can also control the size and aspect ratio of the bird. This is shown in Figure 4 by interpolating the bounding box coordinates while at the same time fixing the text and noise conditioning variables. This bird has a black head, a long orange beak and yellow body This large black bird has a pointy beak and black eyes This small blue bird has a short pointy beak and brown patches on its wings Caption Shrinking Translation Stretching GT Figure 4: Controlling the bird’s position using bounding box coordinates. and previously-unseen text. With the noise vector z fixed in every set of three frames, the background is usually similar but not perfectly invariant. Interestingly, as the bounding box coordinates are changed, the direction the bird faces does not change. This suggests that the model learns to use the the noise distribution to capture some aspects of the background and also non-controllable aspects of “where” such as direction. 5.2 Controlling individual part locations via keypoints In this section we study the case of text-conditional image generation with keypoints fixed to the ground-truth. This can give a sense of the performance upper bound for the text to image pipeline, because synthetic keypoints can be no more realistic than the ground-truth. We take a real image and its keypoint annotations from the CUB dataset, and a held-out text description, and draw samples conditioned on this information. This large black bird has a long neck and tail feathers. This bird is mostly white with a thick black eyebrow, small and black beak and a long tail. This is a small yellowish green bird with a pointy black beak, black eyes and gray wings. This pale pink bird has a black eyebrow and a black pointy beak, gray wings and yellow underparts. This bird has a bright red crown and black wings and beak. This large white bird has an orange-tipped beak. GT GT GT GT GT GT Figure 5: Bird generation conditioned on fixed groundtruth keypoints (overlaid in blue) and previously unseen text. Each sample uses a different random noise vector. 4https://github.com/soumith/dcgan.torch 6 Figure 5 shows several image samples that accurately reflect the text and keypoint constraints. More examples including success and failure are included in the supplement. We observe that the bird pose respects the keypoints and is invariant across the samples. The background and other small details, such as thickness of the tree branch or the background color palette do change with the noise. Shrinking Translation Stretching This bird has a black head, a long orange beak and yellow body This large black bird has a pointy beak and black eyes This small blue bird has a short pointy beak and brown patches on its wings Caption GT Figure 6: Controlling the bird’s position using keypoint coordinates. Here we only interpolated the beak and tail positions, and sampled the rest conditioned on these two. The GAWWN model can also use keypoints to shrink, translate and stretch objects, as shown in Figure 6. We chose to specify beak and tail positions, because in most cases these define an approximate bounding box around the bird. Unlike in the case of bounding boxes, we can now control which way the bird is pointing; note that here all birds face left, whereas when we use bounding boxes (Figure 4) the orientation is random. Elements of the scene, even outside of the controllable location, adjust in order to be coherent with the bird’s position in each frame although in each set of three frames we use the same noise vector z. 5.3 Generating both bird keypoints and images from text alone Although ground truth keypoint locations lead to visually plausible results as shown in the previous sections, the keypoints are costly to obtain. In Figure 7, we provide examples of accurate samples using generated keypoints. Compared to ground-truth keypoints, on average we did not observe degradation in quality. More examples for each regime are provided in the supplement. This bird has a yellow head, black eyes, a gray pointy beak and orange lines on its breast. This water bird has a long white neck, black body, yellow beak and black head. This bird is large, completely black, with a long pointy beak and black eyes. This small bird has a blue and gray head, pointy beak, black and white patterns on its wings and a white belly. This bird is completely red with a red and cone-shaped beak, black face and a red nape. This white bird has gray wings, red webbed feet and a long, curved and yellow beak. This small bird has a blue and gray head, pointy beak and a white belly. GT GT GT GT GT GT Figure 7: Keypoint- and text-conditional bird generation in which the keypoints are generated conditioned on unseen text. The small blue boxes indicate the generated keypoint locations. 5.4 Comparison to previous work In this section we compare our results with previous text-to-image results on CUB. In Figure 8 we show several representative examples that we cropped from the supplementary material of [Reed et al., 2016b]. We compare against the actual ground-truth and several variants of GAWWN. We observe that the 64 × 64 samples from [Reed et al., 2016b] mostly reflect the text description, but in some cases lack clearly defined parts such as a beak. When the keypoints are zeroed during training, our GAWWN architecture actually fails to generate any plausible images. This suggests that providing additional conditioning variables in the form of location constraints is helpful for learning to generate high-resolution images. Overall, the sharpest and most accurate results can be seen in the 128 × 128 samples from our GAWWN with real or synthetic keypoints (bottom two rows). 5.5 Beyond birds: generating images of humans Here we apply our model to generating images of humans conditioned on a description of their appearance and activity, and also on their approximate pose. This is a much more challenging task than generating images of birds due to the larger variety of scenes and pose configurations. 7 A small sized bird that has tones of brown and dark red with a short stout bill GAN-INT-CLS (Reed et. al, 2016b) Groundtruth image and text caption GAWWN Key points given GAWWN Key points generated This bird has a yellow breast and a dark grey face The bird is solid black with white eyes and a black beak. GAWWN trained without key points Figure 8: Comparison of GAWWN to GAN-INT-CLS from Reed et al. [2016b] and also the groundtruth images. For the ground-truth row, the first entry corresonds directly to the caption, and the second two entries are sampled from the same species. a woman in a yellow tank top is doing yoga. the man wearing the red shirt and white pants play golf on the green grass a man in green shirt and white pants is swinging his golf club. a man in a red sweater and grey pants swings a golf club with one hand. a woman in grey shirt is doing yoga. a man in an orange jacket, black pants and a black cap wearing sunglasses skiing. a man is skiing and competing for the olympics on the slopes. a woman wearing goggles swimming through very murky water GT Samples GT Samples Caption Caption Figure 9: Generating humans. Both the keypoints and the image are generated from unseen text. The human image samples shown in Figure 9 tend to be much blurrier compared to the bird images, but in many cases bear a clear resemblance to the text query and the pose constraints. Simple captions involving skiing, golf and yoga tend to work, but complex descriptions and unusual poses (e.g. upside-down person on a trampoline) remain especially challenging. We also generate videos by (1) extracting pose keypoints from a pre-trained pose estimator from several YouTube clips, and (2) combining these keypoint trajectories with a text query, fixing the noise vector z over time and concatenating the samples (see supplement). 6 Discussion In this work we showed how to generate images conditioned on both informal text descriptions and object locations. Locations can be accurately controlled by either bounding box or a set of part keypoints. On CUB, the addition of a location constraint allowed us to accurately generate compelling 128 × 128 images, whereas previous models could only generate 64 × 64. Furthermore, this location conditioning does not constrain us during test time, because we can also learn a text-conditional generative model of part locations, and simply generate them at test time. An important lesson here is that decomposing the problem into easier subproblems can help generate realistic high-resolution images. In addition to making the overall text to image pipeline easier to train with a GAN, it also yields additional ways to control image synthesis. In future work, it may be promising to learn the object or part locations in an unsupervised or weakly supervised way. In addition, we show the first text-to-human image synthesis results, but performance on this task is clearly far from saturated and further architectural advances will be required to solve it. Acknowledgements This work was supported in part by NSF CAREER IIS-1453651, ONR N00014-13-1-0762, and a Sloan Research Fellowship. 8 References Z. Akata, S. Reed, D. Walter, H. Lee, and B. Schiele. Evaluation of Output Embeddings for Fine-Grained Image Classification. In CVPR, 2015. M. Andriluka, L. Pishchulin, P. Gehler, and B. Schiele. 2d human pose estimation: New benchmark and state of the art analysis. In CVPR, June 2014. K. Cho, B. van Merriënboer, D. Bahdanau, and Y. Bengio. On the properties of neural machine translation: Encoder–decoder approaches. Syntax, Semantics and Structure in Statistical Translation, 2014. E. L. Denton, S. Chintala, R. Fergus, et al. Deep generative image models using a laplacian pyramid of adversarial networks. In NIPS, 2015. A. Dosovitskiy, J. Tobias Springenberg, and T. Brox. Learning to generate chairs with convolutional neural networks. In CVPR, 2015. S. Eslami, N. Heess, T. Weber, Y. Tassa, K. Kavukcuoglu, and G. E. Hinton. Attend, infer, repeat: Fast scene understanding with generative models. In NIPS, 2016. I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial nets. In NIPS, 2014. K. Gregor, I. Danihelka, A. Graves, D. Rezende, and D. Wierstra. Draw: A recurrent neural network for image generation. In ICML, 2015. M. Jaderberg, K. Simonyan, A. Zisserman, et al. Spatial transformer networks. In NIPS, 2015. D. P. Kingma and M. Welling. Auto-encoding variational bayes. In ICLR, 2014. R. Kiros, R. Salakhutdinov, and R. S. Zemel. Unifying visual-semantic embeddings with multimodal neural language models. In ACL, 2014. T. D. Kulkarni, W. F. Whitney, P. Kohli, and J. Tenenbaum. Deep convolutional inverse graphics network. In NIPS, 2015. H. Larochelle and I. Murray. The neural autoregressive distribution estimator. In AISTATS, 2011. E. Mansimov, E. Parisotto, J. L. Ba, and R. Salakhutdinov. Generating images from captions with attention. In ICLR, 2016. J. Oh, X. Guo, H. Lee, R. L. Lewis, and S. Singh. Action-conditional video prediction using deep networks in atari games. In NIPS, 2015. Q. Oquab. Modules for spatial transformer networks. github.com/qassemoquab/stnbhwd, 2016. A. Radford, L. Metz, and S. Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. In ICLR, 2016. S. Reed, Y. Zhang, Y. Zhang, and H. Lee. Deep visual analogy-making. In NIPS, 2015. S. Reed, Z. Akata, H. Lee, and B. Schiele. Learning deep representations for fine-grained visual descriptions. In CVPR, 2016a. S. Reed, Z. Akata, X. Yan, L. Logeswaran, B. Schiele, and H. Lee. Generative adversarial text-to-image synthesis. In ICML, 2016b. D. J. Rezende, S. Mohamed, and D. Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In ICML, 2014. D. J. Rezende, S. Mohamed, I. Danihelka, K. Gregor, and D. Wierstra. One-shot generalization in deep generative models. In ICML, 2016. R. Salakhutdinov and G. E. Hinton. Deep boltzmann machines. In AISTATS, 2009. L. Theis and M. Bethge. Generative image modeling using spatial lstms. In NIPS, 2015. A. van den Oord, N. Kalchbrenner, and K. Kavukcuoglu. Pixel recurrent neural networks. In ICML, 2016. C. Wah, S. Branson, P. Welinder, P. Perona, and S. Belongie. The caltech-ucsd birds-200-2011 dataset. 2011. J. Yang, S. Reed, M.-H. Yang, and H. Lee. Weakly-supervised disentangling with recurrent transformations for 3d view synthesis. In NIPS, 2015. 9 | 2016 | 388 |
6,314 | A Bio-inspired Redundant Sensing Architecture Anh Tuan Nguyen, Jian Xu and Zhi Yang∗ Department of Biomedical Engineering University of Minnesota Minneapolis, MN 55455 ∗yang5029@umn.edu Abstract Sensing is the process of deriving signals from the environment that allows artificial systems to interact with the physical world. The Shannon theorem specifies the maximum rate at which information can be acquired [1]. However, this upper bound is hard to achieve in many man-made systems. The biological visual systems, on the other hand, have highly efficient signal representation and processing mechanisms that allow precise sensing. In this work, we argue that redundancy is one of the critical characteristics for such superior performance. We show architectural advantages by utilizing redundant sensing, including correction of mismatch error and significant precision enhancement. For a proof-of-concept demonstration, we have designed a heuristic-based analog-to-digital converter - a zero-dimensional quantizer. Through Monte Carlo simulation with the error probabilistic distribution as a priori, the performance approaching the Shannon limit is feasible. In actual measurements without knowing the error distribution, we observe at least 2-bit extra precision. The results may also help explain biological processes including the dominance of binocular vision, the functional roles of the fixational eye movements, and the structural mechanisms allowing hyperacuity. 1 Introduction Visual systems have perfected the art of sensing through billions of years of evolution. As an example, with roughly 100 million photoreceptors absorbing light and 1.5 million retinal ganglion cells transmitting information [2, 3, 4], a human can see images in three-dimensional space with great details and unparalleled resolution. Anatomical studies determine the spatial density of the photoreceptors on the retina, which limits the peak foveal angular resolution to 20-30 arcseconds according to Shannon theory [1, 2]. There are also other imperfections due to nonuniform distribution of cells’ shape, size, location, and sensitivity that further constrain the precision. However, experiment data have shown that human can achieve an angular separation close to 1 arcminute in a two-point acuity test [5]. In certain conditions, it is even possible to detect an angular misalignment of only 2-5 arcseconds [6], which surpasses the virtually impossible physical barrier. This ability, known as hyperacuity, has baffled scientists for decades: what kind of mechanism allows human to read an undistorted image with such a blunt instrument? Among the approaches to explain this astonishing feat of human vision, redundant sensing is a promising candidate. It is well-known that redundancy is an important characteristic of many biological systems, from DNA coding to neural network [7]. Previous studies [8, 9] suggest there is a connection between hyperacuity and binocular vision - the ability to see images using two eyes with overlapping field of vision. Also known as stereopsis, it presents a passive form of redundant sensing. In addition to the obvious advantage of seeing objects in three-dimensional space, the binocular vision has been proven to increase visual dynamic range, contrast, and signal-to-noise ratio [10]. It is evident that seeing with two eyes enables us to sense a higher level of information 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Figure 1: Illustration of n-dimensional quantizers without (ideal) and with mismatch error. (a) Twodimensional quantizers for image sensing. (b) Zero-dimensional quantizers for analog-to-digital data conversion. as well as to correct many intrinsic errors and imperfections. Furthermore, the eyes continuously and involuntarily engage in a complex micro-fixational movement known as microsaccade, which suggests an active form of redundant sensing [11]. During microsaccade, the image projected on the retina is shifted across a few photoreceptors in a pseudo-random manner. Empirical studies [12] and computational models [13] suggest that the redundancy created by these micro-movements allows efficient sampling of spatial information that can surpass the static diffraction limitation. Both biological and artificial systems encounter similar challenges to achieve precise sensing in the presence of non-ideal imperfections. One of those is mismatch error. At a high resolution, even a small degree of mismatch error can degrade the performance of many man-made sensors [14, 15]. For example, it is not uncommon for a 24-bit analog-to-digital converter (ADC) to have 18-20 bits effective resolution [16]. Inspired by the human visual system, we explore a new computational framework to remedy mismatch error based on the principle of redundant sensing. The proposed mechanism resembles the visual systems’ binocular architecture and is designed to increase the precision of a zero-dimensional data quantization process. By assuming the error probabilistic distribution as a priori, we show that precise data conversion approaching the Shannon limit can be accomplished. As a proof-of-concept demonstration, we have designed and validated a high-resolution ADC integrated circuit. The device utilizes a heuristic approach that allows unsupervised estimation and calibration of mismatch error. Simulation and measurement results have demonstrated the efficacy of the proposed technique, which can increase the effective resolution by 2-5 bits and linearity by 4-6 times without penalties in chip area and power consumption. 2 Mismatch Error 2.1 Quantization & Shannon Limit Data quantization is the partition of a continuous n-dimensional vector space into M subspaces, ∆0, ..., ∆M−1, called quantization regions as illustrated in Figure 1. For example, an eye is a twodimensional biological quantizer while an ADC is a zero-dimensional artificial quantizer, where the partition occurs in a spatial, temporal and scalar domain. Each quantization region is assigned a representative value, d0, ..., dM−1, which uniquely encodes the quantized information. While the representative values are well-defined in the abstract domain, the actual partition often depends on the physical properties of the quantization device and has a limited degree of freedom for adjustment. An optimal data conversation is achieved with a set of uniformly distributed quantization regions. In practice, it is difficult to achieve due to the physical constraints in the partition process. For example, individual pixel cells can deviate from the ideal morphology, location, and sensitivity. These relative differences, referred to as mismatch error, contribute to the data conversion error. In this paper, we consider a zero-dimensional (scalar) quantizer, which is the mathematical equivalence of an ADC device. A N-bit quantizer divides the continuous conversion full-range (FR = [0, 2N]) into 2N quantization regions, ∆0, ..., ∆2N−1, with nominal unity length E(|∆i|) = ∆= 1 2 Figure 2: (a) Degeneration of entropy, i.e. maximum effective resolution, due to mismatch error versus quantizer’s intrinsic resolution. (b) The proportion of data conversion error measured by mismatch-to-quantization ratio (MQR). With a conventional architecture, mismatch error is the dominant source, especially in a high-resolution domain. The proposed method allows suppressing mismatch error below quantization noise and approaching the Shannon limit. least-significant-bit (LSB). The quantization regions are defined by a set of discrete references1, SR = {θ0, ..., θ2N }, where 0 = θ0 < θ1 < ... < θ2N = 2N. An input signal x is assigned the digital code d(x) = i ∈SD = {0, 1, 2, ..., 2N −1}, if it falls into region ∆i defined by x ←d(x) = i ⇔ x ∈∆i ⇔ θi ≤x < θi+1. (1) The Shannon entropy of a N-bit quantizer [17, 18] quantifies the maximum amount of information that can be acquired by the data conversion process H = −log2 √ 12 · M, (2) where M is the normalized total mean square error integrated over each digital code M = 1 23N Z 2N 0 [x −d(x) −1/2]2dx = 1 23N 2N−1 X i=0 Z θi+1 θi (x −i −1/2)2dx. (3) In this work, we consider both quantization noise and mismatch error. The Shannon limit is generally preferred as the maximum rate at which information can be acquired without any mismatch error, where θi = i, ∀i or SR\{2N} = SD, M is equal to the total quantization noise Q = 2−2N/12, and the entropy is equal to the quantizer’s intrinsic resolution H = N. The differences between SR\{2N} and SD are caused by mismatch error and result in the degeneration of entropy. Figure 2(a) shows the entropy, i.e. maximum effective resolution, versus the quantizer’s intrinsic resolution with fixed mismatch ratios σ0 = 1% and σ0 = 10%. Figure 2(b) describes the proportion of error contributed by each source, as measured by mismatch-to-quantization ratio (MQR) MQR = M −Q Q . (4) It is evident that at a high resolution, mismatch error is the dominant source causing data conversion error. The Shannon theory implies that mismatch error is the fundamental problem relating to the physical distribution of the reference set. [19, 20] have proposed post-conversion calibration methods, which are ineffective in removing mismatch error without altering the reference set itself. A standard workaround solution is using larger components thus better matching characteristics; however, this incurs penalties concerning cost and power consumption. As a rule of thumb, 1-bit increase in resolution requires a 4-time increase of resources [14]. To further advance the system performance, a design solution that is robust to mismatch error must be realized. 1θ2N = 2N is a dummy reference to define the conversion full-range. 3 Figure 3: Simulated distribution of mismatch error in terms of (a) expected absolute error |PE(i)| and (b) expected differential error PD(i) in a 16-bit quantizer with 10% mismatch ratio. (c, d) Optimal mismatch error distribution in the proposed strategy. At the maximum redundancy 16 · (15, 1), mismatch error becomes negligible. 2.2 Mismatch Error Model For artificial systems, binary coding is popularly used to encode the reference set. It involves partitioning the array of unit cells into a set of binary-weighted components SC, and assembling different components in SC to form the needed references. The precision of the data conversion is related to the precise matching of these unit cells, which can be in forms of comparators, capacitors, resistors, or transistors, etc. Due to fabrication variations, undesirable parasitics, and environmental interference, each unit cell follows a probabilistic distribution which is the basis of mismatch error. We consider the situation where the distribution of mismatch error is known as a priori. Each unit cell, cu, is assumed to be normally distributed with mismatch ratio σ0: cu ∼N(1, σ2 0). SC is then a collection of the binary-weighted components ci, each has 2i independent and identically distributed unit cells SC = {ci|ci ∼N(2i, 2iσ2 0)}, ∀i ∈[0, N −1]. (5) Each reference θi is associated with a unique assembly Xi of the components2 SR\{2N} = {θi = P ck∈Xi ck 1 2N−1 PN−1 j=0 cj |Xi ∈P(SC)}, ∀i ∈[0, 2N −1], (6) where P(SC) is the power set of SC. Binary coding allows the shortest data length to encode the references: N control signals are required to generate 2N elements of SR. However, because each reference is bijectively associated with an assembly of components, it is not possible to rectify the mismatch error due to the random distribution of the components’ weight without physically altering the components themselves. The error density function defined as PE(i) = θi −i quantifies the mismatch error at each digital code. Figure 3(a) shows the distribution of |PE(i)| at 10% mismatch ratio through Monte Carlo 2The dummy reference θ2N = 2N is exempted. Other references are normalized over the total weight to define the conversion full-range of FR = [0, 2N] 4 Figure 4: Associating and exchanging the information between individual pixels in the same field of vision generate an exponential number of combinations and allow efficient spatial data acquisition beyond physical constraints. Inspired by this process, we propose a redundant sensing strategy that involves blending components between two imperfect sets to gain extra precision. simulations, where there is noticeably larger error associating with middle-range codes. In fact, it can be shown that if unit cells are independent, identically distributed, PE(i) approximates a normal distribution as follows PE(i) = θi −i ∼N(0, N−1 X j=0 2j−1 Dj − i 2N −1 σ2 0), i ∈[0, 2N −1], (7) where i = DN−1...D1D0 (Dj ∈{0, 1}, ∀j) is the binary representation of i. Another drawback of binary coding is that it can create differential “gap” between the references. Figure 3(b) presents the estimated distribution of differential gap PD(i) = θi+1 −θi at 10% mismatch ratio. When the gap exceeds two unit-length, signals that should be mapped to two or multiple codes collapse into a single code, resulting in a loss of information. This phenomenon is commonly known as wide code, an unrecoverable situation by any post-conversion calibration methods. Also, wide gaps tend to appear at two adjacent codes that have large Hamming distance, e.g. 01111 and 10000. Subsequently, the amount of information loss can be signal dependent and amplified at certain parts of data conversation range. 3 Proposed Strategy The proposed general strategy is to incorporate redundancy into the quantization process such that one reference θi can be generated by a large number of distinct component assemblies Xi, each yields a different amount of mismatch. Among numerous options that lead to the same goal, the optimal reference set is the collection of assemblies with the least mismatch error over every digital code. Furthermore, we propose that such redundant characteristic can be achieved by resembling the visual systems’ binocular structure. It involves a secondary component set that has overlapping weights with the primary component set. By exchanging the components with similar weights between the two sets, excessive redundant component assemblies can be realized. We hypothesize that a similar mechanism may have been employed in the brain that allows associating information between individual pixels on the same field of vision in each eye as illustrated in Figure 4. Because such association creates an exponential number of combinations, even a small percentage of 100 million photoreceptors and 1.5 million retinal ganglion cells that are “interchangeable” could result in a significant degree of redundancy. The design of the primary and secondary component set, SC,0 and SC,1, specifies the level and distribution of redundancy. Specifically, SC,1 is derived by subtracting from the conventional binaryweighted set SC, while the remainders form the primary component set SC,0. The total nominal weight remains unchanged as P ci,j∈(SC,0∪SC,1) ci,j = 2N0 −1, where N0 is the resolution of the 5 Figure 5: The distribution of the number of assemblies NA(i) with different geometrical identity in (a) 2-component-set design and (b) 3-component-set design. Higher assembly count, i.e., larger level of redundancy, is allocated for digital codes with larger mismatch error. quantizer as well as the primary component set. It is worth mentioning that mismatch error is mostly contributed by the most-significant-bit (MSB) rather than the least-significant-bit (LSB) as implied by Equation (5). Subsequently, to optimize the level and distribution of redundancy, the secondary set should advantageously consist of binary-weighted components that are derived from the MSB. SC,0 and SC,1 can be described as follows Primary: SC,0 = {c0,i|c0,i = 2i, if i < N0 −N1 2i −c1,i−N0+N1, otherwise , ∀i ∈[0, N0 −1]}, Secondary: SC,1 = {c1,i|c1,i = 2N0−N1+i−s1, ∀i ∈[0, N1 −1]}, (8) where N1 is the resolution of SC,1 and s1 is a scaling factor satisfying 1 ≤N1 ≤N0 −1 and 1 ≤s1 ≤N0 −N1. Different values of N1 and s1 result in different degree and distribution of redundancy. Any design within this framework can be represented by its unique geometrical identity: N0 · (N1, s1). The total number of components assemblies is |P(SC,0 ∪SC,1)| = 2N0+N1, which is much greater than the cardinality of the reference-set |SR| = 2N0, thus implies the high level of intrinsic redundancy. NA(i) is defined as the number of assemblies that represent the same reference θi and is an essential indicator that specifies the redundancy distribution NA(i) = |{X|X ∈P(SC,0 ∪SC,1) ∧ X cj,k∈X cj,k = i}|, i ∈[0, 2N0 −1]. (9) Figure 5(a) shows NA(i) versus digital codes with N0 = 8 and multiple combinations of (N1, s1). The design of SC,1 should generate more options for middle-range codes, which suffer from larger mismatch error. Simulations suggest N1 decides the total number of assemblies, P2N0−1 i=0 NA(i) = |P(SC,0 ∪SC,1)| = 2N0+N1; s1 defines the morphology of the redundancy distribution. A larger value of s1 gives a more spreading distribution. Removing mismatch error is equivalent to searching for the optimal component assembly Xop,i that generates the reference θi with the least amount of mismatch Xop,i = argmin X∈P(SC,0∪SC,1) i − X cj,k∈X cj,k , i ∈[0, 2N0 −1]. (10) The optimal reference set SR,op is then the collection of all references generated by Xop,i. In this work, we do not attempt to find Xop,i as it is an NP-optimization problem with the complexity of O(2N0+N1) that may not have a solution in the polynomial space. Instead, this section focuses on showing the achievable precision with the proposed architecture while section 4 will describe a heuristic approach. The simulation results in Figure 2(b) demonstrate our technique can suppress 6 mismatch error below quantization noise, thus approaching the Shannon limit even at high resolution and large mismatch ratio. In this simulation, the secondary set is chosen as N1 = N0 −1 for maximum redundancy. Figure 3(c, d) shows the distribution of mismatch error after correction. Even at the minimum redundancy (N1 = 1), a significant degree of mismatch is rectified. At the maximum redundancy (N1 = N0 −1), the mismatch error becomes negligible compared with quantization noise. Based on the same principles, a n-set components design (n = 3, 4, ...) can be realized, which gives an increased level redundancy and more complex distribution as shown in Figure 5(b), where n = 3 and the geometrical identity is N0 · (N1, s1) · (N2, s2). With different combinations of Nk and sk (k = 1, 2, ...), NA(i) can be catered to a known mismatch error distribution and yield a better performance. However, adding more component set(s) can increase the computational burden as the complexity increases rapidly with every additional set(s): O(2N0+N1+N2+...). Given mismatch error can be well rectified with a two-set implementation over a wide range of resolution, n > 2 might be unnecessary. Similarly, three or more eyes may give better vision. However, the brain circuits and control network would become much more complicated to integrate signals and information. In fact, stereopsis is an advanced feature to human and animals with well-developed neural capacity [7]. Despite possessing two eyes, many reptiles, fishes and other mammals, have their eyes located on the opposite sides of the head, which limits the overlapping region thus stereopsis, in exchange for a wider field of vision. Certain species of insect such as Arachnids can possess from six to eight eyes. However, studies have pointed out that their eyes do not function in synchronous to resolve the fine resolution details [21]. It is not a coincidence that at least 30% of the human brain cortex is directly or indirectly involved in processing visual data [7]. We conjecture that the computational limitation is a major reason that many higher-order animals are evolved to have two eyes, thus keep the cyclops and triclops remain in the realm of mythology. No less as it would sacrifice visual processing precision, yet no more as it would overload the brain’s circuit complexity. 4 Practical Implementation & Results A mixed-signal ADC integrated circuit has been designed and fabricated to demonstrate the feasibility of the proposed architecture. The nature of hardware implementation limits the deployment of sophisticated learning algorithms. Instead, the circuit relies on a heuristic approach to efficiently estimate the mismatch error and adaptively reconfigure its components in an unsupervised manner. The detailed hardware algorithm and circuits implementation are presented seperately. In this paper, we only briefly summarize the techniques and results. The ADC design is based on successive-approximation register (SAR) architecture and features redundant sensing with a geometrical identity 14 · (13, 1). The component set SC is a binaryweighted capacitor array. We have chosen the smallest capacitance available in the CMOS process to implement the unit cell for reducing circuits power and area. However, it introduces large capacitor mismatch ratios up to 5% which limits the effective resolution to 10-bit or below for previous works reported in the literature [14, 19, 20]. The resolution of the secondary array is chosen as N1 = N0 −1 to maximize the exchange capacity between two component sets c0,i = c1,i−1 = 1/2c0,i+1, i ∈[1, N −2]. (11) In the auto-calibration mode, the mismatch error of each component is estimated by comparing the capacitors with similar nominal values implied by Equation (11). The procedure is unsupervised and fully automatic. The result is a reduced dimensional set of parameters that characterize the distribution of mismatch error. In the data conversion mode, a heuristic algorithm is employed that utilizes the estimated parameters to generate the component assembly with near-minimal mismatch error for each reference. A key technique is to shift the capacitor utilization towards the MSB by exchanging the components with similar weight, then to compensate the left-over error using the LSB. Although the algorithm has the complexity of O(N0 + N1), parallel implementation allows the computation to finish within a single clock cycle. By assuming the LSB components contribute an insignificant level of mismatch error as implied by Equation (5), this heuristic approach trades accuracy for speed. However, the excessive amount of 7 Figure 6: High-resolution ADC implementation. (a) Monte Carlo simulations of the unsupervised error estimation and calibration technique. (b) The chip micrograph. (c) Differential nonlinearity (DNL) and (d) integral nonlinearity (INL) measurement results. redundancy guarantees the convergence of an adequate near-optimal solution. Figure 6(a) shows simulated plots of effective-number-of-bits (ENOB) versus unit-capacitor mismatch ratio, σ0(Cu). With the proposed method, the effective resolution is shown to approach the Shannon limit even with large mismatch ratios. It is worth mentioning that we also take the mismatch error associated with the bridge-capacitor, σ0(Cb), into consideration. Figure 6(b) shows the chip micrograph. Figure 6(c, d) gives the measurement results of standard ADC performance merit in terms of differential nonlinearity (DNL) and integral nonlinearity (INL). The results demonstrate that a 4-6 fold increase of linearity is feasible. 5 Conclusion This work presents a redundant sensing architecture inspired by the binocular structure of the human visual system. We show architectural advantages of using redundant sensing in removing mismatch error and enhancing sensing precision. A high resolution, zero-dimensional data quantizer is presented as a proof-of-concept demonstration. Through Monte Carlo simulation with the error probabilistic distribution as a priori, we find the precision can approach the Shannon limit. In actual measurements without knowing the error probabilistic distribution, the gain of extra 2-bit precision and 4-6 times linearity is observed. We envision that the framework can be generalized to handle higher dimensional data and apply to a variety of applications such as digital imaging, functional magnetic resonance imaging (fMRI), 3D data acquisition, etc. Moreover, engineering such bioinspired artificial systems may help better understand the biological processes such as stereopsis, microsaccade, and hyperacuity. Acknowledgment The authors would like to thank Phan Minh Nguyen for his valuable comments. 8 References [1] Shannon, C.E. (1948) A Mathematical Theory of Communication. Bell System Technical Journal, vol. 27(3), pp. 379423. [2] Curcio, C.A., Sloan, K.R., Kalina, R.E., Hendrickson, A.E. (1990) Human photoreceptor topography. Journal of Comparative Neurology, vol. 292(4), pp. 497-523. [3] Curcio, C. A., Allen, K. A. (1990) Topography of ganglion cells in human retina. Journal of Comparative Neurology, vol. 300(1), pp. 5-25. [4] Read, J.C. (2015) What is stereoscopic vision good for? Proc. SPIE 9391, Stereoscopic Displays and Applications XXVI, pp. 93910N. [5] Westheimer, G. (1977) Spatial frequency and light-spread descriptions of visual acuity and hyperacuity. Journal of the Optical Society of America, vol. 67(2), pp. 207-212. [6] Beck, J., Schwartz, T. (1979) Vernier acuity with dot test objects. Vision Research, vol. 19(3), pp. 313319. [7] Reece, J.B., Urry, L.A, Cain, M.L., Wasserman, S.A, Minorsky, P.V., Jackson R.B., Campbell, N.A. (2010) Campbell biology, 9th Ed. Boston: Benjamin Cummings/Pearson. [8] Westheimer, G., McKee, S.P. (1978) Stereoscopic acuity for moving retinal images. Journal of the Optical Society of America, vol. 68(4), pp. 450-455. [9] Crick, F.H., Marr, D.C., Poggio, T. (1980) An information processing approach to understanding the visual cortex. The Organization of the Cerebral Cortex, MIT Press, pp. 505-533. [10] Cagenello, R., Arditi, A., Halpern, D. L. (1993) Binocular enhancement of visual acuity. Journal of the Optical Society of America A, vol. 10(8), pp. 1841-1848. [11] Martinez-Conde, S., Otero-Millan, J., Macknik, S.L. (2013) The impact of microsaccades on vision: towards a unified theory of saccadic function. Nature Reviews Neuroscience, vol. 14(2), pp. 83-96. [12] Hicheur, H., Zozor, S., Campagne, A., Chauvin, A. (2013) Microsaccades are modulated by both attentional demands of a visual discrimination task and background noise. Journal of vision, vol. 13(13), pp. 18-18. [13] Hennig, M.H., W¨org¨otter, F. (2004) Eye micro-movements improve stimulus detection beyond the Nyquist limit in the peripheral retina. Advances in Neural Information Processing Systems. [14] Murmann, B. (2008) A/D converter trends: Power dissipation, scaling and digitally assisted architectures. Custom Integrated Circuits Conference, 2008. CICC 2008. IEEE, pp. 105-112. [15] Nguyen, A.T., Xu, J., Yang, Z. (2015) A 14-bit 0.17 mm2 SAR ADC in 0.13µm CMOS for high precision nerve recording. Custom Integrated Circuits Conference (CICC), 2015 IEEE, pp. 1-4. [16] Analog Devices (2016) 24-Bit Delta-Sigma ADC with Low Noise PGA. AD1555/1556 datasheet. [17] Frey, M., Loeliger., H.A. (2007) On the static resolution of digitally corrected analog-to-digital and digital-to-analog converters with low-precision components. Circuits and Systems I: Regular Papers, IEEE Transactions on, vol. 54(1), pp. 229-237. [18] Biveroni, J., Loeliger, H.A. (2008) On sequential analog-to-digital conversion with low-precision components. Information Theory and Applications Workshop, 2008. IEEE, pp. 185-187. [19] Um, J.Y., Kim, Y.J., Song, E.W., Sim, J.Y., Park, H.J. (2013) A digital-domain calibration of splitcapacitor DAC for a differential SAR ADC without additional analog circuits. Circuits and Systems I: Regular Papers, IEEE Transactions on, vol. 60(11), pp. 2845-2856. [20] Xu, R., Liu, B., Yuan, J. (2012) Digitally calibrated 768-kS/s 10-b minimum-size SAR ADC array with dithering. Solid-State Circuits, IEEE Journal of, vol. 47(9), pp. 2129-2140. [21] Land, M.F. (1985) The morphology and optics of spider eyes. Neurobiology of arachnids, pp. 53-78, Springer Berlin Heidelberg. 9 | 2016 | 389 |
6,315 | On Valid Optimal Assignment Kernels and Applications to Graph Classification Nils M. Kriege Department of Computer Science TU Dortmund, Germany nils.kriege@tu-dortmund.de Pierre-Louis Giscard Department of Computer Science University of York, UK pierre-louis.giscard@york.ac.uk Richard C. Wilson Department of Computer Science University of York, UK richard.wilson@york.ac.uk Abstract The success of kernel methods has initiated the design of novel positive semidefinite functions, in particular for structured data. A leading design paradigm for this is the convolution kernel, which decomposes structured objects into their parts and sums over all pairs of parts. Assignment kernels, in contrast, are obtained from an optimal bijection between parts, which can provide a more valid notion of similarity. In general however, optimal assignments yield indefinite functions, which complicates their use in kernel methods. We characterize a class of base kernels used to compare parts that guarantees positive semidefinite optimal assignment kernels. These base kernels give rise to hierarchies from which the optimal assignment kernels are computed in linear time by histogram intersection. We apply these results by developing the Weisfeiler-Lehman optimal assignment kernel for graphs. It provides high classification accuracy on widely-used benchmark data sets improving over the original Weisfeiler-Lehman kernel. 1 Introduction The various existing kernel methods can conveniently be applied to any type of data, for which a kernel is available that adequately measures the similarity between any two data objects. This includes structured data like images [2, 5, 11], 3d shapes [1], chemical compounds [8] and proteins [4], which are often represented by graphs. Most kernels for structured data decompose both objects and add up the pairwise similarities between their parts following the seminal concept of convolution kernels proposed by Haussler [12]. In fact, many graph kernels can be seen as instances of convolution kernels under different decompositions [23]. A fundamentally different approach with good prospects is to assign the parts of one objects to the parts of the other, such that the total similarity between the assigned parts is maximum possible. Finding such a bijection is known as assignment problem and well-studied in combinatorial optimization [6]. This approach has been successfully applied to graph comparison, e.g., in general graph matching [9, 17] as well as in kernel-based classification [8, 18, 1]. In contrast to convolution kernels, assignments establish structural correspondences and thereby alleviate the problem of diagonal dominance at the same time. However, the similarities derived in this way are not necessarily positive semidefinite (p.s.d.) [22, 23] and hence do not give rise to valid kernels, severely limiting their use in kernel methods. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Our goal in this paper is to consider a particular class of base kernels which give rise to valid assignment kernels. In the following we use the term valid to mean a kernel which is symmetric and positive semidefinite. We formalize the considered problem: Let [X]n denote the set of all n-element subsets of a set X and B(X, Y ) the set of all bijections between X, Y in [X]n for n ∈N. We study the optimal assignment kernel Kk B on [X]n defined as Kk B(X, Y ) = max B∈B(X,Y ) W(B), where W(B) = X (x,y)∈B k(x, y) (1) and k is a base kernel on X. For clarity of presentation we assume n to be fixed. In order to apply the kernel to sets of different cardinality, we may fill up the smaller set by new objects z with k(z, x) = 0 for all x ∈X without changing the result. Related work. Correspondence problems have been extensively studied in object recognition, where objects are represented by sets of features often called bag of words. Grauman and Darrell proposed the pyramid match kernel that seeks to approximate correspondences between points in Rd by employing a space-partitioning tree structure and counting how often points fall into the same bin [11]. An adaptive partitioning with non-uniformly shaped bins was used to improve the approximation quality in high dimensions [10]. For non-vectorial data, Fröhlich et al. [8] proposed kernels for graphs derived from an optimal assignment between their vertices and applied the approach to molecular graphs. However, it was shown that the resulting similarity measure is not necessarily a valid kernel [22]. Therefore, Vishwanathan et al. [23] proposed a theoretically well-founded variation of the kernel, which essentially replaces the max-function in Eq. (1) by a soft-max function. Besides introducing an additional parameter, which must be chosen carefully to avoid numerical difficulties, the approach requires the evaluation of a sum over all possible assignments instead of finding a single optimal one. This leads to an increase in running time from cubic to factorial, which is infeasible in practice. Pachauri et al. [16] considered the problem of finding optimal assignments between multiple sets. The problem is equivalent to finding a permutation of the elements of every set, such that assigning the i-th elements to each other yields an optimal result. Solving this problem allows the derivation of valid kernels between pairs of sets with a fixed ordering. This approach was referred to as transitive assignment kernel in [18] and employed for graph classification. However, this does not only lead to non-optimal assignments between individual pairs of graphs, but also suffers from high computational costs. Johansson and Dubhashi [14] derived kernels from optimal assignments by first sampling a fixed set of so-called landmarks. Each data point is then represented by a feature vector, where each component is the optimal assignment similarity to a landmark. Various general approaches to cope with indefinite kernels have been proposed, in particular, for support vector machines [see 15, and references therein]. Such approaches should principally be used in applications, where similarities cannot be expressed by positive semidefinite kernels. Our contribution. We study optimal assignment kernels in more detail and investigate which base kernels lead to valid optimal assignment kernels. We characterize a specific class of kernels we refer to as strong and show that strong kernels are equivalent to kernels obtained from a hierarchical partition of the domain of the kernel. We show that for strong base kernels the optimal assignment (i) yields a valid kernel; and (ii) can be computed in linear time given the associated hierarchy. While the computation reduces to histogram intersection similar to the pyramid match kernel [11], our approach is in no way restricted to specific objects like points in Rd. We demonstrate the versatility of our results by deriving novel graph kernels based on optimal assignments, which are shown to improve over their convolution-based counterparts. In particular, we propose the Weisfeiler-Lehman optimal assignment kernel, which performs favourable compared to state-of-the-art graph kernels on a wide range of data sets. 2 Preliminaries Before continuing with our contribution, we begin by introducing some key notation for kernels and trees which will be used later. A (valid) kernel on a set X is a function k : X × X →R such that there is a real Hilbert space H and a mapping φ : X →H such that k(x, y) = ⟨φ(x), φ(y)⟩ for all x, y in X, where ⟨·, ·⟩denotes the inner product of H. We call φ a feature map, and H a feature space. Equivalently, a function k : X × X →R is a kernel if and only if for every subset 2 {x1, . . . , xn} ⊆X the n × n matrix defined by [m]i,j = k(xi, xj) is p.s.d. The Dirac kernel kδ is defined by kδ(x, y) = 1, if x = y and 0 otherwise. We consider simple undirected graphs G = (V, E), where V (G) = V is the set of vertices and E(G) = E the set of edges. An edge {u, v} is for short denoted by uv or vu, where both refer to the same edge. A graph with a unique path between any two vertices is a tree. A rooted tree is a tree T with a distinguished vertex r ∈V (T) called root. The vertex following v on the path to the root r is called parent of v and denoted by p(v), where p(r) = r. The vertices on this path are called ancestors of v and the depth of v is the number of edges on the path. The lowest common ancestor LCA(u, v) of two vertices u and v in a rooted tree is the unique vertex with maximum depth that is an ancestor of both u and v. 3 Strong kernels and hierarchies In this section we introduce a restricted class of kernels that will later turn out to lead to valid optimal assignment kernels when employed as base kernel. We provide two different characterizations of this class, one in terms of an inequality constraint on the kernel values, and the other by means of a hierarchy defined on the domain of the kernel. The latter will provide the basis for our algorithm to compute valid optimal assignment kernels efficiently. We first consider similarity functions fulfilling the requirement that for any two objects there is no third object that is more similar to each of them than the two to each other. We will see later in Section 3.1 that every such function indeed is p.s.d. and hence a valid kernel. Definition 1 (Strong Kernel). A function k : X × X →R≥0 is called strong kernel if k(x, y) ≥ min{k(x, z), k(z, y)} for all x, y, z ∈X. Note that a strong kernel requires that every object is most similar to itself, i.e., k(x, x) ≥k(x, y) for all x, y ∈X. In the following we introduce a restricted class of kernels that is derived from a hierarchy on the set X. As we will see later in Theorem 1 this class of kernels is equivalent to strong kernels according to Definition 1. Such hierarchies can be systematically constructed on sets of arbitrary objects in order to derive strong kernels. We commence by fixing the concept of a hierarchy formally. Let T be a rooted tree such that the leaves of T are the elements of X. Each inner vertex v in T corresponds to a subset of X comprising all leaves of the subtree rooted at v. Therefore the tree T defines a family of nested subsets of X. Let w : V (T) →R≥0 be a weight function such that w(v) ≥w(p(v)) for all v in T. We refer to the tuple (T, w) as a hierarchy. Definition 2 (Hierarchy-induced Kernel). Let H = (T, w) be a hierarchy on X, then the function defined as k(x, y) = w(LCA(x, y)) for all x, y in X is the kernel on X induced by H. We show that Definitions 1 and 2 characterize the same class of kernels. Lemma 1. Every kernel on X that is induced by a hierarchy on X is strong. Proof. Assume there is a hierarchy (T, w) that induces a kernel k that is not strong. Then there are x, y, z ∈X with k(x, y) < min{k(x, z), k(z, y)} and three vertices a = LCA(x, z), b = LCA(z, y) and c = LCA(x, y) with w(c) < w(a) and w(c) < w(b). The unique path from x to the root contains a and the path from y to the root contains b, both paths contain c. Since weights decrease along paths, the assumption implies that a, b, c are pairwise distinct and c is an ancestor of a and b. Thus, there must be a path from z via a to c and another path from z via b to c. Hence, T is not a tree, contradicting the assumption. We show constructively that the converse holds as well. Lemma 2. For every strong kernel k on X there is a hierarchy on X that induces k. Proof (Sketch). We incrementally construct a hierarchy on X that induces k by successive insertion of elements from X. In each step the hierarchy induces k restricted to the inserted elements and eventually induces k after insertion of all elements. Initially, we start with a hierarchy containing just one element x ∈X with w(x) = k(x, x). The key to all following steps is that there is a unique way to extend the hierarchy: Let Xi ⊆X be the first i elements in the order of insertion and let Hi = (Ti, wi) be the hierarchy after the i-th step. A leaf representing the next element z can be grafted onto Hi to form a hierarchy Hi+1 that induces k restricted to Xi+1 = Xi ∪{z}. Let 3 (a) Hi b1 b2 = c b3 b LCA(x, c) x p z (b) Hi+1 for B = {b1, b2, b3} b p z (c) Hi+1 for |B| = 1 Figure 1: Illustrative example for the construction of the hierarchy on i + 1 objects (b), (c) from the hierarchy on i objects (a) following the procedure used in the proof of Lemma 2. The inserted leaf z is highlighted in red, its parent p with weight w(p) = kmax in green and b in blue, respectively. B = {x ∈Xi : k(x, z) = kmax}, where kmax = maxy∈Xi k(y, z). There is a unique vertex b, such that B are the leaves of the subtree rooted at b, cf. Fig. 1. We obtain Hi+1 by inserting a new vertex p with child z into Ti, such that p becomes the parent of b, cf. Fig. 1(b), (c). We set wi+1(p) = kmax, wi+1(z) = k(z, z) and wi+1(x) = wi(x) for all x ∈V (Ti). Let k′ be the kernel induced by Hi+1. Clearly, k′(x, y) = k(x, y) for all x, y ∈Xi. According to the construction k′(z, x) = kmax = k(z, x) for all x ∈B. For all x /∈B we have LCA(z, x) = LCA(c, x) for any c ∈B, see Fig. 1(b). For strong kernels k(x, c) ≥min{k(x, z), k(z, c)} = k(x, z) and k(x, z) ≥min{k(x, c), k(c, z)} = k(x, c), since k(c, z) = kmax. Thus k(z, x) = k(c, x) must hold and consequently k′(z, x) = k(z, x). Note that a hierarchy inducing a specific strong kernel is not unique: Adjacent inner vertices with the same weight can be merged, and vertices with just one child can be removed without changing the induced kernel. Combining Lemmas 1 and 2 we obtain the following result. Theorem 1. A kernel k on X is strong if and only if it is induced by a hierarchy on X. As a consequence of the above theorem the number of values a strong kernel on n objects may take is bounded by the number of vertices in a binary tree with n leaves, i.e., for every strong kernel k on X we have | img(k)| ≤2|X| −1. The Dirac kernel is a common example of a strong kernel, in fact, every kernel k : X × X →R≥0 with | img(k)| = 2 is strong. The definition of a strong kernel and its relation to hierarchies is reminiscent of related concepts for distances: A metric d on X is an ultrametric if d(x, y) ≤max{d(x, z), d(z, y)} for all x, y, z ∈X. For every ultrametric d on X there is a rooted tree T with leaves X and edge weights, such that (i) d is the path length between leaves in T, (ii) the path lengths from a leaf to the root are all equal. Indeed, every ultrametric can be embedded into a Hilbert space [13] and thus the associated inner product is a valid kernel. Moreover, it can be shown that this inner product always is a strong kernel. However, the concept of strong kernels is more general: there are strong kernels k such that the associated kernel metric dk(x, y) = ∥φ(x) −φ(y)∥is not an ultrametric. The distinction originates from the self-similarities, which in strong kernels, can be arbitrary provided that they fulfil k(x, x) ≥k(x, y) for all x, y in X. This degree of freedom is lost when considering distances. If we require all self-similarities of a strong kernel to be equal, then the associated kernel metric always is an ultrametric. Consequently, strong kernels correspond to a superset of ultrametrics. We explicitly define a feature space for general strong kernels in the following. 3.1 Feature maps of strong kernels We use the property that every strong kernel is induced by a hierarchy to derive feature vectors for strong kernels. Let (T, w) be a hierarchy on X that induces the strong kernel k. We define the additive weight function ω : V (T) →R≥0 as ω(v) = w(v) −w(p(v)) and ω(r) = w(r) for the root r. Note that the property of a hierarchy assures that the difference is non-negative. For v ∈V (T) let P(v) ⊆V (T) denote the vertices in T on the path from v to the root r. We consider the mapping φ : X →Rt, where t = |V (T)| and the components indexed by v ∈V (T) are [φ(x)]v = p ω(v), if v ∈P(x) 0, otherwise. 4 a b c a 4 3 1 b 3 5 1 c 1 1 2 (a) Kernel matrix a 4; 1 b 5; 2 c 2; 1 v 3; 2 r 1; 1 (b) Hierarchy r v a b c φ(a) = √ 1, √ 2, √ 1, 0, 0 ⊤ φ(b) = √ 1, √ 2, 0, √ 2, 0 ⊤ φ(c) = √ 1, 0, 0, 0, √ 1 ⊤ (c) Feature vectors Figure 2: The matrix of a strong kernel on three objects (a) induced by the hierarchy (b) and the derived feature vectors (c). A vertex u in (b) is annotated by its weights w(u); ω(u). Proposition 1. Let k be a strong kernel on X. The function φ defined as above is a feature map of k, i.e., k(x, y) = φ(x)⊤φ(y) for all x, y ∈X. Proof. Given arbitrary x, y ∈X and let c = LCA(x, y). The dot product yields φ(x)⊤φ(y) = X v∈V (T ) [φ(x)]v[φ(y)]v = X v∈P (c) p ω(v) 2 = w(c) = k(x, y), since according to the definition the only non-zero products contributing to the sum over v ∈V (T) are those in P(x) ∩P(y) = P(c). Figure 2 shows an example of a strong kernel, an associated hierarchy and the derived feature vectors. As a consequence of Theorem 1 and Proposition 1, strong kernels according to Definition 1 are indeed valid kernels. 4 Valid kernels from optimal assignments We consider the function Kk B on [X]n according to Eq. (1) under the assumption that the base kernel k is strong. Let (T, w) be a hierarchy on X which induces k. For a vertex v ∈V (T) and a set X ⊆X, we denote by Xv the subset of X that is contained in the subtree rooted at v. We define the histogram Hk of a set X ∈[X]n w.r.t. the strong base kernel k as Hk(X) = P x∈X φ(x)◦φ(x), where φ is the feature map of the strong base kernel according to Section 3.1 and ◦denotes the element-wise product. Equivalently, [Hk(X)]v = ω(v) · |Xv| for v ∈V (T). The histogram intersection kernel [20] is defined as K⊓(g, h) = Pt i=1 min{[g]i, [h]i}, t ∈N, and known to be a valid kernel on Rt [2, 5]. Theorem 2. Let k be a strong kernel on X and the histograms Hk defined as above, then Kk B(X, Y ) = K⊓ Hk(X), Hk(Y ) for all X, Y ∈[X]n. Proof. Let (T, w) be a hierarchy inducing the strong base kernel k. We rewrite the weight of an assignment B as sum of weights of vertices in T. Since k(x, y) = w(LCA(x, y)) = X v∈P (x)∩P (y) ω(v), we have W(B) = X (x,y)∈B k(x, y) = X v∈V (T ) cv · ω(v), where cv counts how often v appears simultaneously in P(x) and P(y) in total for all (x, y) ∈B. For the histogram intersection kernel we obtain K⊓(Hk(X), Hk(Y )) = X v∈V (T ) min{ω(v) · |Xv|, ω(v) · |Yv|} = X v∈V (T ) min{|Xv|, |Yv|} · ω(v). Since every assignment B ∈B(X, Y ) is a bijection, each x ∈X and y ∈Y appears only once in B and cv ≤min{|Xv|, |Yv|} follows. It remains to show that the above inequality is tight for an optimal assignment. We construct such an assignment by the following greedy approach: We perform a bottom-up traversal on the hierarchy starting with the leaves. For every vertex v in the hierarchy we arbitrarily pair the objects in Xv and Yv that are not yet contained in the assignment. Note that no element in Xv has been assigned to an element in Y \ Yv, and no element in Yv to an element from X \ Xv. Hence, at every vertex v we have cv = min{|Xv|, |Yv|} vertices from Xv assigned to vertices in Yv. 5 X Y a a a b c a b b c c (a) Assignment problem r v a b c 0 2 4 6 8 H(X) r v a b c H(Y ) (b) Histograms Figure 3: An assignment instance (a) for X, Y ∈[X]5 and the derived histograms (b). The set X contains three distinct vertices labelled a and the set Y two distinct vertices labelled b and c. Taking the multiplicities into account the histograms are obtained from the hierarchy of the base kernel k depicted in Fig. 2. The optimal assignment yields a value of Kk B(X, Y ) = 15, where grey, green, brown, red and orange edges have weight 1, 2, 3, 4 and 5, respectively. The histogram intersection kernel gives K⊓(Hk(X), Hk(Y )) = min{5, 5} + min{8, 6} + min{3, 1} + min{2, 4} + min{1, 2} = 15. Figure 3 illustrates the relation between the optimal assignment kernel employing a strong base kernel and the histogram intersection kernel. Note that a vertex v ∈V (T) with ω(v) = 0 does not contribute to the histogram intersection kernel and can be omitted. In particular, for any two objects x1, x2 ∈X with k(x1, y) = k(x2, y) for all y ∈X we have ω(x1) = ω(x2) = 0. There is no need to explicitly represent such leaves in the hierarchy, yet their multiplicity must be considered to determine the number of leaves in the subtree rooted at an inner vertex, cf. Fig. 2, 3. Corollary 1. If the base kernel k is strong, then the function Kk B is a valid kernel. Theorem 2 implies not only that optimal assignments give rise to valid kernels for strong base kernels, but also allows to compute them by histogram intersection. Provided that the hierarchy is known, bottom-up computation of histograms and their intersection can both be performed in linear time, while the general Hungarian method would require cubic time to solve the assignment problem [6]. Corollary 2. Given a hierarchy inducing k, Kk B(X, Y ) can be computed in time O(|X| + |Y |). 5 Graph kernels from optimal assignments The concept of optimal assignment kernels is rather general and can be applied to derive kernels on various structures. In this section we apply our results to obtain novel graph kernels, i.e., kernels of the form K : G × G →R, where G denotes the set of graphs. We assume that every vertex v is equipped with a categorical label given by τ(v). Labels typically arise from applications, e.g., in a graph representing a chemical compound the labels may indicate atom types. 5.1 Optimal assignment kernels on vertices and edges As a baseline we propose graph kernels on vertices and edges. The vertex optimal assignment kernel (V-OA) is defined as K(G, H) = Kk B(V (G), V (H)), where k is the Dirac kernel on vertex labels. Analogously, the edge optimal assignment kernel (E-OA) is given by K(G, H) = Kk B(E(G), E(H)), where we define k(uv, st) = 1 if at least one of the mappings (u 7→s, v 7→t) and (u 7→t, v 7→s) maps vertices with the same label only; and 0 otherwise. Since these base kernels are Dirac kernels, they are strong and, consequently, V-OA and E-OA are valid kernels. 5.2 Weisfeiler-Lehman optimal assignment kernels Weisfeiler-Lehman kernels are based on iterative vertex colour refinement and have been shown to provide state-of-the-art prediction performance in experimental evaluations [19]. These kernels employ the classical 1-dimensional Weisfeiler-Lehman heuristic for graph isomorphism testing and consider subtree patterns encoding the neighbourhood of each vertex up to a given distance. For a parameter h and a graph G with initial labels τ, a sequence (τ0, . . . , τh) of refined labels referred to as colours is computed, where τ0 = τ and τi is obtained from τi−1 by the following procedure: 6 a b e c d f (a) Graph G with refined colours 7→6 7→5 7→1 7→4 7→1 7→1 7→2 7→1 7→2 7→1 (b) Feature vector {a, b} {c, d} {f} {e} (c) Associated hierarchy Figure 4: A graph G with uniform initial colours τ0 and refined colours τi for i ∈{1, . . . , 3} (a), the feature vector of G for the Weisfeiler-Lehman subtree kernel (b) and the associated hierarchy (c). Note that the vertices of G are the leaves of the hierarchy, although not shown explicitly in Fig. 4(c). Sort the multiset of colours {τi−1(u) : vu ∈E(G)} for every vertex v lexicographically to obtain a unique sequence of colours and add τi−1(v) as first element. Assign a new colour τi(v) to every vertex v by employing a one-to-one mapping from sequences to new colours. Figure 4(a) illustrates the refinement process. The Weisfeiler-Lehman subtree kernel (WL) counts the vertex colours two graphs have in common in the first h refinement steps and can be computed by taking the dot product of feature vectors, where each component counts the occurrences of a colour, see Fig. 4(b). We propose the Weisfeiler-Lehman optimal assignment kernel (WL-OA), which is defined on the vertices like OA-V, but employs the non-trivial base kernel k(u, v) = h X i=0 kδ(τi(u), τi(v)). (2) This base kernel corresponds to the number of matching colours in the refinement sequence. More intuitively, the base kernel value reflects to what extent the two vertices have a similar neighbourhood. Let V be the set of all vertices of graphs in G, we show that the refinement process defines a hierarchy on V, which induces the base kernel of Eq. (2). Each vertex colouring τi naturally partitions V into colour classes, i.e., sets of vertices with the same colour. Since the refinement takes the colour τi(v) of a vertex v into account when computing τi+1(v), the implication τi(u) ̸= τi(v) ⇒τi+1(u) ̸= τi+1(v) holds for all u, v ∈V. Hence, the colour classes induced by τi+1 are at least as fine as those induced by τi. Moreover, the sequence (τi)0≤i≤h gives rise to a family of nested subsets, which can naturally be represented by a hierarchy (T, w), see Fig. 4(c) for an illustration. When assuming ω(v) = 1 for all vertices v ∈V (T), the hierarchy induces the kernel of Eq. (2). We have shown that the base kernel is strong and it follows from Corollary 1 that WL-OA is a valid kernel. Moreover, it can be computed from the feature vectors of the Weisfeiler-Lehman subtree kernel in linear time by histogram intersection, cf. Theorem 2. 6 Experimental evaluation We report on the experimental evaluation of the proposed graph kernels derived from optimal assignments and compare with state-of-the-art convolution kernels. 6.1 Method and Experimental Setup We performed classification experiments using the C-SVM implementation LIBSVM [7]. We report mean prediction accuracies and standard deviations obtained by 10-fold cross-validation repeated 10 times with random fold assignment. Within each fold all necessary parameters were selected by crossvalidation based on the training set. This includes the regularization parameter C, kernel parameters where applicable and whether to normalize the kernel matrix. All kernels were implemented in Java and experiments were conducted using Oracle Java v1.8.0 on an Intel Core i7-3770 CPU at 3.4GHz (Turbo Boost disabled) with 16GB of RAM using a single processor only. Kernels. As a baseline we implemented the vertex kernel (V) and edge kernel (E), which are the dot products on vertex and edge label histograms, respectively, where an edge label consist of the labels of its endpoints. V-OA and E-OA are the related optimal assignment kernels as described in Sec. 5.1. For the Weisfeiler-Lehman kernels WL and WL-OA, see Section 5.2, the parameter h was 7 Table 1: Classification accuracies and standard deviations on graph data sets representing small molecules, macromolecules and social networks. Kernel Data Set MUTAG PTC-MR NCI1 NCI109 PROTEINS D&D ENZYMES COLLAB REDDIT V 85.4±0.7 57.8±0.9 64.6±0.1 63.6±0.2 71.9±0.4 78.2±0.4 23.4±1.1 56.2±0.0 75.3±0.1 V-OA 82.5±1.1 56.4±1.8 65.6±0.3 65.1±0.4 73.8±0.5 78.8±0.3 35.1±1.1 59.3±0.1 77.8±0.1 E 85.2±0.6 57.3±0.7 66.2±0.1 64.9±0.1 73.5±0.2 78.3±0.5 27.4±0.8 52.0±0.0 75.1±0.1 E-OA 81.0±1.1 56.3±1.7 68.9±0.3 68.7±0.2 74.5±0.6 79.0±0.4 37.4±1.8 68.2±0.3 79.8±0.2 WL 86.0±1.7 61.3±1.4 85.8±0.2 85.9±0.3 75.6±0.4 79.0±0.4 53.7±1.4 79.1±0.1 80.8±0.4 WL-OA 84.5±1.7 63.6±1.5 86.1±0.2 86.3±0.2 76.4±0.4 79.2±0.4 59.9±1.1 80.7±0.1 89.3±0.3 GL 85.2±0.9 54.7±2.0 70.5±0.2 69.3±0.2 72.7±0.6 79.7±0.7 30.6±1.2 64.7±0.1 60.1±0.2 SP 83.0±1.4 58.9±2.2 74.5±0.3 73.0±0.3 75.8±0.5 79.0±0.6 42.6±1.6 58.8±0.2 84.6±0.2 chosen from {0, ..., 7}. In addition we implemented a graphlet kernel (GL) and the shortest-path kernel (SP) [3]. GL is based on connected subgraphs with three vertices taking labels into account similar to the approach used in [19]. For SP we used the Dirac kernel to compare path lengths and computed the kernel by explicit feature maps, cf. [19]. Note that all kernels not identified as optimal assignment kernels by the suffix OA are convolution kernels. Data sets. We tested on widely-used graph classification benchmarks from different domains [cf. 4, 23, 19, 24]: MUTAG, PTC-MR, NCI1 and NCI109 are graphs derived from small molecules, PROTEINS, D&D and ENZYMES represent macromolecules, and COLLAB and REDDIT are derived from social networks.1 All data sets have two class labels except ENZYMES and COLLAB, which are divided into six and three classes, respectively. The social network graphs are unlabelled and we considered all vertices uniformly labelled. All other graph data sets come with vertex labels. Edge labels, if present, were ignored since they are not supported by all graph kernels under comparison. 6.2 Results and discussion Table 1 summarizes the classification accuracies. We observe that optimal assignment kernels on most data sets improve over the prediction accuracy obtained by their convolution-based counterpart. The only distinct exception is MUTAG. The extent of improvement on the other data sets varies, but is in particular remarkable for ENZYMES and REDDIT. This indicates that optimal assignment kernels provide a more valid notion of similarity than convolution kernels for these classification tasks. The most successful kernel is WL-OA, which almost consistently improves over WL and performs best on seven of the nine data sets. WL-OA provides the second best accuracy on D&D and ranks in the middle of the field for MUTAG. For these two data set the difference in accuracy between the kernels is small and even the baseline kernels perform notably well. The time to compute the quadratic kernel matrix was less that one minute for all kernels and data sets with exception of SP on D&D (29 min) and REDDIT (2 h) as well as GL on COLLAB (28 min). The running time to compute the optimal assignment kernels by histogram intersection was consistently on par with the running time required for the related convolution kernels and orders of magnitude faster than their computation by the Hungarian method. 7 Conclusions and future work We have characterized the class of strong kernels leading to valid optimal assignment kernels and derived novel effective kernels for graphs. The reduction to histogram intersection makes efficient computation possible and known speed-up techniques for intersection kernels can directly be applied (see, e.g., [21] and references therein). We believe that our results may form the basis for the design of new kernels, which can be computed efficiently and adequately measure similarity. 1The data sets, further references and statistics are available from http://graphkernels.cs. tu-dortmund.de. 8 Acknowledgments N. M. Kriege is supported by the German Science Foundation (DFG) within the Collaborative Research Center SFB 876 “Providing Information by Resource-Constrained Data Analysis”, project A6 “Resource-efficient Graph Mining”. P.-L. Giscard is grateful for the financial support provided by the Royal Commission for the Exhibition of 1851. References [1] L. Bai, L. Rossi, Z. Zhang, and E. R. Hancock. An aligned subtree kernel for weighted graphs. In Proc. Int. Conf. Mach. Learn., ICML 2015, pages 30–39, 2015. [2] A. Barla, F. Odone, and A. Verri. Histogram intersection kernel for image classification. In Int. Conf. Image Proc., ICIP 2003, volume 3, pages III–513–16 vol.2, Sept 2003. [3] K. M. Borgwardt and H.-P. Kriegel. Shortest-path kernels on graphs. In Proc. IEEE Int. Conf. Data Min., ICDM ’05, pages 74–81, Washington, DC, USA, 2005. [4] K. M. Borgwardt, C. S. Ong, S. Schönauer, S. V. N. Vishwanathan, A. J. Smola, and H.-P. Kriegel. Protein function prediction via graph kernels. Bioinformatics, 21 Suppl 1:i47–i56, Jun 2005. [5] S. Boughorbel, J. P. Tarel, and N. Boujemaa. Generalized histogram intersection kernel for image recognition. In Int. Conf. Image Proc., ICIP 2005, pages III–161–4, 2005. [6] R. E. Burkard, M. Dell’Amico, and S. Martello. Assignment Problems. SIAM, 2012. [7] C.-C. Chang and C.-J. Lin. LIBSVM: A library for support vector machines. ACM Trans. Intell. Syst. Technol., 2:27:1–27:27, May 2011. [8] H. Fröhlich, J. K. Wegner, F. Sieker, and A. Zell. Optimal assignment kernels for attributed molecular graphs. In Proc. Int. Conf. Mach. Learn., ICML ’05, pages 225–232, 2005. [9] M. Gori, M. Maggini, and L. Sarti. Exact and approximate graph matching using random walks. IEEE Trans. Pattern Anal. Mach. Intell., 27(7):1100–1111, July 2005. [10] K. Grauman and T. Darrell. Approximate correspondences in high dimensions. In B. Schölkopf, J. C. Platt, and T. Hoffman, editors, Adv. Neural Inf. Process. Syst. 19, NIPS ’06, pages 505–512. MIT Press, 2007. [11] K. Grauman and T. Darrell. The pyramid match kernel: Efficient learning with sets of features. J. Mach. Learn. Res., 8:725–760, May 2007. [12] D. Haussler. Convolution kernels on discrete structures. Technical Report UCSC-CRL-99-10, University of California, Santa Cruz, CA, USA, 1999. [13] R. S. Ismagilov. Ultrametric spaces and related hilbert spaces. Mathematical Notes, 62(2):186–197, 1997. [14] F. D. Johansson and D. Dubhashi. Learning with similarity functions on graphs using matchings of geometric embeddings. In Proc. ACM SIGKDD Int. Conf. Knowledge Discovery and Data Mining, KDD ’15, pages 467–476. ACM, 2015. [15] G. Loosli, S. Canu, and C. S. Ong. Learning SVM in Krein spaces. IEEE Trans. Pattern Anal. Mach. Intell., PP(99):1–1, 2015. [16] D. Pachauri, R. Kondor, and V. Singh. Solving the multi-way matching problem by permutation synchronization. In C. J. C. Burges, L. Bottou, M. Welling, Z. Ghahramani, and K. Q. Weinberger, editors, Adv. Neural Inf. Process. Syst. 26, NIPS ’13, pages 1860–1868. Curran Associates, Inc., 2013. [17] K. Riesen and H. Bunke. Approximate graph edit distance computation by means of bipartite graph matching. Image Vis. Comp., 27(7):950 – 959, 2009. [18] M. Schiavinato, A. Gasparetto, and A. Torsello. Transitive assignment kernels for structural classification. In A. Feragen, M. Pelillo, and M. Loog, editors, Int. Workshop Similarity-Based Pattern Recognit., SIMBAD ’15, pages 146–159, 2015. [19] N. Shervashidze, P. Schweitzer, E. J. van Leeuwen, K. Mehlhorn, and K. M. Borgwardt. Weisfeiler-Lehman graph kernels. J. Mach. Learn. Res., 12:2539–2561, 2011. [20] M. J. Swain and D. H. Ballard. Color indexing. Int. J. Comp. Vis., 7(1):11–32, 1991. [21] A. Vedaldi and A. Zisserman. Efficient additive kernels via explicit feature maps. IEEE Trans. Pattern Anal. Mach. Intell., 34(3):480–492, 2012. [22] J.-P. Vert. The optimal assignment kernel is not positive definite. CoRR, abs/0801.4061, 2008. [23] S. V. N. Vishwanathan, N. N. Schraudolph, R. I. Kondor, and K. M. Borgwardt. Graph kernels. J. Mach. Learn. Res., 11:1201–1242, 2010. [24] P. Yanardag and S. V. N. Vishwanathan. Deep graph kernels. In Proc. ACM SIGKDD Int. Conf. Knowledge Discovery and Data Mining, KDD ’15, pages 1365–1374. ACM, 2015. 9 | 2016 | 39 |
6,316 | Bayesian Optimization with Robust Bayesian Neural Networks Jost Tobias Springenberg Aaron Klein Stefan Falkner Frank Hutter Department of Computer Science University of Freiburg {springj,kleinaa,sfalkner,fh}@cs.uni-freiburg.de Abstract Bayesian optimization is a prominent method for optimizing expensive-to-evaluate black-box functions that is widely applied to tuning the hyperparameters of machine learning algorithms. Despite its successes, the prototypical Bayesian optimization approach – using Gaussian process models – does not scale well to either many hyperparameters or many function evaluations. Attacking this lack of scalability and flexibility is thus one of the key challenges of the field. We present a general approach for using flexible parametric models (neural networks) for Bayesian optimization, staying as close to a truly Bayesian treatment as possible. We obtain scalability through stochastic gradient Hamiltonian Monte Carlo, whose robustness we improve via a scale adaptation. Experiments including multi-task Bayesian optimization with 21 tasks, parallel optimization of deep neural networks and deep reinforcement learning show the power and flexibility of this approach. 1 Introduction Hyperparameter optimization is crucial for obtaining good performance in many machine learning algorithms, such as support vector machines, deep neural networks, and deep reinforcement learning. The most prominent method for hyperparameter optimization is Bayesian optimization (BO) based on Gaussian processes (GPs), as e.g., implemented in the Spearmint system [1]. While GPs are the natural probabilistic models for BO, unfortunately, their complexity is cubic in the number of data points and they often do not gracefully scale to high dimensions [2]. Although alternative methods based on tree models [3, 4] or Bayesian linear regression using features from a neural network [5] exist, they obtain scalability by partially sacrificing a principled treatment of model uncertainties. Here, we propose to use neural networks as a powerful and scalable parametric model, while staying as close to a truly Bayesian treatment as possible. Crucially, we aim to keep the wellcalibrated uncertainty estimates of GPs since BO relies on them to accurately determine promising hyperparameters. To this end we derive a more robust variant of the recent stochastic gradient Hamiltonian Monte Carlo (SGHMC) method [6]. After providing background (Section 2), we make the following contributions: We derive a general formulation for both single-task and multi-task BO with Bayesian neural networks that leads to a robust, scalable, and parallel optimizer (Section 3). We derive a scale adaptation technique to substantially improve the robustness of stochastic gradient HMC (Section 4). Finally, using our method – which we dub Bayesian Optimization with Hamiltonian Monte Carlo Artificial Neural Networks (BOHAMIANN) – we demonstrate state-of-the-art performance for a wide range of optimization tasks. This includes multi-task BO, parallel optimization of deep residual networks, and deep reinforcement learning. An implementation of our method can be found at https://github. com/automl/RoBO. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. 2 Background 2.1 Bayesian optimization for single and multiple tasks Let f : X →R be an arbitrary function defined over a convex set X ⊂Rd that can be evaluated at x ∈X, yielding noisy observations y ∼N(f(x), σ2 obs). We aim to find x∗∈arg minx∈X f(x). To solve this problem, BO (see, e.g., Brochu et al. [7]) typically starts by observing the function at an initial design D = {(x1, y1), . . . , (xI, yI)}. BO then repeatedly executes the following steps: (1) fit a regression model p(f | D) to the current data D; (2) use p(f | D) to select an input xt+1 at which to query f by maximizing an acquisition function (which trades off exploration and exploitation); (3) observe yt+1 ∼N(f(xt+1), σ2 obs) and add the result to the dataset: D := D ∪{xt+1, yt+1}. In the generalized case of multi-task Bayesian optimization [8], there are K related black-box functions, F = {f1, . . . , fK}, each with the same domain X; and, the goal is to find x∗∈ arg minx∈X ft(x) for a given t.1 In this case, the initial design is augmented with previous evaluations of the related functions. That is, D = D1 ∪· · · ∪DK with Dk = {(xk 1, yk 1), . . . , (xk nk, yk nk)}, where yk i ∼N(fk(xk i ), σ2 obs) and nk = |Dk| points have already been evaluated for function fk. BO then requires a probabilistic model p(f | D) over the K functions, which can be used to transfer knowledge from related tasks to the target task t (and thus reduce the required number of function evaluations on t). A concrete instantiation of BO is obtained by specifying the acquisition function and the probabilistic model. As acquisition function, here, we will use the popular expected improvement (EI) criterion [9]; other commonly used options, such as UCB [10] could be directly applied. EI is defined as αEI(x; D) = σ(f(x) | D) (γ(x)Φ(γ(x)) + φ(γ(x))) , with γ(x) = ˆy −µ(f(x) | D) σ(f(x) | D) , (1) where Φ(·) and φ(·) denote the cumulative distribution function and the probability density function of a standard normal distribution, respectively, and µ(f(x) | D) and σ(f(x) | D) denote the posterior mean and standard deviation of our probabilistic model based on data D. While the prototypical probabilistic model in BO is a GP [1], we will use a Bayesian neural network (BNN). 2.2 Bayesian methods for neural networks The ability to combine the flexibility and scalability of (deep) neural networks with well-calibrated uncertainty estimates is highly desirable in many contexts. Not surprisingly, there thus exist many approaches for this problem, including early work on (non-scalable) Hamiltonian Monte Carlo [11], recent work on variational inference methods [12, 13] and expectation propagation [14], reinterpretations of dropout as approximate inference [15, 16], as well as stochastic gradient MCMC methods based on Hamiltonian Monte Carlo [6] and stochastic gradient Langevin MCMC [17]. While any of these methods could, in principle, be used for BO, we found most of them to result in suboptimal uncertainty estimates. Our preliminary experiments – presented in the supplementary material (Section B) – suggest these methods often conservatively estimate the uncertainty for points far away from the data, particularly when based on little training data. This is problematic for BO, which crucially relies on well-calibrated uncertainty estimates based on few function evaluations. One family of methods that consistently resulted in good uncertainty estimates in our tests were Hamiltonian Monte Carlo (HMC) methods, which we will thus use throughout this paper. Concretely, we will build on the scalable stochastic MCMC method from Chen et al. [6]. 3 Bayesian optimization with Bayesian neural networks We now formalize the Bayesian neural network regression model we use as the basis of our Bayesian optimization approach. Formally, under the assumption that the observed function values (conditioned on x) are normally distributed (with unknown mean and variance), we start by defining our probabilistic function model as p(ft(x) | x, θ) = N( ˆf(x, t; θµ), θσ2), (2) 1The standard single-task case is recovered when K = t = 1. 2 where θ = [θµ, θσ2]T , ˆf(x, t; θµ) is the output of a parametric model with parameters θµ, and where we assume a homoscedastic noise model with zero mean and variance θσ2.2 A single-task model can trivially be obtained from this definition: Single-task model. In the single-task setting we simply model the function mean ˆf(x, t; θµ) = h(x; θµ) using a neural network, with output h (i.e. h implements a forward-pass). Multi-task model. For the multi-task model we use a slightly adapted network architecture. As additional input, the network is provided with a task-specific embedding vector. That is, we have ˆf(x, t; θµ) = h [x; ψt]T , θh , where h(·), again, denotes the output of the neural network (here with parameters θh) and ψt is the t-th row of an embedding matrix ψ ∈RK×L (we choose L = 5 for our experiments). This embedding matrix is learned alongside all other parameters. Additionally, if information about the dataset (such as data-set size etc.) is available it can be appended to this embedding vector. The full vector of the network parameters then becomes θµ = [θh, vec(ψ)], where vec(·) denotes vectorization. Instead of using a learned embedding we could have chosen to represent the tasks through a one-out-of-K encoding vector, which functionally would be equivalent but would induce a large number of additional parameters to be learned for large K. With these definitions, the joint probability of the model parameters and the observed data is then p(D, θ) = p(θµ)p(θσ2) K Y k=1 |Dk| Y i=1 N(yk i | ˆf(xk i , k; θµ), θσ2), (3) where p(θµ) and p(θσ2) are priors on the network parameters and on the variance, respectively. For BO, we need to be able to compute the acquisition function at given candidate points x. For this we require the predictive posterior p(ft(x)|x, D) (marginalized over the model parameters θ). Unfortunately, for our choice of modeling ft with a neural network, evaluating this posterior exactly is intractable. Let us, for now, assume that we can generate samples θi ∼p(θ | D) from the posterior for the model parameters given the data; we will show how to do this with stochastic gradient Hamiltonian Monte Carlo (SGHMC) in Section 4. We can then use these samples to approximate the predictive posterior p(ft(x)|x, D) as p(ft(x)|x, D) = Z θ p(ft(x) | x, θ)p(θ | D)dθ ≈1 M M X i=1 p(ft(x) | x, θi). (4) Using the same samples θi ∼p(θ | D), we make a Gaussian approximation to this predictive distribution to obtain mean and variance to compute the EI value in Equation (1): µ(ft(x)|D) = 1 M M X i=1 ˆf(x, t; θi µ), σ2(f(x)|D) = 1 M M X i=1 ˆf(x, t; θi µ) −µ(ft(x)|D) 2 + θi σ2. (5) Notably, we can compute partial derivatives of αEI (with respect to x) via backpropagation through all functions ˆf(x, t; θi µ) which allows gradient-based maximization of the acquisition function. We also extended this formulation to parallel asynchronous BO by sampling possible outcomes for currently-running function evaluations and using the acquisition function αMCEI proposed by Snoek et al. [1]. Details are given in the supplementary material (Section A). 4 Robust stochastic gradient HMC via scale adaptation In this section, we show how stochastic gradient Hamiltonian Monte Carlo (SGHMC) can be used to sample from the model defined by Equation (3). We first summarize the general formalism behind SGHMC [6] and then derive a more robust variant suitable for BO. 4.1 Stochastic gradient HMC HMC introduces a set of auxiliary variables, r, and then samples from the joint distribution p(θ, r | D) ∝exp −U(θ) −1 2rT M−1r , with U(θ) = −log p(D, θ) (6) 2We note that, if required, we could model heteroscedastic functions by defining the observation noise variance θσ2 as a deterministic function of x (e.g. as the second output of the neural network). 3 by simulating a fictitious physical system described by a set of differential equations, called Hamilton’s equations. In this system, the negative log-likelihood U(θ) plays the role of a potential energy, r corresponds to the momentum of the system, and M represents the (arbitrary) mass matrix [18]. Classically, the dynamics for θ and r depend on the gradient ∇U(θ) whose evaluation is too expensive for our purposes, since it would involve evaluating the model on all data-points. By introducing a user-defined friction matrix C, Chen et al. [6] showed how Hamiltonian dynamics can be modified to sample from the correct distribution if only a noisy estimate ∇˜U(θ), e.g. computed from a mini-batch, is available. In particular, their discretized system of equations reads ∆θ = ϵM−1r , ∆r = −ϵ∇˜U(θ) −ϵCM−1r + N(0, 2(C −ˆB)ϵ) , (7) where, in a suggestive notation, we write N(0, Σ) representing the addition of a sample from a multivariate Gaussian with zero mean and covariance matrix Σ. Besides the estimate for the noise of the gradient evaluation ˆB, and an undefined step length ϵ, all that is required for simulating the dynamics in Equation (7) is a mechanism for computing gradients of the log likelihood (and thus of our model) on small subsets (or batches) of the data. This makes SGHMC particularly appealing when working with large models and data-sets. Furthermore, Equation (7) can be seen as an MCMC analogue to stochastic gradient descent (with momentum) [6]. Following these update equations, the distribution of (θ, r) is the one in Equation (6), and θ is guaranteed to be distributed according to p(θ | D). 4.2 Scale adapted stochastic gradient HMC Like many Monte Carlo methods, SGHMC does not come without caveats, namely the correct setting of the user-defined quantities: the friction term C, the estimate of the gradient noise ˆB, the mass matrix M, the number of MCMC steps, and – most importantly – the step-size ϵ. We found the friction term and the step-size to be highly model and data-set dependent3, which is unacceptable for BO, where robust estimates are required across many different functions F with as few parameter choices as possible. A closer look at Equation (7) shows why the step-size crucially impacts the robustness of SGHMC. For the popular choice M = I, the change in the momentum is proportional to the gradient. If the gradient elements are on vastly different scales (and potentially correlated), then the update effectively assigns unequal importance to changes in different parameters of the model. This, in turn, can lead to slow exploration of the target density. To correct for unequal parameter scales (and respect their correlation), we would ideally like to use M as a pre-conditioner, reflecting the metric underlying the model’s parameters. This would lead to a stochastic gradient analogue of Riemann Manifold Hamiltonian Monte Carlo [19], which has been studied before by Ma et al. [20] and results in an algorithm called generalized stochastic gradient Riemann Hamiltonian Monte Carlo (gSGRHMC). Unfortunately, gSGRHMC requires computation (and storage) of the full Fisher information matrix of U and its gradient, which is prohibitively expensive for our purposes. As a pragmatic approach, we consider a pre-conditioning scheme increasing SGHMCs robustness with respect to ϵ and C, while avoiding the costly computations of gSGRHMC. We want to note that recently – and directly related to our approach – adaptive pre-conditioning using ideas from SGD methods has been combined with stochastic gradient Langevin dynamics in Li et al. [21] and to derive a hybrid between SGD optimization and HMC sampling in Chen et al. [22]. These approaches however either come with additional hyperparameters that need to be set or do not guarantee unbiased sampling. The rest of this section shows how all remaining SGHMC parameters in our method are determined automatically. Choosing M. For the mass matrix, we take inspiration from the connection between SGHMC and SGD. Specifically, the literature [23, 24] shows how normalizing the gradient by its magnitude (estimated over the whole dataset) improves the robustness of SGD. To perform the analogous operation in SGHMC, we propose to adapt the mass matrix during the burn-in phase. We set M−1 = diag ˆV −1/2 θ , where ˆVθ is an estimate of the (element-wise) uncentered variance of the gradient: ˆVθ ≈E[(∇˜U(θ))2]. We estimate ˆVθ using an exponential moving average during the 3We refer to Section 5 for a quantitative evaluation of this claim. 4 burn-in phase yielding the update equation ∆ˆVθ = −τ −1 ˆVθ + τ −1∇( ˜U(θ))2, (8) where τ is a free parameter vector specifying the exponential averaging windows. Note that all multiplications above are element-wise and τ is a vector with the same dimensionality as θ. Automatically choosing τ. To avoid adding τ as a new hyperparameter – that would have to be tuned – we automatically determine its value. For this purpose, we use an adaptive estimate previously derived for adaptive learning rate procedures for SGD [25]. We maintain an additional smoothed estimate of the gradient gθ ≈∇U(θ) and consider the element-wise ratio g2 θ/ˆVθ between the squared estimated gradient and the gradient variance. This ratio will be large if the estimated gradient is large compared to the noise – in which case we can use a small averaging window – and it will be small if the noise is large compared to the average gradient – in which case we want a larger averaging window. We formalize these desiderata by simultaneously updating Equation 8, ∆τ = −g2 θ ˆV −1 θ τ + 1 , and ∆gθ = −τ −1gθ + τ −1∇˜U(θ) . (9) Estimating ˆB. While the above procedure removes the need to hand-tune M−1 (and will stabilize the method for different C and ϵ), we have not yet defined an estimate for ˆB. Ideally, ˆB should be the estimate of the empirical Fisher information matrix that, as discussed above, is too expensive to compute. We therefore resort to a diagonal approximation yielding ˆB = 1 2ϵ ˆVθ which is readily available from Equation (8). Scale adapted update equations. Finally, we can combine all parameter estimates to formulate our automatically scale adapted SGHMC method. Following Chen et al. [6], we introduce the variable substitution v = ϵM−1r = ϵ ˆV −1/2 θ r which leads us to the dynamical equations ∆θ = v , ∆v = −ϵ2 ˆV −1/2 θ ∇˜U(θ) −ϵ ˆV −1/2 θ Cv + N 0, 2ϵ3 ˆV −1/2 θ C ˆV −1/2 θ −ϵ4I , (10) using the quantities estimated in Equations (8)-(9) during the burn-in phase, and then fixing the choices for all parameters. Note that the approximation of ˆB cancels with the square of our estimate of M−1. In practice, we choose C = CI, i.e. the same independent noise for each element of θ. In this case, Equation (10) constrains the choices of C and ϵ, as we need them to fulfill the relation min(V −1 θ )C ≥ϵ. For the remainder of the paper, we fix ϵ = 10−2 (a robust choice in our experience) and chose C such that we have ϵ ˆV −1/2 θ C = 0.05I (intuitively this corresponds to a constant decay in momentum of 0.05 per time step) potentially increasing it to satisfy the mentioned constraint at the end of the burn-in phase. We want to emphasize that our estimation/adaptation of the parameters only changes the HMC procedure during the burn-in phase. After it, when actual samples are recorded, all parameters stay fixed. In particular, this entails that as long as our choice of ϵ and C satisfies min( ˆV −1 θ )C ≥ϵ, our method samples from the correct distribution. Our choices are compatible with the constraints on the free parameters of the original SGHMC [6]. Further, we note that the scale adaptation technique is agnostic to the parametric form of the density we aim to sample from; and could therefore potentially also simplify SGHMC sampling for models beyond those considered in this paper. 5 Experiments on the effects of scale adptation First, to test the efficacy of the proposed scale adaptation technique, we performed an evaluation on four common regression datasets following the protocol from Hernández-Lobato and Adams [14], presented in Table 1. The comparison shows that – despite its guarantees for sampling from the correct distribution – SGHMC (without our adaptation) required tuning for each dataset to obtain good uncertainty estimates. This effect can likely be attributed to the high dimensionality (and non-uniformity) of the parameter space (for which the standard SGHMC procedure might just require too many MCMC steps to sample from the target density). Our adaptation removed these problems. Additionally we found our method to faithfully represent model uncertainty even in regimes were only few data-points are available. This observation is qualitatively shown in Figure 1 (right) and further explored in the supplementary material. 5 Table 1: Log likelihood for regression benchmarks from the UCI repository. For comparison, we include results for VI (variational inference) and PBP (probabilistic backpropagation) taken from Hernández-Lobato and Adams [14]. We report mean ± standard deviation across 10 runs. The first two SGHMC variants are the vanilla algorithm (without our modifications) optimized for best mean performance (best average), and best performance on each dataset (tuned per dataset) via grid search. Method/Dataset Boston Housing Yacht Hydrodynamics Concrete Wine Quality Red SGHMC (best average) -3.474 ± 0.511 -13.579 ± 0.983 -4.871 ± 0.051 -1.825 ± 0.75 SGHMC (tuned per dataset) -2.489 ± 0.151 -1.753 ± 0.19 -4.165 ± 0.723 -1.287 ± 0.28 SGHMC (scale-adapted) -2.536 ± 0.036 -1.107 ± 0.083 -3.384 ± 0.24 -1.041 ± 0.17 VI -2.903 ± 0.071 -3.439 ± 0.163 -3.391 ± 0.017 -0.980 ± 0.013 PBP -2.574 ± 0.089 -1.634 ± 0.016 -3.161 ± 0.019 -0.968 ± 0.014 6 Bayesian optimization experiments We now show Bayesian optimization experiments for BOHAMIANN. Unless noted otherwise, we used a three layer neural network with 50 tanh units for all experiments. For the priors we let p(θµ) = N(0, σ2 µ) be normally distributed and placed a Gamma hyperprior on σ2 µ, which is periodically updated via Gibbs sampling. For p(θ2 σ) we chose a log-normal prior. To approximate EI we used 50 samples acquired via SGHMC sampling. Maximization of the acquision function was performed via gradient ascent. Due to space constraints, full details on the experimental setup as well as the optimized hyperparameters for all experiments are given in the supplementary material (Section C), which also contains additional plots and evaluations for all experiments. 0 50 100 150 200 Number of function evaluations 10-6 10-5 10-4 10-3 10-2 10-1 100 101 102 103 Immediate regret Branin GP DNGO (10-10-10) DNGO (50-50-50) BOHAMIANN (10-10-10) BOHAMIANN (50-50-50) Random Search −2.0 −1.5 −1.0 −0.5 0.0 0.5 1.0 1.5 −2.5 −2.0 −1.5 −1.0 −0.5 0.0 0.5 1.0 1.5 2.0Fit of the sinOne function after 20 BO steps using BOHAMIANN sinc(x) BOHAMIANN Figure 1: Evaluation on common benchmark problems. (Left) Immediate regret of various optimizers averaged over 30 runs on the Branin function. For DNGO and BOHAMIANN, we denote the layer sizes for the (3 layer) networks in parenthesis. (Right) A fit of the sinOne function after 20 steps of BO using BOHAMIANN. We plot the mean of the predictive posterior and ± 2 standard deviations; calculated based on 50 MCMC samples. 6.1 Common benchmark problems As a first experiment, we compare BOHAMIANN to existing state-of-the-art BO on a set of synthetic functions and hyperparameter optimization tasks devised by Eggensperger et al. [2]. All optimizers achieved acceptable performance, but GP based methods were found to perform best on these lowdimensional benchmarks, which we thus take as a point of reference. Overall, on the 5 benchmarks BOHAMIANN matched the performance of GP based BO on 4 and performed worse on one, indicating that even in the low-data regime Bayesian neural networks (BNNs) are a feasible model class for BO. A detailed listing of the results is given in the supplementary material. We further compared to our re-implementation of the recently proposed DNGO method [5], which uses features extracted from a maximum likelihood fit of a neural network as the basis for a Bayesian linear regression fit (and was also proposed as a replacement of GPs for scalable BO). For the benchmark tasks we found both DNGO and BOHAMIANN to perform well with BOHAMIANN being slightly more robust to different architecture choices. This behavior is illustrated in Figure 1 (left) where we compare DNGO with two different network architectures to BOHAMIANN. 6 Additionally, DNGO performed well for some high-dimensional problems (cf. Section 6.3), but it got stuck when we used it to optimize 13 hyperparameters of a Deep RL agent (cf. Section 6.4). 6.2 Multi-task hyperparameter optimization Next, we evaluated BOHAMIANN for multi-task hyperparameter optimization of a support vector machine (SVM) and a random forest (RF) over a range of different benchmarks. Concretely, we considered a set of 21 different classification datasets downloaded from the OpenML repository [26]. These were grouped into four groups of related tasks (as determined by a distance based on metafeatures extracted from the datasets). Within each group (consisting of 3-6 datasets), we randomly designated the optimization of the algorithms hyperparameters for one dataset as the target function ft. The remaining datasets were used for collecting |Dk| = 30 additional training data points each, which were used as the initial design for BO. To allow for fast evaluation of this benchmark, we pre-computed the performance of different hyperparameter settings on all datasets following Feurer et al. [27]. The task for the optimizer then is to find an optimal hyperparameter setting for the target benchmark (for which it receives no initial data). We compared our method to the GP based multi-task BO procedure from Swersky et al. [8], as well as to standard, single-task, GP based BO. Overall, while all optimizers eventually found a solution close to the optimum the multi-task version of BOHAMIANN was able to exploit the knowledge obtained from the related datasets, resulting in quicker convergence. On average over all four benchmarks, MT-BOHAMIANN was 12 % faster than GP based BO (to reach an immediate regret ≤0.25), whereas MTBO was only 5% faster. Plots showing the optimizer behavior are included in the supplementary material. 6.3 Parallel hyperparameter optimization for deep residual networks 0 100000 200000 300000 400000 Runtime in seconds 5 10 15 20 25 30 Validation Error % ResNet on CIFAR-10 BOHAMIANN DNGO random search 0 50 100 150 200 250 300 350 400 Function evaluations 400 500 600 700 800 900 1000 Function value (episodes to success) BO of deep RL algorithm (DDPG on CartPole) BOHAMIANN DNGO Figure 2: (Left) DNGO vs.BOHAMIANN for optimizing the 8 hyperparameters of a deep residual network on CIFAR-10; we plotted each function evaluation performed over time, as well as the current best; parallel random search is included as an additional baseline. (Right) DNGO vs. BOHAMIANN for optimizing the 12 hyperparameters of an RL agent. Next, we optimized the hyperparameters of the recently proposed residual network (ResNet) architecture [28] for classification of CIFAR-10. We adopted a general parameterization of this architecture, tuning both the parameters of the stochastic gradient descent training as well as key architectural choices (such as the dimensionality reduction strategy used between residual blocks). We kept the maximum number of parameters fixed at the number used by the 32 layer ResNet [28]. Training a single ResNet took up to 6 hours in our experiments and we therefore used the parallel BO procedure described in Section 1 of the supplementary material (evaluating 8 ResNet configurations in parallel, for all of DNGO, random search, and BOHAMIANN). Interestingly, all methods quickly found good configurations of the hyperparameters as shown in Figure 2(left), with BOHAMIANN reaching the validation performance of the manually-tuned baseline ResNet after 104 function evaluations (or approximately 27 hours of total training time). When re-training this model on the full dataset it obtained a classification error of 7.40 % ± 0.3, matching the performance of the hand-tuned version from He et al. [28] (7.51 %). Perhaps surprisingly, this result was reached with a different architecture than the one presented in He et al. [28]: (1) it used max-pooling instead of strided convolutions for the spatial dimensionality reduction; (2) approximately 50% of the weights in all residual blocks were shared (thus reducing the number of parameters). 7 0 100 200 300 400 500 600 700 Collected episodes −9 −8 −7 −6 −5 −4 −3 −2 −1 0 Reward DDGP on Cartpole DDPG (optimized) DDPG (original) Figure 3: Learning curve for DDPG on the Cartpole benchmark. We compare the original hyperparameter settings to an optimized version of DDPG. The plot shows the cumulative reward (over 100 test episodes) obtained by the DDPG algorithm after it obtained x episodes of data for training. Table 2: Comparison between the original DDPG algorithm and a version optimized using BOHAMIANN on two control tasks. We show the number of episodes required to obtain successful performance in 10 consecutive test episodes (reward above -2 for CartPole, above -6 for reaching) and the maximum reward achieved by the controller. Cartpole Reward Episodes DDPG -1.18 470 DDPG + DNGO -1.39 507 DDPG + BOHAMIANN -1.46 405 2-link reaching task Reward Episodes DDPG -4.36 1512 DDPG + DNGO -4.39 1642 DDPG + BOHAMIANN -4.57 1102 6.4 Hyperparameter optimization for deep reinforcement learning Finally, we optimized a neural reinforcement learning (RL) algorithm on two control tasks: the Cartpole swing-up task and a two link robot arm reaching task. We used a re-implementation of the DDPG algorithm by Lillicrap et al. [29] and aimed to minimize the interaction time with the simulated system required to achieve stable performance (defined as: solving the task in 10 consecutive test episodes). This is a critical performance metric for data-efficient RL. The results of this experiment are given in Table 2 . While the original DDPG hyperparameters were set to achieve robust performance on a large set of benchmarks (and out-of-the-box DDPG performed remarkably well on the considered problems) our experiments indicate that the number of samples required to achieve good performance can be substantially reduced for individual tasks by hyperparameter optimization with BOHAMIANN. In contrast, DNGO did not perform as well on this specific task, getting stuck during optimization, see Figure 2 (right). A comparison between the learning curves of the original and the optimized DDPG, depicted in Figure 3, confirms this observation. The parameters that had the most influence on this improved performance were (perhaps unsurprisingly) the learning-rates of the Q-and policy networks and the number of SGD steps performed between collected episodes. This observation was already used by domain experts in a recent paper by Gu et al. [30] where they used 5 updates per sample (the hyperparameters found by our method correspond to 10 updates per sample). 7 Conclusion We proposed BOHAMIANN, a scalable and flexible Bayesian optimization method. It natively supports multi-task optimization as well as parallel function evaluations, and scales to high dimensions and many function evaluations. At its heart lies Bayesian inference for neural networks via stochastic gradient Hamiltonian Monte Carlo, and we improved the robustness thereof by means of a scale adaptation technique. In future work, we plan to implement Freeze-Thaw Bayesian optimization [31] and Bayesian optimization across dataset sizes [32] in our framework, since both of these generate many cheap function evaluations and thus reach the scalability limit of GPs. We thereby expect substantial speedups in the practical hyperparameter optimization for ML algorithms on big datasets. Acknowledgements This work has partly been supported by the European Commission under Grant no. H2020-ICT645403-ROBDREAM, 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 BrainLinks-BrainTools Cluster of Excellence (grant number EXC 1086). 8 References [1] J. Snoek, H. Larochelle, and R. P. Adams. Practical Bayesian optimization of machine learning algorithms. In Proc. of NIPS’12, 2012. [2] 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 BayesOpt’13, 2013. [3] F. Hutter, H. Hoos, and K. Leyton-Brown. Sequential model-based optimization for general algorithm configuration. In LION’11, 2011. [4] J. Bergstra, R. Bardenet, Y. Bengio, and B. Kégl. Algorithms for hyper-parameter optimization. In Proc. of NIPS’11, 2011. [5] J. Snoek, O. Rippel, K. Swersky, R. Kiros, N. Satish, N. Sundaram, M. M. A. Patwary, Prabhat, and R. P. Adams. Scalable Bayesian optimization using deep neural networks. In Proc. of ICML’15, 2015. [6] T. Chen, E.B. Fox, and C. Guestrin. Stochastic gradient Hamiltonian Monte Carlo. In Proc. of ICML’14, 2014. [7] 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, 2010. [8] K. Swersky, J. Snoek, and R. Adams. Multi-task Bayesian optimization. In Proc. of NIPS’13, 2013. [9] D. Jones, M. Schonlau, and W. Welch. Efficient global optimization of expensive black box functions. JGO, 1998. [10] N. Srinivas, A. Krause, S. Kakade, and M. Seeger. Gaussian process optimization in the bandit setting: No regret and experimental design. In Proc. of ICML’10, 2010. [11] Radford M. Neal. Bayesian learning for neural networks. PhD thesis, University of Toronto, 1996. [12] A. Graves. Practical variational inference for neural networks. In Proc. of ICML’11, 2011. [13] C. Blundell, J. Cornebise, K. Kavukcuoglu, and D. Wierstra. Weight uncertainty in neural networks. In Proc. of ICML’15, 2015. [14] J. M. Hernández-Lobato and R. Adams. Probabilistic backpropagation for scalable learning of Bayesian neural networks. In Proc. of ICML’15, 2015. [15] Y. Gal and Z. Ghahramani. Dropout as a Bayesian approximation: Representing model uncertainty in deep learning. arXiv:1506.02142, 2015. [16] D. P. Kingma, T. Salimans, and M. Welling. Variational dropout and the local reparameterization trick. In Proc. of NIPS’15, 2015. [17] A. Korattikara, V. Rathod, K. P. Murphy, and M. Welling. Bayesian dark knowledge. In Proc. of NIPS’15. 2015. [18] S. Duane, A. D. Kennedy, Brian J. Pendleton, and D. Roweth. Hybrid monte carlo. Phys. Lett. B, 1987. [19] M. Girolami and B. Calderhead. Riemann manifold langevin and hamiltonian monte carlo methods. Journal of the Royal Statistical Society Series B - Statistical Methodology, 2011. [20] Y. Ma, T. Chen, and E.B. Fox. A complete recipe for stochastic gradient MCMC. In Proc. of NIPS’15, 2015. [21] Chunyuan Li, Changyou Chen, David E. Carlson, and Lawrence Carin. Preconditioned stochastic gradient langevin dynamics for deep neural networks. In Proc. of AAAI’16, 2016. [22] Changyou Chen, David E. Carlson, Zhe Gan, Chunyuan Li, and Lawrence Carin. Bridging the gap between stochastic gradient MCMC and stochastic optimization. In Proc. of AISTATS, 2016. [23] T. Tieleman and G. Hinton. RmsProp: Divide the gradient by a running average of its recent magnitude. In COURSERA: Neural Networks for Machine Learning. 2012. [24] J.C. Duchi, E. Hazan, and Y. Singer. Adaptive subgradient methods for online learning and stochastic optimization. Journal of Machine Learning Research, 2011. [25] T. Schaul, S. Zhang, and Y. LeCun. No More Pesky Learning Rates. In Proc. of ICML’13, 2013. [26] J. Vanschoren, J. van Rijn, B. Bischl, and L. Torgo. OpenML: Networked science in machine learning. SIGKDD Explor. Newsl., (2), June 2014. [27] M. Feurer, T. Springenberg, and F. Hutter. Initializing Bayesian hyperparameter optimization via metalearning. In Proc. of AAAI’15, 2015. [28] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In Proc. of CVPR’16, 2016. [29] 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. In Proc. of ICLR, 2016. [30] S. Gu, T. P. Lillicrap, I. Sutskever, and S. Levine. Continuous deep q-learning with model-based acceleration. In Proc. of ICML, 2016. [31] K. Swersky, J. Snoek, and R. Adams. Freeze-thaw Bayesian optimization. CoRR, 2014. [32] A. Klein, S. Falkner, S. Bartels, P. Hennig, and F. Hutter. Fast bayesian optimization of machine learning hyperparameters on large datasets. CoRR, 2016. 9 | 2016 | 390 |
6,317 | Statistical Inference for Cluster Trees Jisu Kim Department of Statistics Carnegie Mellon University Pittsburgh, USA jisuk1@andrew.cmu.edu Yen-Chi Chen Department of Statistics University of Washington Seattle, USA yenchic@uw.edu Sivaraman Balakrishnan Department of Statistics Carnegie Mellon University Pittsburgh, USA siva@stat.cmu.edu Alessandro Rinaldo Department of Statistics Carnegie Mellon University Pittsburgh, USA arinaldo@stat.cmu.edu Larry Wasserman Department of Statistics Carnegie Mellon University Pittsburgh, USA larry@stat.cmu.edu Abstract A cluster tree provides a highly-interpretable summary of a density function by representing the hierarchy of its high-density clusters. It is estimated using the empirical tree, which is the cluster tree constructed from a density estimator. This paper addresses the basic question of quantifying our uncertainty by assessing the statistical significance of topological features of an empirical cluster tree. We first study a variety of metrics that can be used to compare different trees, analyze their properties and assess their suitability for inference. We then propose methods to construct and summarize confidence sets for the unknown true cluster tree. We introduce a partial ordering on cluster trees which we use to prune some of the statistically insignificant features of the empirical tree, yielding interpretable and parsimonious cluster trees. Finally, we illustrate the proposed methods on a variety of synthetic examples and furthermore demonstrate their utility in the analysis of a Graft-versus-Host Disease (GvHD) data set. 1 Introduction Clustering is a central problem in the analysis and exploration of data. It is a broad topic, with several existing distinct formulations, objectives, and methods. Despite the extensive literature on the topic, a common aspect of the clustering methodologies that has hindered its widespread scientific adoption is the dearth of methods for statistical inference in the context of clustering. Methods for inference broadly allow us to quantify our uncertainty, to discern “true” clusters from finite-sample artifacts, as well as to rigorously test hypotheses related to the estimated cluster structure. In this paper, we study statistical inference for the cluster tree of an unknown density. We assume that we observe an i.i.d. sample {X1, . . . , Xn} from a distribution P0 with unknown density p0. Here, Xi ∈X ⊂Rd. The connected components C(λ), of the upper level set {x : p0(x) ≥λ}, are called high-density clusters. The set of high-density clusters forms a nested hierarchy which is referred to as the cluster tree1 of p0, which we denote as Tp0. Methods for density clustering fall broadly in the space of hierarchical clustering algorithms, and inherit several of their advantages: they allow for extremely general cluster shapes and sizes, and in general do not require the pre-specification of the number of clusters. Furthermore, unlike flat 1It is also referred to as the density tree or the level-set tree. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. clustering methods, hierarchical methods are able to provide a multi-resolution summary of the underlying density. The cluster tree, irrespective of the dimensionality of the input random variable, is displayed as a two-dimensional object and this makes it an ideal tool to visualize data. In the context of statistical inference, density clustering has another important advantage over other clustering methods: the object of inference, the cluster tree of the unknown density p0, is clearly specified. In practice, the cluster tree is estimated from a finite sample, {X1, . . . , Xn} ∼p0. In a scientific application, we are often most interested in reliably distinguishing topological features genuinely present in the cluster tree of the unknown p0, from topological features that arise due to random fluctuations in the finite sample {X1, . . . , Xn}. In this paper, we focus our inference on the cluster tree of the kernel density estimator, Tbph, where bph is the kernel density estimator, bph(x) = 1 nhd n X i=1 K ∥x −Xi∥ h , (1) where K is a kernel and h is an appropriately chosen bandwidth 2. To develop methods for statistical inference on cluster trees, we construct a confidence set for Tp0, i.e. a collection of trees that will include Tp0 with some (pre-specified) probability. A confidence set can be converted to a hypothesis test, and a confidence set shows both statistical and scientific significances while a hypothesis test can only show statistical significances [23, p.155]. To construct and understand the confidence set, we need to solve a few technical and conceptual issues. The first issue is that we need a metric on trees, in order to quantify the collection of trees that are in some sense “close enough” to Tbph to be statistically indistinguishable from it. We use the bootstrap to construct tight data-driven confidence sets. However, only some metrics are sufficiently “regular” to be amenable to bootstrap inference, which guides our choice of a suitable metric on trees. On the basis of a finite sample, the true density is indistinguishable from a density with additional infinitesimal perturbations. This leads to the second technical issue which is that our confidence set invariably contains infinitely complex trees. Inspired by the idea of one-sided inference [9], we propose a partial ordering on the set of all density trees to define simple trees. To find simple representative trees in the confidence set, we prune the empirical cluster tree by removing statistically insignificant features. These pruned trees are valid with statistical guarantees that are simpler than the empirical cluster tree in the proposed partial ordering. Our contributions: We begin by considering a variety of metrics on trees, studying their properties and discussing their suitability for inference. We then propose a method of constructing confidence sets and for visualizing trees in this set. This distinguishes aspects of the estimated tree correspond to real features (those present in the cluster tree Tp0) from noise features. Finally, we apply our methods to several simulations, and a Graft-versus-Host Disease (GvHD) data set to demonstrate the usefulness of our techniques and the role of statistical inference in clustering problems. Related work: There is a vast literature on density trees (see for instance the book by Klemelä [16]), and we focus our review on works most closely aligned with our paper. The formal definition of the cluster tree, and notions of consistency in estimation of the cluster tree date back to the work of Hartigan [15]. Hartigan studied the efficacy of single-linkage in estimating the cluster tree and showed that single-linkage is inconsistent when the input dimension d > 1. Several fixes to single-linkage have since been proposed (see for instance [21]). The paper of Chaudhuri and Dasgupta [4] provided the first rigorous minimax analysis of the density clustering and provided a computationally tractable, consistent estimator of the cluster tree. The papers [1, 5, 12, 17] propose various modifications and analyses of estimators for the cluster tree. While the question of estimation has been extensively addressed, to our knowledge our paper is the first concerning inference for the cluster tree. There is a literature on inference for phylogenetic trees (see the papers [13, 10]), but the object of inference and the hypothesized generative models are typically quite different. Finally, in our paper, we also consider various metrics on trees. There are several recent works, in the computational topology literature, that have considered different metrics on trees. The most relevant to our own work, are the papers [2, 18] that propose the functional distortion metric and the interleaving distance on trees. These metrics, however, are NP-hard to compute in general. In Section 3, we consider a variety of computationally tractable metrics and assess their suitability for inference. 2We address computing the tree Tbph, and the choice of bandwidth in more detail in what follows. 2 p(x) x p(x) x Figure 1: Examples of density trees. Black curves are the original density functions and the red trees are the associated density trees. 2 Background and Definitions We work with densities defined on a subset X ⊂Rd, and denote by ∥.∥the Euclidean norm on X. Throughout this paper we restrict our attention to cluster tree estimators that are specified in terms of a function f : X 7→[0, ∞), i.e. we have the following definition: Definition 1. For any f : X 7→[0, ∞) the cluster tree of f is a function Tf : R 7→2X , where 2X is the set of all subsets of X, and Tf(λ) is the set of the connected components of the upper-level set {x ∈X : f(x) ≥λ}. We define the collection of connected components {Tf}, as {Tf} = S λ Tf(λ). As will be clearer in what follows, working only with cluster trees defined via a function f simplifies our search for metrics on trees, allowing us to use metrics specified in terms of the function f. With a slight abuse of notation, we will use Tf to denote also {Tf}, and write C ∈Tf to signify C ∈{Tf}. The cluster tree Tf indeed has a tree structure, since for every pair C1, C2 ∈Tf, either C1 ⊂C2, C2 ⊂C1, or C1 ∩C2 = ∅holds. See Figure 1 for a graphical illustration of a cluster tree. The formal definition of the tree requires some topological theory; these details are in Appendix B. In the context of hierarchical clustering, we are often interested in the “height” at which two points or two clusters merge in the clustering. We introduce the merge height from [12, Definition 6]: Definition 2. For any two points x, y ∈X, any f : X 7→[0, ∞), and its tree Tf, their merge height mf(x, y) is defined as the largest λ such that x and y are in the same density cluster at level λ, i.e. mf(x, y) = sup {λ ∈R : there exists C ∈Tf(λ) such that x, y ∈C} . We refer to the function mf : X × X 7→R as the merge height function. For any two clusters C1, C2 ∈{Tf}, their merge height mf(C1, C2) is defined analogously, mf(C1, C2) = sup {λ ∈R : there exists C ∈Tf(λ) such that C1, C2 ⊂C} . One of the contributions of this paper is to construct valid confidence sets for the unknown true tree and to develop methods for visualizing the trees contained in this confidence set. Formally, we assume that we have samples {X1, . . . , Xn} from a distribution P0 with density p0. Definition 3. An asymptotic (1 −α) confidence set, Cα, is a collection of trees with the property that P0(Tp0 ∈Cα) = 1 −α + o(1). We also provide non-asymptotic upper bounds on the o(1) term in the above definition. Additionally, we provide methods to summarize the confidence set above. In order to summarize the confidence set, we define a partial ordering on trees. Definition 4. For any f, g : X 7→[0, ∞) and their trees Tf, Tg, we say Tf ⪯Tg if there exists a map Φ : {Tf} →{Tg} such that for any C1, C2 ∈Tf, we have C1 ⊂C2 if and only if Φ(C1) ⊂Φ(C2). With Definition 3 and 4, we describe the confidence set succinctly via some of the simplest trees in the confidence set in Section 4. Intuitively, these are trees without statistically insignificant splits. It is easy to check that the partial order ⪯in Definition 4 is reflexive (i.e. Tf ⪯Tf) and transitive (i.e. that Tf1 ⪯Tf2 and Tf2 ⪯Tf3 implies Tf1 ⪯Tf3). However, to argue that ⪯is a partial order, we need to show the antisymmetry, i.e. Tf ⪯Tg and Tg ⪯Tf implies that Tf and Tg are equivalent in some sense. In Appendices A and B, we show an important result: for an appropriate topology on trees, Tf ⪯Tg and Tg ⪯Tf implies that Tf and Tf are topologically equivalent. 3 x Tp (a) x Tp (b) x Tp (c) x Tq (d) x Tq (e) x Tq (f) Figure 2: Three illustrations of the partial order ⪯in Definition 4. In each case, in agreement with our intuitive notion of simplicity, the tree on the top ((a), (b), and (c)) is lower than the corresponding tree on the bottom((d), (e), and (f)) in the partial order, i.e. for each example Tp ⪯Tq. The partial order ⪯in Definition 4 matches intuitive notions of the complexity of the tree for several reasons (see Figure 2). Firstly, Tf ⪯Tg implies (number of edges of Tf) ≤(number of edges of Tg) (compare Figure 2(a) and (d), and see Lemma 6 in Appendix B). Secondly, if Tg is obtained from Tf by adding edges, then Tf ⪯Tg (compare Figure 2(b) and (e), and see Lemma 7 in Appendix B). Finally, the existence of a topology preserving embedding from {Tf} to {Tg} implies the relationship Tf ⪯Tg (compare Figure 2(c) and (f), and see Lemma 8 in Appendix B). 3 Tree Metrics In this section, we introduce some natural metrics on cluster trees and study some of their properties that determine their suitability for statistical inference. We let p, q : X →[0, ∞) be nonnegative functions and let Tp and Tq be the corresponding trees. 3.1 Metrics We consider three metrics on cluster trees, the first is the standard ℓ∞metric, while the second and third are metrics that appear in the work of Eldridge et al. [12]. ℓ∞metric: The simplest metric is d∞(Tp, Tq) = ∥p−q∥∞= supx∈X |p(x)−q(x)|. We will show in what follows that, in the context of statistical inference, this metric has several advantages over other metrics. Merge distortion metric: The merge distortion metric intuitively measures the discrepancy in the merge height functions of two trees in Definition 2. We consider the merge distortion metric [12, Definition 11] defined by dM(Tp, Tq) = sup x,y∈X |mp(x, y) −mq(x, y)|. The merge distortion metric we consider is a special case of the metric introduced by Eldridge et al. [12]3. The merge distortion metric was introduced by Eldridge et al. [12] to study the convergence of cluster tree estimators. They establish several interesting properties of the merge distortion metric: in particular, the metric is stable to perturbations in ℓ∞, and further, that convergence in the merge distortion metric strengthens previous notions of convergence of the cluster trees. Modified merge distortion metric: We also consider the modified merge distortion metric given by dMM(Tp, Tq) = sup x,y∈X |dTp(x, y) −dTq(x, y)|, where dTp(x, y) = p(x) + p(y) −2mp(x, y), which corresponds to the (pseudo)-distance between x and y along the tree. The metric dMM is used in various proofs in the work of Eldridge et al. [12]. 3They further allow flexibility in taking a sup over a subset of X. 4 It is sensitive to both distortions of the merge heights in Definition 2, as well as of the underlying densities. Since the metric captures the distortion of distances between points along the tree, it is in some sense most closely aligned with the cluster tree. Finally, it is worth noting that unlike the interleaving distance and the functional distortion metric [2, 18], the three metrics we consider in this paper are quite simple to approximate to a high-precision. 3.2 Properties of the Metrics The following Lemma gives some basic relationships between the three metrics d∞, dM and dMM. We define pinf = infx∈X p(x), and qinf analogously, and a = infx∈X {p(x) + q(x)} −2 min{pinf, qinf}. Note that when the Lebesgue measure µ(X) is infinite, then pinf = qinf = a = 0. Lemma 1. For any densities p and q, the following relationships hold: (i) When p and q are continuous, then d∞(Tp, Tq) = dM(Tp, Tq). (ii) dMM(Tp, Tq) ≤4d∞(Tp, Tq). (iii) dMM(Tp, Tq) ≥ d∞(Tp, Tq) −a, where a is defined as above. Additionally when µ(X) = ∞, then dMM(Tp, Tq) ≥ d∞(Tp, Tq). The proof is in Appendix F. From Lemma 1, we can see that under a mild assumption (continuity of the densities), d∞and dM are equivalent. We note again that the work of Eldridge et al. [12] actually defines a family of merge distortion metrics, while we restrict our attention to a canonical one. We can also see from Lemma 1 that while the modified merge metric is not equivalent to d∞, it is usually multiplicatively sandwiched by d∞. Our next line of investigation is aimed at assessing the suitability of the three metrics for the task of statistical inference. Given the strong equivalence of d∞and dM we focus our attention on d∞ and dMM. Based on prior work (see [7, 8]), the large sample behavior of d∞is well understood. In particular, d∞(Tbph, Tp0) converges to the supremum of an appropriate Gaussian process, on the basis of which we can construct confidence intervals for the d∞metric. The situation for the metric dMM is substantially more subtle. One of our eventual goals is to use the non-parametric bootstrap to construct valid estimates of the confidence set. In general, a way to assess the amenability of a functional to the bootstrap is via Hadamard differentiability [24]. Roughly speaking, Hadamard-differentiability is a type of statistical stability, that ensures that the functional under consideration is stable to perturbations in the input distribution. In Appendix C, we formally define Hadamard differentiability and prove that dMM is not point-wise Hadamard differentiable. This does not completely rule out the possibility of finding a way to construct confidence sets based on dMM, but doing so would be difficult and so far we know of no way to do it. In summary, based on computational considerations we eliminate the interleaving distance and the functional distortion metric [2, 18], we eliminate the dMM metric based on its unsuitability for statistical inference and focus the rest of our paper on the d∞(or equivalently dM) metric which is both computationally tractable and has well understood statistical behavior. 4 Confidence Sets In this section, we consider the construction of valid confidence intervals centered around the kernel density estimator, defined in Equation (1). We first observe that a fixed bandwidth for the KDE gives a dimension-free rate of convergence for estimating a cluster tree. For estimating a density in high dimensions, the KDE has a poor rate of convergence, due to a decreasing bandwidth for simultaneously optimizing the bias and the variance of the KDE. When estimating a cluster tree, the bias of the KDE does not affect its cluster tree. Intuitively, the cluster tree is a shape characteristic of a function, which is not affected by the bias. Defining the biased density, ph(x) = E[bph(x)], two cluster trees from ph and the true density p0 are equivalent with respect to the topology in Appendix A, if h is small enough and p0 is regular enough: Lemma 2. Suppose that the true unknown density p0, has no non-degenerate critical points 4, then there exists a constant h0 > 0 such that for all 0 < h ≤h0, the two cluster trees, Tp0 and Tph have the same topology in Appendix A. 4The Hessian of p0 at every critical point is non-degenerate. Such functions are known as Morse functions. 5 From Lemma 2, proved in Appendix G, a fixed bandwidth for the KDE can be applied to give a dimension-free rate of convergence for estimating the cluster tree. Instead of decreasing bandwidth h and inferring the cluster tree of the true density Tp0 at rate OP (n−2/(4+d)), Lemma 2 implies that we can fix h > 0 and infer the cluster tree of the biased density Tph at rate OP (n−1/2) independently of the dimension. Hence a fixed bandwidth crucially enhances the convergence rate of the proposed methods in high-dimensional settings. 4.1 A data-driven confidence set We recall that we base our inference on the d∞metric, and we recall the definition of a valid confidence set (see Definition 3). As a conceptual first step, suppose that for a specified value α we could compute the 1 −α quantile of the distribution of d∞(Tbph, Tph), and denote this value tα. Then a valid confidence set for the unknown Tph is Cα = {T : d∞(T, Tbph) ≤tα}. To estimate tα, we use the bootstrap. Specifically, we generate B bootstrap samples, { e X1 1, · · · , e X1 n}, . . . , { e XB 1 , · · · , e XB n }, by sampling with replacement from the original sample. On each bootstrap sample, we compute the KDE, and the associated cluster tree. We denote the cluster trees { eT 1 ph, . . . , eT B ph}. Finally, we estimate tα by btα = bF −1(1 −α), where bF(s) = 1 B n X i=1 I(d∞( eT i ph, Tbph) < s). Then the data-driven confidence set is bCα = {T : d∞(T, bTh) ≤btα}. Using techniques from [8, 7], the following can be shown (proof omitted): Theorem 3. Under mild regularity conditions on the kernel5, we have that the constructed confidence set is asymptotically valid and satisfies, P Th ∈bCα = 1 −α + O log7 n nhd 1/6 . Hence our data-driven confidence set is consistent at dimension independent rate. When h is a fixed small constant, Lemma 2 implies that Tp0 and Tph have the same topology, and Theorem 3 guarantees that the non-parametric bootstrap is consistent at a dimension independent O(((log n)7/n)1/6) rate. For reasons explained in [8], this rate is believed to be optimal. 4.2 Probing the Confidence Set The confidence set bCα is an infinite set with a complex structure. Infinitesimal perturbations of the density estimate are in our confidence set and so this set contains very complex trees. One way to understand the structure of the confidence set is to focus attention on simple trees in the confidence set. Intuitively, these trees only contain topological features (splits and branches) that are sufficiently strongly supported by the data. We propose two pruning schemes to find trees, that are simpler than the empirical tree Tbph that are in the confidence set. Pruning the empirical tree aids visualization as well as de-noises the empirical tree by eliminating some features that arise solely due to the stochastic variability of the finite-sample. The algorithms are (see Figure 3): 1. Pruning only leaves: Remove all leaves of length less than 2btα (Figure 3(b)). 2. Pruning leaves and internal branches: In this case, we first prune the leaves as above. This yields a new tree. Now we again prune (using cumulative length) any leaf of length less than 2btα. We continue iteratively until all remaining leaves are of cumulative length larger than 2btα (Figure 3(c)). In Appendix D.2 we formally define the pruning operation and show the following. The remaining tree eT after either of the above pruning operations satisfies: (i) eT ⪯Tbph, (ii) there exists a function f whose tree is eT, and (iii) eT ∈bCα (see Lemma 10 in Appendix D.2). In other words, we identified a valid tree with a statistical guarantee that is simpler than the original estimate Tbph. Intuitively, some of the statistically insignificant features have been removed from Tbph. We should point out, however, 5See Appendix D.1 for details. 6 (a) The empirical tree. (b) Pruning only leaves. L1 L2 L3 L4 L5 L6 E1 E2 E3 E5 E4 (c) Pruning leaves and branches. Figure 3: Illustrations of our two pruning strategies. (a) shows the empirical tree. In (b), leaves that are insignificant are pruned, while in (c), insignificant internal branches are further pruned top-down. (a) (b) (c) Ring data, alpha = 0.05 lambda 0.0 0.2 0.4 0.6 0.8 1.0 0 0.208 0.272 0.529 − − (d) Mickey mouse data, alpha = 0.05 lambda 0.0 0.2 0.4 0.6 0.8 1.0 0 0.255 0.291 − − (e) Yingyang data, alpha = 0.05 lambda 0.0 0.2 0.4 0.6 0.8 1.0 0 0.035 0.044 0.052 0.07 − − (f) Figure 4: Simulation examples. (a) and (d) are the ring data; (b) and (e) are the mickey mouse data; (c) and (f) are the yingyang data. The solid lines are the pruned trees; the dashed lines are leaves (and edges) removed by the pruning procedure. A bar of length 2btα is at the top right corner. The pruned trees recover the actual structure of connected components. that there may exist other trees that are simpler than Tbph that are in bCα. Ideally, we would like to have an algorithm that identifies all trees in the confidence set that are minimal with respect to the partial order ⪯in Definition 4. This is an open question that we will address in future work. 5 Experiments In this section, we demonstrate the techniques we have developed for inference on synthetic data, as well as on a real dataset. 5.1 Simulated data We consider three simulations: the ring data (Figure 4(a) and (d)), the Mickey Mouse data (Figure 4(b) and (e)), and the yingyang data (Figure 4(c) and (f)). The smoothing bandwidth is chosen by the Silverman reference rule [20] and we pick the significance level α = 0.05. 7 0.0 0.2 0.4 0.6 0.8 1.0 0e+00 2e−10 4e−10 6e−10 8e−10 − − (a) The positive treatment data. 0.0 0.2 0.4 0.6 0.8 1.0 0e+00 1e−10 2e−10 3e−10 4e−10 − − (b) The control data. Figure 5: The GvHD data. The solid brown lines are the remaining branches after pruning; the blue dashed lines are the pruned leaves (or edges). A bar of length 2btα is at the top right corner. Example 1: The ring data. (Figure 4(a) and (d)) The ring data consists of two structures: an outer ring and a center node. The outer circle consists of 1000 points and the central node contains 200 points. To construct the tree, we used h = 0.202. Example 2: The Mickey Mouse data. (Figure 4(b) and (e)) The Mickey Mouse data has three components: the top left and right uniform circle (400 points each) and the center circle (1200 points). In this case, we select h = 0.200. Example 3: The yingyang data. (Figure 4(c) and (f)) This data has 5 connected components: outer ring (2000 points), the two moon-shape regions (400 points each), and the two nodes (200 points each). We choose h = 0.385. Figure 4 shows those data ((a), (b), and (c)) along with the pruned density trees (solid parts in (d), (e), and (f)). Before pruning the tree (both solid and dashed parts), there are more leaves than the actual number of connected components. But after pruning (only the solid parts), every leaf corresponds to an actual connected component. This demonstrates the power of a good pruning procedure. 5.2 GvHD dataset Now we apply our method to the GvHD (Graft-versus-Host Disease) dataset [3]. GvHD is a complication that may occur when transplanting bone marrow or stem cells from one subject to another [3]. We obtained the GvHD dataset from R package ‘mclust’. There are two subsamples: the control sample and the positive (treatment) sample. The control sample consists of 9083 observations and the positive sample contains 6809 observations on 4 biomarker measurements (d = 4). By the normal reference rule [20], we pick h = 39.1 for the positive sample and h = 42.2 for the control sample. We set the significance level α = 0.05. Figure 5 shows the density trees in both samples. The solid brown parts are the remaining components of density trees after pruning and the dashed blue parts are the branches removed by pruning. As can be seen, the pruned density tree of the positive sample (Figure 5(a)) is quite different from the pruned tree of the control sample (Figure 5(b)). The density function of the positive sample has fewer bumps (2 significant leaves) than the control sample (3 significant leaves). By comparing the pruned trees, we can see how the two distributions differ from each other. 6 Discussion There are several open questions that we will address in future work. First, it would be useful to have an algorithm that can find all trees in the confidence set that are minimal with respect to the partial order ⪯. These are the simplest trees consistent with the data. Second, we would like to find a way to derive valid confidence sets using the metric dMM which we view as an appealing metric for tree inference. Finally, we have used the Silverman reference rule [20] for choosing the bandwidth but we would like to find a bandwidth selection method that is more targeted to tree inference. 8 References [1] S. Balakrishnan, S. Narayanan, A. Rinaldo, A. Singh, and L. Wasserman. Cluster trees on manifolds. In Advances in Neural Information Processing Systems, 2012. [2] U. Bauer, E. Munch, and Y. Wang. Strong equivalence of the interleaving and functional distortion metrics for reeb graphs. In 31st International Symposium on Computational Geometry (SoCG 2015), volume 34, pages 461–475. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik, 2015. [3] R. R. Brinkman, M. Gasparetto, S.-J. J. Lee, A. J. Ribickas, J. Perkins, W. Janssen, R. Smiley, and C. Smith. High-content flow cytometry and temporal data analysis for defining a cellular signature of graft-versus-host disease. Biology of Blood and Marrow Transplantation, 13(6):691–700, 2007. [4] K. Chaudhuri and S. Dasgupta. Rates of convergence for the cluster tree. In Advances in Neural Information Processing Systems, pages 343–351, 2010. [5] K. Chaudhuri, S. Dasgupta, S. Kpotufe, and U. von Luxburg. Consistent procedures for cluster tree estimation and pruning. IEEE Transactions on Information Theory, 2014. [6] F. Chazal, B. T. Fasy, F. Lecci, B. Michel, A. Rinaldo, and L. Wasserman. Robust topological inference: Distance to a measure and kernel distance. arXiv preprint arXiv:1412.7197, 2014. [7] Y.-C. Chen, C. R. Genovese, and L. Wasserman. Density level sets: Asymptotics, inference, and visualization. arXiv:1504.05438, 2015. [8] V. Chernozhukov, D. Chetverikov, and K. Kato. Central limit theorems and bootstrap in high dimensions. Annals of Probability, 2016. [9] D. Donoho. One-sided inference about functionals of a density. The Annals of Statistics, 16(4):1390–1420, 1988. [10] B. Efron, E. Halloran, and S. Holmes. Bootstrap confidence levels for phylogenetic trees. Proceedings of the National Academy of Sciences, 93(23), 1996. [11] U. Einmahl and D. M. Mason. Uniform in bandwidth consistency of kernel-type function estimators. The Annals of Statistics, 33(3):1380–1403, 2005. [12] J. Eldridge, M. Belkin, and Y. Wang. Beyond hartigan consistency: Merge distortion metric for hierarchical clustering. In Proceedings of The 28th Conference on Learning Theory, pages 588–606, 2015. [13] J. Felsenstein. Confidence limits on phylogenies, a justification. Evolution, 39, 1985. [14] C. R. Genovese, M. Perone-Pacifico, I. Verdinelli, and L. Wasserman. Nonparametric ridge estimation. The Annals of Statistics, 42(4):1511–1545, 2014. [15] J. A. Hartigan. Consistency of single linkage for high-density clusters. Journal of the American Statistical Association, 1981. [16] J. Klemelä. Smoothing of multivariate data: density estimation and visualization, volume 737. John Wiley & Sons, 2009. [17] S. Kpotufe and U. V. Luxburg. Pruning nearest neighbor cluster trees. In Proceedings of the 28th International Conference on Machine Learning (ICML-11), pages 225–232, 2011. [18] D. Morozov, K. Beketayev, and G. Weber. Interleaving distance between merge trees. Discrete and Computational Geometry, 49:22–45, 2013. [19] D. W. Scott. Multivariate density estimation: theory, practice, and visualization. John Wiley & Sons, 2015. [20] B. W. Silverman. Density estimation for statistics and data analysis, volume 26. CRC press, 1986. [21] W. Stuetzle and R. Nugent. A generalized single linkage method for estimating the cluster tree of a density. Journal of Computational and Graphical Statistics, 19(2), 2010. [22] L. Wasserman. All of nonparametric statistics. Springer Science & Business Media, 2006. [23] L. Wasserman. All of Statistics: A Concise Course in Statistical Inference. Springer Science & Business Media, 2010. ISBN 1441923225, 9781441923226. [24] J. Wellner. Weak Convergence and Empirical Processes: With Applications to Statistics. Springer Science & Business Media, 2013. 9 | 2016 | 391 |
6,318 | Combinatorial Multi-Armed Bandit with General Reward Functions Wei Chen∗ Wei Hu† Fu Li‡ Jian Li§ Yu Liu¶ Pinyan Lu∥ Abstract In this paper, we study the stochastic combinatorial multi-armed bandit (CMAB) framework that allows a general nonlinear reward function, whose expected value may not depend only on the means of the input random variables but possibly on the entire distributions of these variables. Our framework enables a much larger class of reward functions such as the max() function and nonlinear utility functions. Existing techniques relying on accurate estimations of the means of random variables, such as the upper confidence bound (UCB) technique, do not work directly on these functions. We propose a new algorithm called stochastically dominant confidence bound (SDCB), which estimates the distributions of underlying random variables and their stochastically dominant confidence bounds. We prove that SDCB can achieve O(log T) distribution-dependent regret and ˜O( √ T) distribution-independent regret, where T is the time horizon. We apply our results to the K-MAX problem and expected utility maximization problems. In particular, for K-MAX, we provide the first polynomial-time approximation scheme (PTAS) for its offline problem, and give the first ˜O( √ T) bound on the (1−ϵ)-approximation regret of its online problem, for any ϵ > 0. 1 Introduction Stochastic multi-armed bandit (MAB) is a classical online learning problem typically specified as a player against m machines or arms. Each arm, when pulled, generates a random reward following an unknown distribution. The task of the player is to select one arm to pull in each round based on the historical rewards she collected, and the goal is to collect cumulative reward over multiple rounds as much as possible. In this paper, unless otherwise specified, we use MAB to refer to stochastic MAB. MAB problem demonstrates the key tradeoff between exploration and exploitation: whether the player should stick to the choice that performs the best so far, or should try some less explored alternatives that may provide better rewards. The performance measure of an MAB strategy is its cumulative regret, which is defined as the difference between the cumulative reward obtained by always playing the arm with the largest expected reward and the cumulative reward achieved by the learning strategy. MAB and its variants have been extensively studied in the literature, with classical results such as tight Θ(log T) distribution-dependent and Θ( √ T) distribution-independent upper and lower bounds on the regret in T rounds [19, 2, 1]. An important extension to the classical MAB problem is combinatorial multi-armed bandit (CMAB). In CMAB, the player selects not just one arm in each round, but a subset of arms or a combinatorial ∗Microsoft Research, email: weic@microsoft.com. The authors are listed in alphabetical order. †Princeton University, email: huwei@cs.princeton.edu. ‡The University of Texas at Austin, email: fuli.theory.research@gmail.com. §Tsinghua University, email: lapordge@gmail.com. ¶Tsinghua University, email: liuyujyyz@gmail.com. ∥Shanghai University of Finance and Economics, email: lu.pinyan@mail.shufe.edu.cn. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. object in general, referred to as a super arm, which collectively provides a random reward to the player. The reward depends on the outcomes from the selected arms. The player may observe partial feedbacks from the selected arms to help her in decision making. CMAB has wide applications in online advertising, online recommendation, wireless routing, dynamic channel allocations, etc., because in all these settings the action unit is a combinatorial object (e.g. a set of advertisements, a set of recommended items, a route in a wireless network, and an allocation between channels and users), and the reward depends on unknown stochastic behaviors (e.g. users’ click through behaviors, wireless transmission quality, etc.). Therefore CMAB has attracted a lot of attention in online learning research in recent years [12, 8, 22, 15, 7, 16, 18, 17, 23, 9]. Most of these studies focus on linear reward functions, for which the expected reward for playing a super arm is a linear combination of the expected outcomes from the constituent base arms. Even for studies that do generalize to non-linear reward functions, they typically still assume that the expected reward for choosing a super arm is a function of the expected outcomes from the constituent base arms in this super arm [8, 17]. However, many natural reward functions do not satisfy this property. For example, for the function max(), which takes a group of variables and outputs the maximum one among them, its expectation depends on the full distributions of the input random variables, not just their means. Function max() and its variants underly many applications. As an illustrative example, we consider the following scenario in auctions: the auctioneer is repeatedly selling an item to m bidders; in each round the auctioneer selects K bidders to bid; each of the K bidders independently draws her bid from her private valuation distribution and submits the bid; the auctioneer uses the first-price auction to determine the winner and collects the largest bid as the payment.1 The goal of the auctioneer is to gain as high cumulative payments as possible. We refer to this problem as the K-MAX bandit problem, which cannot be effectively solved in the existing CMAB framework. Beyond the K-MAX problem, many expected utility maximization (EUM) problems are studied in stochastic optimization literature [27, 20, 21, 4]. The problem can be formulated as maximizing E[u(P i∈S Xi)] among all feasible sets S, where Xi’s are independent random variables and u(·) is a utility function. For example, Xi could be the random delay of edge ei in a routing graph, S is a routing path in the graph, and the objective is maximizing the utility obtained from any routing path, and typically the shorter the delay, the larger the utility. The utility function u(·) is typically nonlinear to model risk-averse or risk-prone behaviors of users (e.g. a concave utility function is often used to model risk-averse behaviors). The non-linear utility function makes the objective function much more complicated: in particular, it is no longer a function of the means of the underlying random variables Xi’s. When the distributions of Xi’s are unknown, we can turn EUM into an online learning problem where the distributions of Xi’s need to be learned over time from online feedbacks, and we want to maximize the cumulative reward in the learning process. Again, this is not covered by the existing CMAB framework since only learning the means of Xi’s is not enough. In this paper, we generalize the existing CMAB framework with semi-bandit feedbacks to handle general reward functions, where the expected reward for playing a super arm may depend more than just the means of the base arms, and the outcome distribution of a base arm can be arbitrary. This generalization is non-trivial, because almost all previous works on CMAB rely on estimating the expected outcomes from base arms, while in our case, we need an estimation method and an analytical tool to deal with the whole distribution, not just its mean. To this end, we turn the problem into estimating the cumulative distribution function (CDF) of each arm’s outcome distribution. We use stochastically dominant confidence bound (SDCB) to obtain a distribution that stochastically dominates the true distribution with high probability, and hence we also name our algorithm SDCB. We are able to show O(log T) distribution-dependent and ˜O( √ T) distribution-independent regret bounds in T rounds. Furthermore, we propose a more efficient algorithm called Lazy-SDCB, which first executes a discretization step and then applies SDCB on the discretized problem. We show that Lazy-SDCB also achieves ˜O( √ T) distribution-independent regret bound. Our regret bounds are tight with respect to their dependencies on T (up to a logarithmic factor for distribution-independent bounds). To make our scheme work, we make a few reasonable assumptions, including boundedness, monotonicity and Lipschitz-continuity2 of the reward function, and independence among base arms. We apply our algorithms to the K-MAX and EUM problems, and provide efficient solutions with concrete regret bounds. Along the way, we also provide the first polynomial time approximation 1We understand that the first-price auction is not truthful, but this example is only for illustrative purpose for the max() function. 2The Lipschitz-continuity assumption is only made for Lazy-SDCB. See Section 4. 2 scheme (PTAS) for the offline K-MAX problem, which is formulated as maximizing E[maxi∈S Xi] subject to a cardinality constraint |S| ≤K, where Xi’s are independent nonnegative random variables. To summarize, our contributions include: (a) generalizing the CMAB framework to allow a general reward function whose expectation may depend on the entire distributions of the input random variables; (b) proposing the SDCB algorithm to achieve efficient learning in this framework with near-optimal regret bounds, even for arbitrary outcome distributions; (c) giving the first PTAS for the offline K-MAX problem. Our general framework treats any offline stochastic optimization algorithm as an oracle, and effectively integrates it into the online learning framework. Related Work. As already mentioned, most relevant to our work are studies on CMAB frameworks, among which [12, 16, 18, 9] focus on linear reward functions while [8, 17] look into non-linear reward functions. In particular, Chen et al. [8] look at general non-linear reward functions and Kveton et al. [17] consider specific non-linear reward functions in a conjunctive or disjunctive form, but both papers require that the expected reward of playing a super arm is determined by the expected outcomes from base arms. The only work in combinatorial bandits we are aware of that does not require the above assumption on the expected reward is [15], which is based on a general Thompson sampling framework. However, they assume that the joint distribution of base arm outcomes is from a known parametric family within known likelihood function and only the parameters are unknown. They also assume the parameter space to be finite. In contrast, our general case is non-parametric, where we allow arbitrary bounded distributions. Although in our known finite support case the distribution can be parametrized by probabilities on all supported points, our parameter space is continuous. Moreover, it is unclear how to efficiently compute posteriors in their algorithm, and their regret bounds depend on complicated problem-dependent coefficients which may be very large for many combinatorial problems. They also provide a result on the K-MAX problem, but they only consider Bernoulli outcomes from base arms, much simpler than our case where general distributions are allowed. There are extensive studies on the classical MAB problem, for which we refer to a survey by Bubeck and Cesa-Bianchi [5]. There are also some studies on adversarial combinatorial bandits, e.g. [26, 6]. Although it bears conceptual similarities with stochastic CMAB, the techniques used are different. Expected utility maximization (EUM) encompasses a large class of stochastic optimization problems and has been well studied (e.g. [27, 20, 21, 4]). To the best of our knowledge, we are the first to study the online learning version of these problems, and we provide a general solution to systematically address all these problems as long as there is an available offline (approximation) algorithm. The K-MAX problem may be traced back to [13], where Goel et al. provide a constant approximation algorithm to a generalized version in which the objective is to choose a subset S of cost at most K and maximize the expectation of a certain knapsack profit. 2 Setup and Notation Problem Formulation. We model a combinatorial multi-armed bandit (CMAB) problem as a tuple (E, F, D, R), where E = [m] = {1, 2, . . . , m} is a set of m (base) arms, F ⊆2E is a set of subsets of E, D is a probability distribution over [0, 1]m, and R is a reward function defined on [0, 1]m × F. The arms produce stochastic outcomes X = (X1, X2, . . . , Xm) drawn from distribution D, where the i-th entry Xi is the outcome from the i-th arm. Each feasible subset of arms S ∈F is called a super arm. Under a realization of outcomes x = (x1, . . . , xm), the player receives a reward R(x, S) when she chooses the super arm S to play. Without loss of generality, we assume the reward value to be nonnegative. Let K = maxS∈F |S| be the maximum size of any super arm. Let X(1), X(2), . . . be an i.i.d. sequence of random vectors drawn from D, where X(t) = (X(t) 1 , . . . , X(t) m ) is the outcome vector generated in the t-th round. In the t-th round, the player chooses a super arm St ∈F to play, and then the outcomes from all arms in St, i.e., {X(t) i | i ∈St}, are revealed to the player. According to the definition of the reward function, the reward value in the t-th round is R(X(t), St). The expected reward for choosing a super arm S in any round is denoted by rD(S) = EX∼D[R(X, S)]. 3 We also assume that for a fixed super arm S ∈F, the reward R(x, S) only depends on the revealed outcomes xS = (xi)i∈S. Therefore, we can alternatively express R(x, S) as RS(xS), where RS is a function defined on [0, 1]S.3 A learning algorithm A for the CMAB problem selects which super arm to play in each round based on the revealed outcomes in all previous rounds. Let SA t be the super arm selected by A in the t-th round.4 The goal is to maximize the expected cumulative reward in T rounds, which is E hPT t=1 R(X(t), SA t ) i = PT t=1 E rD(SA t ) . Note that when the underlying distribution D is known, the optimal algorithm A∗chooses the optimal super arm S∗= argmaxS∈F{rD(S)} in every round. The quality of an algorithm A is measured by its regret in T rounds, which is the difference between the expected cumulative reward of the optimal algorithm A∗and that of A: RegA D(T) = T · rD(S∗) − T X t=1 E rD(SA t ) . For some CMAB problem instances, the optimal super arm S∗may be computationally hard to find even when the distribution D is known, but efficient approximation algorithms may exist, i.e., an α-approximate (0 < α ≤1) solution S′ ∈F which satisfies rD(S′) ≥α · maxS∈F{rD(S)} can be efficiently found given D as input. We will provide the exact formulation of our requirement on such an α-approximation computation oracle shortly. In such cases, it is not fair to compare a CMAB algorithm A with the optimal algorithm A∗which always chooses the optimal super arm S∗. Instead, we define the α-approximation regret of an algorithm A as RegA D,α(T) = T · α · rD(S∗) − T X t=1 E rD(SA t ) . As mentioned, almost all previous work on CMAB requires that the expected reward rD(S) of a super arm S depends only on the expectation vector µ = (µ1, . . . , µm) of outcomes, where µi = EX∼D[Xi]. This is a strong restriction that cannot be satisfied by a general nonlinear function RS and a general distribution D. The main motivation of this work is to remove this restriction. Assumptions. Throughout this paper, we make several assumptions on the outcome distribution D and the reward function R. Assumption 1 (Independent outcomes from arms). The outcomes from all m arms are mutually independent, i.e., for X ∼D, X1, X2, . . . , Xm are mutually independent. We write D as D = D1 × D2 × · · · × Dm, where Di is the distribution of Xi. We remark that the above independence assumption is also made for past studies on the offline EUM and K-MAX problems [27, 20, 21, 4, 13], so it is not an extra assumption for the online learning case. Assumption 2 (Bounded reward value). There exists M > 0 such that for any x ∈[0, 1]m and any S ∈F, we have 0 ≤R(x, S) ≤M. Assumption 3 (Monotone reward function). If two vectors x, x′ ∈[0, 1]m satisfy xi ≤x′ i (∀i ∈[m]), then for any S ∈F, we have R(x, S) ≤R(x′, S). Computation Oracle for Discrete Distributions with Finite Supports. We require that there exists an α-approximation computation oracle (0 < α ≤1) for maximizing rD(S), when each Di (i ∈[m]) has a finite support. In this case, Di can be fully described by a finite set of numbers (i.e., its support {vi,1, vi,2, . . . , vi,si} and the values of its cumulative distribution function (CDF) Fi on the supported points: Fi(vi,j) = PrXi∼Di [Xi ≤vi,j] (j ∈[si])). The oracle takes such a representation of D as input, and can output a super arm S′ = Oracle(D) ∈F such that rD(S′) ≥ α · maxS∈F{rD(S)}. 3 SDCB Algorithm 3[0, 1]S is isomorphic to [0, 1]|S|; the coordinates in [0, 1]S are indexed by elements in S. 4Note that SA t may be random due to the random outcomes in previous rounds and the possible randomness used by A. 4 Algorithm 1 SDCB (Stochastically dominant confidence bound) 1: Throughout the algorithm, for each arm i ∈[m], maintain: (i) a counter Ti which stores the number of times arm i has been played so far, and (ii) the empirical distribution ˆDi of the observed outcomes from arm i so far, which is represented by its CDF ˆFi 2: // Initialization 3: for i = 1 to m do 4: // Action in the i-th round 5: Play a super arm Si that contains arm i 6: Update Tj and ˆFj for each j ∈Si 7: end for 8: for t = m + 1, m + 2, . . . do 9: // Action in the t-th round 10: For each i ∈[m], let Di be a distribution whose CDF Fi is Fi(x) = ( max{ ˆFi(x) − q 3 ln t 2Ti , 0}, 0 ≤x < 1 1, x = 1 11: Play the super arm St ←Oracle(D), where D = D1 × D2 × · · · × Dm 12: Update Tj and ˆFj for each j ∈St 13: end for We present our algorithm stochastically dominant confidence bound (SDCB) in Algorithm 1. Throughout the algorithm, we store, in a variable Ti, the number of times the outcomes from arm i are observed so far. We also maintain the empirical distribution ˆDi of the observed outcomes from arm i so far, which can be represented by its CDF ˆFi: for x ∈[0, 1], the value of ˆFi(x) is just the fraction of the observed outcomes from arm i that are no larger than x. Note that ˆFi is always a step function which has “jumps” at the points that are observed outcomes from arm i. Therefore it suffices to store these discrete points as well as the values of ˆFi at these points in order to store the whole function ˆFi. Similarly, the later computation of stochastically dominant CDF Fi (line 10) only requires computation at these points, and the input to the offline oracle only needs to provide these points and corresponding CDF values (line 11). The algorithm starts with m initialization rounds in which each arm is played at least once5 (lines 2-7). In the t-th round (t > m), the algorithm consists of three steps. First, it calculates for each i ∈[m] a distribution Di whose CDF Fi is obtained by lowering the CDF ˆFi (line 10). The second step is to call the α-approximation oracle with the newly constructed distribution D = D1 ×· · ·×Dm as input (line 11), and thus the super arm St output by the oracle satisfies rD(St) ≥α · maxS∈F{rD(S)}. Finally, the algorithm chooses the super arm St to play, observes the outcomes from all arms in St, and updates Tj’s and ˆFj’s accordingly for each j ∈St. The idea behind our algorithm is the optimism in the face of uncertainty principle, which is the key principle behind UCB-type algorithms. Our algorithm ensures that with high probability we have Fi(x) ≤Fi(x) simultaneously for all i ∈[m] and all x ∈[0, 1], where Fi is the CDF of the outcome distribution Di. This means that each Di has first-order stochastic dominance over Di.6 Then from the monotonicity property of R(x, S) (Assumption 3) we know that rD(S) ≥rD(S) holds for all S ∈F with high probability. Therefore D provides an “optimistic” estimation on the expected reward from each super arm. Regret Bounds. We prove O(log T) distribution-dependent and O(√T log T) distributionindependent upper bounds on the regret of SDCB (Algorithm 1). 5Without loss of generality, we assume that each arm i ∈[m] is contained in at least one super arm. 6We remark that while Fi(x) is a numerical lower confidence bound on Fi(x) for all x ∈[0, 1], at the distribution level, Di serves as a “stochastically dominant (upper) confidence bound” on Di. 5 We call a super arm S bad if rD(S) < α · rD(S∗). For each super arm S, we define ∆S = max{α · rD(S∗) −rD(S), 0}. Let FB = {S ∈F | ∆S > 0}, which is the set of all bad super arms. Let EB ⊆[m] be the set of arms that are contained in at least one bad super arm. For each i ∈EB, we define ∆i,min = min{∆S | S ∈FB, i ∈S}. Recall that M is an upper bound on the reward value (Assumption 2) and K = maxS∈F |S|. Theorem 1. A distribution-dependent upper bound on the α-approximation regret of SDCB (Algorithm 1) in T rounds is M 2K X i∈EB 2136 ∆i,min ln T + π2 3 + 1 αMm, and a distribution-independent upper bound is 93M √ mKT ln T + π2 3 + 1 αMm. The proof of Theorem 1 is given in the supplementary material. The main idea is to reduce our analysis on general reward functions satisfying Assumptions 1-3 to the one in [18] that deals with the summation reward function R(x, S) = P i∈S xi. Our analysis relies on the Dvoretzky-KieferWolfowitz inequality [10, 24], which gives a uniform concentration bound on the empirical CDF of a distribution. Applying Our Algorithm to the Previous CMAB Framework. Although our focus is on general reward functions, we note that when SDCB is applied to the previous CMAB framework where the expected reward depends only on the means of the random variables, it can achieve the same regret bounds as the previous combinatorial upper confidence bound (CUCB) algorithm in [8, 18]. Let µi = EX∼D[Xi] be arm i’s mean outcome. In each round CUCB calculates (for each arm i) an upper confidence bound ¯µi on µi, with the essential property that µi ≤¯µi ≤µi + Λi holds with high probability, for some Λi > 0. In SDCB, we use Di as a stochastically dominant confidence bound of Di. We can show that µi ≤EYi∼Di[Yi] ≤µi + Λi holds with high probability, with the same interval length Λi as in CUCB. (The proof is given in the supplementary material.) Hence, the analysis in [8, 18] can be applied to SDCB, resulting in the same regret bounds.We further remark that in this case we do not need the three assumptions stated in Section 2 (in particular the independence assumption on Xi’s): the summation reward case just works as in [18] and the nonlinear reward case relies on the properties of monotonicity and bounded smoothness used in [8]. 4 Improved SDCB Algorithm by Discretization In Section 3, we have shown that our algorithm SDCB achieves near-optimal regret bounds. However, that algorithm might suffer from large running time and memory usage. Note that, in the t-th round, an arm i might have been observed t −1 times already, and it is possible that all the observed values from arm i are different (e.g., when arm i’s outcome distribution Di is continuous). In such case, it takes Θ(t) space to store the empirical CDF ˆFi of the observed outcomes from arm i, and both calculating the stochastically dominant CDF Fi and updating ˆFi take Θ(t) time. Therefore, the worst-case space usage of SDCB in T rounds is Θ(T), and the worst-case running time is Θ(T 2) (ignoring the dependence on m and K); here we do not count the time and space used by the offline computation oracle. In this section, we propose an improved algorithm Lazy-SDCB which reduces the worst-case memory usage and running time to O( √ T) and O(T 3/2), respectively, while preserving the O(√T log T) distribution-independent regret bound. To this end, we need an additional assumption on the reward function: Assumption 4 (Lipschitz-continuous reward function). There exists C > 0 such that for any S ∈F and any x, x′ ∈[0, 1]m, we have |R(x, S) −R(x′, S)| ≤C∥xS −x′ S∥1, where ∥xS −x′ S∥1 = P i∈S |xi −x′ i|. 6 Algorithm 2 Lazy-SDCB with known time horizon Input: time horizon T 1: s ←⌈ √ T⌉ 2: Ij ← [0, 1 s], j = 1 ( j−1 s , j s], j = 2, . . . , s 3: Invoke SDCB (Algorithm 1) for T rounds, with the following change: whenever observing an outcome x (from any arm), find j ∈[s] such that x ∈Ij, and regard this outcome as j s Algorithm 3 Lazy-SDCB without knowing the time horizon 1: q ←⌈log2 m⌉ 2: In rounds 1, 2, . . . , 2q, invoke Algorithm 2 with input T = 2q 3: for k = q, q + 1, q + 2, . . . do 4: In rounds 2k + 1, 2k + 2, . . . , 2k+1, invoke Algorithm 2 with input T = 2k 5: end for We first describe the algorithm when the time horizon T is known in advance. The algorithm is summarized in Algorithm 2. We perform a discretization on the distribution D = D1 × · · · × Dm to obtain a discrete distribution ˜D = ˜D1 × · · · × ˜Dm such that (i) for ˜X ∼˜D, ˜X1, . . . , ˜Xm are also mutually independent, and (ii) every ˜Di is supported on a set of equally-spaced values { 1 s, 2 s, . . . , 1}, where s is set to be ⌈ √ T⌉. Specifically, we partition [0, 1] into s intervals: I1 = [0, 1 s], I2 = ( 1 s, 2 s], . . . , Is−1 = ( s−2 s , s−1 s ], Is = ( s−1 s , 1], and define ˜ Di as Pr ˜ Xi∼˜ Di [ ˜Xi = j/s] = Pr Xi∼Di [Xi ∈Ij] , j = 1, . . . , s. For the CMAB problem ([m], F, D, R), our algorithm “pretends” that the outcomes are drawn from ˜D instead of D, by replacing any outcome x ∈Ij by j s (∀j ∈[s]), and then applies SDCB to the problem ([m], F, ˜D, R). Since each ˜Di has a known support { 1 s, 2 s, . . . , 1}, the algorithm only needs to maintain the number of occurrences of each support value in order to obtain the empirical CDF of all the observed outcomes from arm i. Therefore, all the operations in a round can be done using O(s) = O( √ T) time and space, and the total time and space used by Lazy-SDCB are O(T 3/2) and O( √ T), respectively. The discretization parameter s in Algorithm 2 depends on the time horizon T, which is why Algorithm 2 has to know T in advance. We can use the doubling trick to avoid the dependency on T. We present such an algorithm (without knowing T) in Algorithm 3. It is easy to see that Algorithm 3 has the same asymptotic time and space usages as Algorithm 2. Regret Bounds. We show that both Algorithm 2 and Algorithm 3 achieve O(√T log T) distribution-independent regret bounds. The full proofs are given in the supplementary material. Recall that C is the coefficient in the Lipschitz condition in Assumption 4. Theorem 2. Suppose the time horizon T is known in advance. Then the α-approximation regret of Algorithm 2 in T rounds is at most 93M √ mKT ln T + 2CK √ T + π2 3 + 1 αMm. Proof Sketch. The regret consists of two parts: (i) the regret for the discretized CMAB problem ([m], F, ˜D, R), and (ii) the error due to discretization. We directly apply Theorem 1 for the first part. For the second part, a key step is to show |rD(S) −r ˜ D(S)| ≤CK/s for all S ∈F (see the supplementary material). Theorem 3. For any time horizon T ≥2, the α-approximation regret of Algorithm 3 in T rounds is at most 318M √ mKT ln T + 7CK √ T + 10αMm ln T. 7 5 Applications We describe the K-MAX problem and the class of expected utility maximization problems as applications of our general CMAB framework. The K-MAX Problem. In this problem, the player is allowed to select at most K arms from the set of m arms in each round, and the reward is the maximum one among the outcomes from the selected arms. In other words, the set of feasible super arms is F = S ⊆[m] |S| ≤K , and the reward function is R(x, S) = maxi∈S xi. It is easy to verify that this reward function satisfies Assumptions 2, 3 and 4 with M = C = 1. Now we consider the corresponding offline K-MAX problem of selecting at most K arms from m independent arms, with the largest expected reward. It can be implied by a result in [14] that finding the exact optimal solution is NP-hard, so we resort to approximation algorithms. We can show, using submodularity, that a simple greedy algorithm can achieve a (1 −1/e)-approximation. Furthermore, we give the first PTAS for this problem. Our PTAS can be generalized to constraints other than the cardinality constraint |S| ≤K, including s-t simple paths, matchings, knapsacks, etc. The algorithms and corresponding proofs are given in the supplementary material. Theorem 4. There exists a PTAS for the offline K-MAX problem. In other words, for any constant ϵ > 0, there is a polynomial-time (1 −ϵ)-approximation algorithm for the offline K-MAX problem. We thus can apply our SDCB algorithm to the K-MAX bandit problem and obtain O(log T) distribution-dependent and ˜O( √ T) distribution-independent regret bounds according to Theorem 1, or can apply Lazy-SDCB to get ˜O( √ T) distribution-independent bound according to Theorem 2 or 3. Streeter and Golovin [26] study an online submodular maximization problem in the oblivious adversary model. In particular, their result can cover the stochastic K-MAX bandit problem as a special case, and an O(K√mT log m) upper bound on the (1 −1/e)-regret can be shown. While the techniques in [26] can only give a bound on the (1 −1/e)-approximation regret for K-MAX, we can obtain the first ˜O( √ T) bound on the (1 −ϵ)-approximation regret for any constant ϵ > 0, using our PTAS as the offline oracle. Even when we use the simple greedy algorithm as the oracle, our experiments show that SDCB performs significantly better than the algorithm in [26] (see the supplementary material). Expected Utility Maximization. Our framework can also be applied to reward functions of the form R(x, S) = u(P i∈S xi), where u(·) is an increasing utility function. The corresponding offline problem is to maximize the expected utility E[u(P i∈S xi)] subject to a feasibility constraint S ∈F. Note that if u is nonlinear, the expected utility may not be a function of the means of the arms in S. Following the celebrated von Neumann-Morgenstern expected utility theorem, nonlinear utility functions have been extensively used to capture risk-averse or risk-prone behaviors in economics (see e.g., [11]), while linear utility functions correspond to risk-neutrality. Li and Deshpande [20] obtain a PTAS for the expected utility maximization (EUM) problem for several classes of utility functions (including for example increasing concave functions which typically indicate risk-averseness), and a large class of feasibility constraints (including cardinality constraint, s-t simple paths, matchings, and knapsacks). Similar results for other utility functions and feasibility constraints can be found in [27, 21, 4]. In the online problem, we can apply our algorithms, using their PTASs as the offline oracle. Again, we can obtain the first tight regret bounds on the (1 −ϵ)-approximation regret for any ϵ > 0, for the class of online EUM problems. Acknowledgments Wei Chen was supported in part by the National Natural Science Foundation of China (Grant No. 61433014). Jian Li and Yu Liu were supported in part by the National Basic Research Program of China grants 2015CB358700, 2011CBA00300, 2011CBA00301, and the National NSFC grants 61033001, 61361136003. The authors would like to thank Tor Lattimore for referring to us the DKW inequality. 8 References [1] Jean-Yves Audibert and Sébastien Bubeck. Minimax policies for adversarial and stochastic bandits. In COLT, pages 217–226, 2009. [2] Peter Auer, Nicolo Cesa-Bianchi, and Paul Fischer. Finite-time analysis of the multiarmed bandit problem. Machine learning, 47(2-3):235–256, 2002. [3] Peter Auer, Nicolo Cesa-Bianchi, Yoav Freund, and Robert E. Schapire. The nonstochastic multiarmed bandit problem. SIAM Journal on Computing, 32(1):48–77, 2002. [4] Anand Bhalgat and Sanjeev Khanna. A utility equivalence theorem for concave functions. In IPCO, pages 126–137. Springer, 2014. [5] Sébastien Bubeck and Nicolò Cesa-Bianchi. Regret analysis of stochastic and nonstochastic multi-armed bandit problems. Foundations and Trends in Machine Learning, 5(1):1–122, 2012. [6] Nicolo Cesa-Bianchi and Gábor Lugosi. Combinatorial bandits. Journal of Computer and System Sciences, 78(5):1404–1422, 2012. [7] Shouyuan Chen, Tian Lin, Irwin King, Michael R. Lyu, and Wei Chen. Combinatorial pure exploration of multi-armed bandits. In NIPS, 2014. [8] Wei Chen, Yajun Wang, Yang Yuan, and Qinshi Wang. Combinatorial multi-armed bandit and its extension to probabilistically triggered arms. Journal of Machine Learning Research, 17(50):1–33, 2016. [9] Richard Combes, M. Sadegh Talebi, Alexandre Proutiere, and Marc Lelarge. Combinatorial bandits revisited. In NIPS, 2015. [10] Aryeh Dvoretzky, Jack Kiefer, and Jacob Wolfowitz. Asymptotic minimax character of the sample distribution function and of the classical multinomial estimator. The Annals of Mathematical Statistics, pages 642–669, 1956. [11] P. C. Fishburn. The foundations of expected utility. Dordrecht: Reidel, 1982. [12] Yi Gai, Bhaskar Krishnamachari, and Rahul Jain. Combinatorial network optimization with unknown variables: Multi-armed bandits with linear rewards and individual observations. IEEE/ACM Transactions on Networking, 20(5):1466–1478, 2012. [13] Ashish Goel, Sudipto Guha, and Kamesh Munagala. Asking the right questions: Model-driven optimization using probes. In PODS, pages 203–212. ACM, 2006. [14] Ashish Goel, Sudipto Guha, and Kamesh Munagala. How to probe for an extreme value. ACM Transactions on Algorithms (TALG), 7(1):12:1–12:20, 2010. [15] Aditya Gopalan, Shie Mannor, and Yishay mansour. Thompson sampling for complex online problems. In ICML, pages 100–108, 2014. [16] Branislav Kveton, Zheng Wen, Azin Ashkan, Hoda Eydgahi, and Brian Eriksson. Matroid bandits: Fast combinatorial optimization with learning. In UAI, pages 420–429, 2014. [17] Branislav Kveton, Zheng Wen, Azin Ashkan, and Csaba Szepesvári. Combinatorial cascading bandits. In NIPS, 2015. [18] Branislav Kveton, Zheng Wen, Azin Ashkan, and Csaba Szepesvári. Tight regret bounds for stochastic combinatorial semi-bandits. In AISTATS, pages 535–543, 2015. [19] Tze Leung Lai and Herbert Robbins. Asymptotically efficient adaptive allocation rules. Advances in applied mathematics, 6(1):4–22, 1985. [20] Jian Li and Amol Deshpande. Maximizing expected utility for stochastic combinatorial optimization problems. In FOCS, pages 797–806, 2011. [21] Jian Li and Wen Yuan. Stochastic combinatorial optimization via poisson approximation. In STOC, pages 971–980, 2013. [22] Tian Lin, Bruno Abrahao, Robert Kleinberg, John Lui, and Wei Chen. Combinatorial partial monitoring game with linear feedback and its applications. In ICML, pages 901–909, 2014. [23] Tian Lin, Jian Li, and Wei Chen. Stochastic online greedy learning with semi-bandit feedbacks. In NIPS, 2015. [24] Pascal Massart. The tight constant in the dvoretzky-kiefer-wolfowitz inequality. The Annals of Probability, pages 1269–1283, 1990. [25] 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. [26] Matthew Streeter and Daniel Golovin. An online algorithm for maximizing submodular functions. In NIPS, 2008. [27] Jiajin Yu and Shabbir Ahmed. Maximizing expected utility over a knapsack constraint. Operations Research Letters, 44(2):180–185, 2016. 9 | 2016 | 392 |
6,319 | Learning Sensor Multiplexing Design through Back-propagation Ayan Chakrabarti Toyota Technological Institute at Chicago 6045 S. Kenwood Ave., Chicago, IL ayanc@ttic.edu Abstract Recent progress on many imaging and vision tasks has been driven by the use of deep feed-forward neural networks, which are trained by propagating gradients of a loss defined on the final output, back through the network up to the first layer that operates directly on the image. We propose back-propagating one step further—to learn camera sensor designs jointly with networks that carry out inference on the images they capture. In this paper, we specifically consider the design and inference problems in a typical color camera—where the sensor is able to measure only one color channel at each pixel location, and computational inference is required to reconstruct a full color image. We learn the camera sensor’s color multiplexing pattern by encoding it as layer whose learnable weights determine which color channel, from among a fixed set, will be measured at each location. These weights are jointly trained with those of a reconstruction network that operates on the corresponding sensor measurements to produce a full color image. Our network achieves significant improvements in accuracy over the traditional Bayer pattern used in most color cameras. It automatically learns to employ a sparse color measurement approach similar to that of a recent design, and moreover, improves upon that design by learning an optimal layout for these measurements. 1 Introduction With the availability of cheap computing power, modern cameras can rely on computational postprocessing to extend their capabilities under the physical constraints of existing sensor technology. Sophisticated techniques, such as those for denoising [3, 28], deblurring [19, 26], etc., are increasingly being used to improve the quality of images and videos that were degraded during acquisition. Moreover, researchers have posited novel sensing strategies that, when combined with post-processing algorithms, are able to produce higher quality and more informative images and videos. For example, coded exposure imaging [18] allows better inversion of motion blur, coded apertures [14, 23] allow passive measurement of scene depth from a single shot, and compressive measurement strategies [1, 8, 25] combined with sparse reconstruction algorithms allow the recovery of visual measurements with higher spatial, spectral, and temporal resolutions. Key to the success of these latter approaches is the co-design of sensing strategies and inference algorithms, where the measurements are designed to provide information complimentary to the known statistical structure of natural scenes. So far, sensor design in this regime has largely been either informed by expert intuition (e.g., [4]), or based on the decision to use a specific image model or inference strategy—e.g., measurements corresponding to random [1], or dictionary-specific [5], projections are a common choice for sparsity-based reconstruction methods. In this paper, we seek to enable a broader data-driven exploration of the joint sensor and inference method space, by learning both sensor design and the computational inference engine end-to-end. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Figure 1: We propose a method to learn the optimal color multiplexing pattern for a camera through joint training with a neural network for reconstruction. (Top) Given C possible color filters that could be placed at each pixel, we parameterize the incident light as a C−channel image. This acts as input to a “sensor layer” that learns to select one of these channel at each pixel. A reconstruction network then processes these measurements to yield a full-color RGB image. We jointly train both for optimal reconstruction quality. (Bottom left) Since the hard selection of individual color channels is not differentiable, we encode these decisions using a Soft-max layer, with a “temperature” parameter α that is increased across iterations. (Bottom right) We use a bifurcated architecture with two paths for the reconstruction network. One path produces K possible values for each color intensity through multiplicative and linear interpolation, and the other weights to combine these into a single estimate. We leverage the successful use of back-propagation and stochastic gradient descent (SGD) [13] in learning deep neural networks for various tasks [12, 16, 20, 24]. These networks process a given input through a complex cascade of layers, and training is able to jointly optimize the parameters of all layers to enable the network to succeed at the final inference task. Treating optical measurement and computational inference as a cascade, we propose using the same approach to learn both jointly. We encode the sensor’s design choices into the learnable parameters of a “sensor layer” which, once trained, can be instantiated by camera optics. This layer’s output is fed to a neural network that carries out inference computationally on the corresponding measurements. Both are then trained jointly. We demonstrate this approach by applying it to the sensor-inference design problem in a standard digital color camera. Since image sensors can physically measure only one color channel at each pixel, cameras spatially multiplex the measurement of different colors across the sensor plane, and then computationally recover the missing intensities through a reconstruction process known as demosaicking. We jointly learn the spatial pattern for multiplexing different color channels—that requires making a hard decision to use one of a discrete set of color filters at each pixel—along with a neural network that performs demosaicking. Together, these enable the recovery of high-quality color images of natural scenes. We find that our approach significantly outperforms the traditional Bayer pattern [2] used in most color cameras. We also compare it to a recently introduced design [4] based on making sparse color measurements, that has superior noise performance and fewer aliasing artifacts. Interestingly, our network automatically learns to employ a similar measurement strategy, but is able outperform this design by finding a more optimal spatial layout for the color measurements. 2 2 Background Since both CMOS and CCD sensors can measure only the total intensity of visible light incident on them, color is typically measured by placing an array of color filters (CFA) in front of the sensor plane. The CFA pattern determines which color channel is measured at which pixel, with the most commonly pattern used in RGB color cameras being the Bayer mosaic [2] introduced in 1976. This is a 4 × 4 repeating pattern, with two measurements of the green channel and one each of red and blue. The color values that are not directly measured are then reconstructed computationally by demosaciking algorithms. These algorithms [15] typically rely on the assumption that different color channels are correlated and piecewise smooth, and reason about locations of edges and other high-frequency image content to avoid creating aliasing artifacts. This approach yields reasonable results, and the Bayer pattern remains in widespread use even today. However, the choice of the CFA pattern involves a trade-off. Color filters placed in front of the sensor block part of the incident light energy, leading to longer exposure times or noisier measurements (in comparison to grayscale cameras). Moreover, since every channel is regularly sub-sampled in the Bayer pattern, reconstructions are prone to visually disturbing aliasing artifacts even with the best reconstruction methods. Most consumer cameras address this by placing an anti-aliasing filter in front of the sensor to blur the incident light field, but this leads to a loss of sharpness and resolution. To address this, Chakrabarti et al. [4] recently proposed the use of an alternative CFA pattern in which a majority of the pixels measure the total unfiltered visible light intensity. Color is measured only sparsely, using 2 × 2 Bayer blocks placed at regularly spaced intervals on the otherwise unfiltered sensor plane. The resulting measured image corresponds to an un-aliased full resolution luminance image (i.e., the unfiltered measurements) with “holes” at the color sampling site; with point-wise color information on a coarser grid. The reconstruction algorithm in [4] is significantly different from traditional demosaicking, and involves first recovering missing luminance values by hole-filling (which is computationally easier than up-sampling since there is more context around the missing intensities), and then propagating chromaticities from the color measurement sites to the remaining pixels using edges in the luminance image as a guide. This approach was shown to significantly improve upon the capabilities of a Bayer sensor—in terms of better noise performance, increased sharpness, and reduced aliasing artifacts. That [4]’s CFA pattern required a very different reconstruction algorithm illustrates the fact that both the sensor and inference method need to be modified together to achieve gains in performance. In [4]’s case, this was achieved by applying an intuitive design principles—of making high SNR non-aliased measurements of one color channel. However, these principles are tied to a specific reconstruction approach, and do not tell us, for example, whether regularly spaced 2 × 2 blocks are the optimal way of measuring color sparsely. While learning-based methods have been proposed for demosaicking [10, 17, 22] (as well as for joint demosaicking and denoising [9, 11]), these work with a pre-determined CFA pattern and training is used only to tune the reconstruction algorithm. In contrast, our approach seeks to learn, automatically from data, both the CFA pattern and reconstruction method, so that they are jointly optimal in terms of reconstruction quality. 3 Jointly Learning Measurement and Reconstruction We formulate our task as that of reconstructing an RGB image y(n) ∈R3, where n ∈Z2 indexes pixel location, from a measured sensor image s(n) ∈R. Along with this reconstruction task, we also have to choose a multiplexing pattern which determines the color channel that each s(n) corresponds to. We let this choice be between one of C channels—a parameterization that takes into account which spectral filters can be physically synthesized. We use x(n) ∈RC denote the intensity measurements corresponding to each of these color channels, and a zero-one selection map I(n) ∈{0, 1}C, |I(n)| = 1 to encode the multiplexing pattern, such that the corresponding sensor measurements are given by s(n) = I(n)T x(n). Moreover, we assume that I(n) repeats periodically every P pixels, and therefore only has P 2 unique values. Given a training set consisting of pairs of output images y(n) and C-channel input images x(n), our goal then is to learn this pattern I(n), jointly with a reconstruction algorithm that maps the corresponding measurements s(n) to the full color image output y(n). We use a neural network 3 to map sensor measurements s(n) to an estimate ˆy(n) of the full color image. Furthermore, we encode the measurement process into a “sensor layer”, which maps the input x(n) to measurements s(n), and whose learnable parameters encode the multiplexing pattern I(n). We then learn both the reconstruction network and the sensor layer simultaneously, with respect to a squared loss ∥ˆy(n) −y(n)∥2 between the reconstructed and true color images. 3.1 Learning the Multiplexing Pattern The key challenge to our joint learning problem lies in recovering the optimal multiplexing pattern I(n), since it is ordinal-valued and requires learning to make a hard non-differentiable decision between C possibilities. To address this, we rely on the standard soft-max operation, which is traditionally used in multi-label classification tasks. However, we are unable to use the soft-max operation directly—unlike in classification tasks where the ordinal labels are the final output, and where the training objective prefers hard assignment to a single label, in our formulation I(n) is used to generate sensor measurements that are then processed by a reconstruction network. Indeed, when using a straight soft-max, we find that the reconstruction network converges to real-valued I(n) maps that correspond to measuring different weighted combinations of the input channels. Thresholding the learned I(n) to be ordinal valued leads to a significant drop in performance, even when we further train the reconstruction network to work with this thresholded version. Our solution to this is fairly simple. We use a soft-max with a temperature parameter that is increased slowly through training iterations. Specifically, we learn a vector w(n) ∈RC for each location n of the multiplexing pattern, with the corresponding I(n) given during training as: I(n) = Soft-max [αtw(n)] , (1) where αt is a scalar factor that we increase with iteration number t. Therefore, in addition to changes due to the SGD updates to w(n), the effective distribution of I(n) become “peakier” at every iteration because of the increasing αt, and as αt →∞, I(n) becomes a zero-one vector. Note that the gradient magnitudes of w(n) also scale-up, since we compute these gradients at each iteration with respect to the current value of t. This ensures that the pattern can keep learning in the presence of a strong supervisory signal from the loss, while retaining a bias to drift towards making a hard choice for a single color channel. As illustrated in Fig. 1, our sensor layer contains a parameter vector w(n) for each pixel of the P × P multiplexing pattern. During training, we generate the corresponding I(n) vectors using (1) above, and the layer then outputs sensor measurements based on the C-channel input x(n) as s(n) = I(n)T x(n). Once training is complete (and for validation during training), we replace I(n) with its zero-one version as I(n)c = 1 for c = arg maxc wc(n), and 0 otherwise. As we report in Sec. 4, our approach is able to successfully learn an optimal sensing pattern, which adapts during training to match the evolving reconstruction network. We would also like to note here two alternative strategies that we explored to learn an ordinal I(n), which were not as successful. We considered using a standard soft-max approach with a separate entropy penalty on the distribution I(n)—however, this caused the pattern I(n) to stop learning very early during training (or for lower weighting of the penalty, had no effect at all). We also tried to incrementally pin the lowest I(n) values to zero after training for a number of iterations, in a manner similar to Han et al.’s [7] approach to network compression. However, even with significant tuning, this approach caused a large parts of the pattern search space to be eliminated early, and was not able to adapt to the fact that a channel with a low weight at a particular location might eventually become desirable based on changes to the pattern at other locations, and corresponding updates to the reconstruction network. 3.2 Reconstruction Network Architecture Traditional demosaicking algorithms [15] produce a full color image by interpolating the missing color values from neighboring measurement sites, and by exploiting cross-channel dependencies. This interpolation is often linear, but in some cases takes the form of transferring chromaticities or color ratios (e.g., in [4]). Moreover, most demosaicking algorithms reason about image textures and edges to avoid smoothing across boundaries or creating aliasing artifacts. 4 We adopt a simple bifurcated network architecture that leverages these intuitions. As illustrated in Fig. 1, our network reconstructs each P × P patch in y(n) from a receptive field that is centered on that patch in the measured image s(n), and thrice as large in each dimension. The network has two paths, both of operate on the entire input and both output (P × P × 3K) values, i.e., K values for each output color intensity. We denote these outputs as λ(n, k), f(n, k) ∈R3. One path produces f(n, k) by first computing multiplicative combinations of the entire 3P × 3P input patch—we instantiate this using a fully-connected layer without a bias term that operates in the log-domain—followed by a linear combinations across each of the 3K values at each location. We interpret these f(n, k) values as K proposals for each y(n). The second path uses a more standard cascade of convolution layers—all of which have F outputs with the first layer having a stride of P—followed by a fully connected layer that produces the outputs λ(n, k) with the same dimensionality as f(n, k). We treat λ(n, k) as gating values for the proposals f(n, k), and generate the final reconstructed patch ˆy(n) as P k λ(n, k)f(n, k). 4 Experiments We follow a similar approach to [4] for training and evaluating our method. Like [4], we use the Gehler-Shi database [6, 21] that consists of 568 color images of indoor and outdoor scenes, captured under various illuminants. These images were obtained from RAW sensor images from a camera employing the Bayer pattern with an anti-aliasing optical filter, by using the different color measurements in each Bayer block to construct a single RGB pixel. These images are therefore at half the resolution of the original sensor image, but have statistics that are representative of aliasing-free full color images of typical natural scenes. Unlike [4] who only used 10 images for evaluation, we use the entire dataset—using 56 images for testing, 461 images for training, and the remaining 51 images as a validation set to fix hyper-parameters. We treat the images in the dataset as the ground truth for the output RGB images y(n). As sensor measurements, we consider C = 4 possible color channels. The first three correspond to the original sensor RGB channels. Like [4], we choose the fourth channel to be white or panchromatic, and construct it as the sum of the RGB measurements. As mentioned in [4], this corresponds to a conservative estimate of the light-efficiency of an unfiltered channel. We construct the C-channel input image x(n) by including these measurements, followed by addition of different levels of Gaussian noise, with high noise variances simulating low-light capture. We learn a repeating pattern with P = 8. In our reconstruction network, we set the number of proposals K for each output intensity to 24, and the number of convolutional layer outputs F in the second path of our network to 128. When learning our sensor multiplexing pattern, we increase the scalar soft-max factor αt in (1) according to a quadratic schedule as αt = 1 + (γt)2, where γ = 2.5 × 10−5 in our experiments. We train a separate reconstruction network for each noise level (positing that a camera could select between these based on the ISO settings). However, since it is impractical to employ different sensors for different settings, we learn a single spatial multiplexing pattern, optimized for reconstruction under moderate noise levels with standard deviation (STD) of 0.01 (with respect to intensity values in x(n) scaled to be between 0 and 1). We train our sensor layer and reconstruction network jointly at this noise level on sets of 8 × 8 y(n) patches and corresponding 24 × 24 x(n) patches sampled randomly from the training set. We use a batch-size of 128, with a learning rate of 0.001 for 1.5 million iterations. Then, keeping the sensor pattern fixed to our learned version, we train reconstruction networks from scratch for other noise levels—training again with a learning rate of 0.001 for 1.5 million iterations, followed another 100,000 iterations with a rate of 10−4. We also train reconstruction networks at all noise levels in a similar way for the Bayer pattern, as well the pattern of [4] (with a color sampling rate of 4). Moreover, to allow consistent comparisons, we re-train the reconstruction network for our pattern at the 0.01 noise level from scratch following this regime. 4.1 Evaluating the Reconstruction Network We begin by comparing the performance of our learned reconstruction networks to traditional demosaicking algorithms for the standard Bayer pattern, and the pattern of [4]. Note that our goal is not to propose a new demosaicking method for existing sensors. Nevertheless, since our sensor 5 It # 2,500 It # 5,000 It # 7,500 It # 10,000 It # 12,500 It # 25,000 Entropy: 1.38 Entropy: 1.38 Entropy: 1.38 Entropy: 1.38 Entropy: 1.38 Entropy: 1.37 It # 100,000 It # 200,000 It # 300,000 It # 400,000 It # 500,000 It # 600,000 Entropy: 1.02 Entropy: 0.78 Entropy: 0.75 Entropy: 0.82 Entropy: 0.86 Entropy: 0.85 It # 1,000,000 It # 1,100,000 It # 1,200,000 It # 1,300,000 It # 1,400,000 It # 1,500,0000 Entropy: 0.57 Entropy: 0.37 Entropy: 0.35 Entropy: 0.25 Entropy: 0.18 (Final) Figure 2: Evolution of sensor pattern through training iterations. We find that the our network’s color sensing pattern changes qualitatively through the training process. In initial iterations, the sensor layer learns to sample color channels directly. As training continues, these color measurements are replaced by panchromatic (white) pixels. The final iterations see fine refinements to the pattern. We also report the mean (across pixels) entropy of the underlying distribution I(n) for each pattern. Note that, as expected, this entropy decreases across iterations as the distributions I(n) evolve from being soft selections of color channels, to zero-one vectors that make hard ordinal decisions. Table 1: Median Reconstruction PSNR (dB) using Traditional demosaicking and Proposed Network Bayer CFZ [4] Noise STD=0.0025 Noise STD=0.01 Noise STD=0.0025 Noise STD=0.01 Traditional 42.69 32.44 48.84 39.55 Network 47.55 43.72 49.08 44.64 pattern is being learned jointly with our proposed reconstruction architecture, it is important to determine whether this architecture can learn to reason effectively with different kinds of sensor patterns, which is necessary to effectively cover the joint sensor-inference design space. We compare our learned networks to Zhang and Wu’s method [27] for the Bayer pattern, and Chakrabarti et al.’s method [4] for their own pattern. We measure performance in terms of the reconstruction PSNR of all non-overlapping 64 × 64 patches from all test images (roughly 40,000 patches). Table 1 compares the median PSNR values across all patches for reconstructions using our network to those from traditional methods, at two noise levels—low noise corresponding to an STD of 0.0025, and moderate noise corresponding to 0.01. For the pattern of [4], we find that our network performs similar to their reconstruction method at the low noise level, and significantly better at the higher noise level. On the Bayer pattern, our network achieves much better performance at both noise levels. We also note here that reconstruction using our network is significantly faster—taking 9s on a six core CPU, and 200ms when using a Titan X GPU, for a 2.7 mega-pixel image. In comparison, [4] and [27]’s reconstruction methods take 20s and 1 min. respectively on the CPU. 4.2 Visualizing Sensor Pattern Training In Fig. 2, we visualize the evolution of our sensor pattern during the training process, while it is being jointly learned with the reconstruction network. In the initial iterations, the sensor layers displays a preference for densely sampling the RGB channels, with very few panchromatic measurements—in fact, in the first row of Fig. 2, we see panchromatic pixels switching to color measurements. This 6 Figure 3: Example reconstructions from (noisy) measurements with different sensor multiplexing patterns. Best viewed at higher resolution in the electronic version. is likely because early on in the training process, the reconstruction network hasn’t yet learned to exploit cross-channel correlations, and therefore needs to measure the output channels directly. However, as training progresses, the reconstruction network gets more sophisticated, and we see the number of color measurements get sparser and sparser, in favor of panchromatic pixels that offer the advantage of higher SNR. Essentially, the sensor layer begins to adopt one of the design principles of [4]. However, it distributes the color measurement sites across the pattern, instead of concentrating them into separated blocks like [4]. In the last 500K iterations, we see that most changes correspond to fine refinements of the pattern, with a few individual pixels swapping the channels they measure. While the patterns themselves in Fig. 2 correspond to the channel at each pixel with the maximum value in the selection map I(n), remember that these maps themselves are soft. Therefore, we also report the mean entropy of the underlying I(n) for each pattern in Fig. 2. We see that this entropy decreases across iterations, as the choice of color channel for more and more pixels becomes fixed, with their distributions in I(n) becoming peakier and closer to being zero-one vectors. 4.3 Evaluating Learned Pattern Finally, we evaluate the performance of neural network-based reconstruction from measurements with our learned pattern, to those with the Bayer pattern and the pattern of [4]. Table 2 shows different quantiles of reconstruction PSNR for various noise levels, with noise STDs raning from 0 to 0.04. Even though our sensor pattern was trained at the noise level of STD=0.01, we find it achieves the highest reconstruction quality over a large range of noise levels. Specifically, it always outperforms the Bayer pattern, by fairly significant margins at higher noise levels. The improvement in performance over [4]’s pattern is less pronounced, although we do achieve consistently higher PSNR values for all quantiles at most noise levels. Figure 3 shows examples of color patches reconstructed from our learned sensor, and compare these to those from the Bayer pattern and [4]. We see that the reconstructions from the Bayer pattern are noticeably worse. This is because it makes lower SNR measurements, and the reconstruction networks learn to smooth their outputs to reduce this noise. Both [4] and our pattern yield significantly better reconstructions. Indeed, most of our gains over the Bayer pattern come from choosing to make most measurements panchromatic, a design principle shared by [4]. However, remember that our sensor layer learns this principle entirely automatically from data, without expert supervision. Moreover, we see that [4]’s reconstructions tend to have a few more instances of “chromaticity noise”, in the form of contiguous regions with incorrect hues, which explain its slightly lower PSNR values in Table 2. 7 Table 2: Network Reconstruction PSNR (dB) Quantiles for various CFA Patterns Noise STD Percentile Bayer [2] CFZ [4] Learned 25% 47.62 48.04 47.97 0 50% 51.72 52.17 52.12 75% 54.97 55.32 55.30 25% 44.61 46.05 46.08 0.0025 50% 47.55 49.08 49.17 75% 50.52 51.57 51.76 25% 42.55 44.33 44.37 0.0050 50% 45.63 47.01 47.19 75% 48.73 49.68 49.94 25% 41.34 42.92 43.08 0.0075 50% 44.48 45.60 45.85 75% 47.77 48.41 48.69 25% 40.58 41.97 42.16 0.0100 50% 43.72 44.64 44.94 75% 47.10 47.56 47.80 25% 40.29 41.17 41.41 0.0125 50% 43.36 43.88 44.22 75% 46.65 47.04 47.27 25% 39.97 40.54 40.85 0.0150 50% 43.03 43.29 43.69 75% 46.25 46.69 46.86 25% 39.60 40.03 40.31 0.0175 50% 42.62 42.83 43.12 75% 45.82 46.39 46.45 25% 39.31 39.49 39.96 0.0200 50% 42.39 42.39 42.78 75% 45.56 46.14 46.23 25% 38.18 38.31 38.92 0.0300 50% 41.17 41.48 41.85 75% 44.23 45.61 45.63 25% 37.14 37.43 38.00 0.0400 50% 39.98 40.86 41.02 75% 43.17 45.11 44.98 5 Conclusion In this paper, we proposed learning sensor design jointly with a neural network that carried out inference on the sensor’s measurements, specifically focusing on the problem of finding the optimal color multiplexing pattern for a digital color camera. We learned this pattern by joint training with a neural network for reconstructing full color images from the multiplexed measurements. We used a soft-max operation with an increasing temperature parameter to model the non-differentiable color channel selection at each point, which allowed us to train the pattern effectively. Finally, we demonstrated that our learned pattern enabled better reconstructions than past designs. An implementation of our method, along with trained models, data, and results, is available at our project page at http://www.ttic.edu/chakrabarti/learncfa/. Our results suggest that learning measurement strategies jointly with computational inference is both useful and possible. In particular, our approach can be used directly to learn other forms of optimized multiplexing patterns—e.g., spatio-temporal multiplexing for video, viewpoint multiplexing in lightfield cameras, etc. Moreover, these patterns can be learned to be optimal for inference tasks beyond reconstruction. For example, a sensor layer jointly trained with a neural network for classification could be used to discover optimal measurement strategies for say, distinguishing between biological samples using multi-spectral imaging, or detecting targets in remote sensing. Acknowledgments We thank NVIDIA corporation for the donation of a Titan X GPU used in this research. 8 References [1] R. G. Baraniuk. Compressive sensing. IEEE Signal Processing Magazine, 2007. [2] B. E. Bayer. Color imaging array. US Patent 3971065, 1976. [3] H. C. Burger, C. J. Schuler, and S. Harmeling. Image denoising: Can plain neural networks compete with BM3D? In Proc. CVPR, 2012. [4] A. Chakrabarti, W. T. Freeman, and T. Zickler. Rethinking color cameras. In Proc. ICCP, 2014. [5] M. Elad. Optimized projections for compressed sensing. IEEE Trans. Sig. Proc., 2007. [6] P. V. Gehler, C. Rother, A. Blake, T. Minka, and T. Sharp. Bayesian color constancy revisited. In Proc. CVPR, 2008. [7] S. Han, H. Mao, and W. J. Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. arXiv:1510.00149, 2015. [8] J. Holloway, A. C. Sankaranarayanan, A. Veeraraghavan, and S. Tambe. Flutter shutter video camera for compressive sensing of videos. In Proc. ICCP, 2012. [9] T. Kaltzer, K. Hammernik, P. Knobelreiter, and T. Pock. Learning joint demosaicing and denoising based on sequential energy minimization. In Proc. ICCP, 2016. [10] O. Kapah and H. Z. Hel-Or. Demosaicking using artificial neural networks. In Electronic Imaging, 2000. [11] D. Khashabi, S. Nowozin, J. Jancsary, and A. W. Fitzgibbon. Joint demosaicing and denoising via learned nonparametric random fields. IEEE Trans. Imag. Proc., 2014. [12] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012. [13] Y. LeCun, L. Bottou, G. Orr, and K. Muller. Efficient backprop. In Neural Networks: Tricks of the trade. Springer, 1998. [14] A. Levin, R. Fergus, F. Durand, and W. T. Freeman. Image and depth from a conventional camera with a coded aperture. In ACM Transactions on Graphics (TOG), 2007. [15] X. Li, B. Gunturk, and L. Zhang. Image demosaicing: A systematic survey. In Proc. SPIE, 2008. [16] J. Long, E. Shelhamer, and T. Darrell. Fully convolutional networks for semantic segmentation. In Proc. CVPR, 2015. [17] J. Mairal, F. Bach, J. Ponce, G. Sapiro, and A. Zisserman. Non-local sparse models for image restoration. In Proc. ICCV, 2009. [18] R. Raskar, A. Agrawal, and J. Tumblin. Coded exposure photography: motion deblurring using fluttered shutter. ACM Transactions on Graphics (TOG), 2006. [19] C. J. Schuler, H. C. Burger, S. Harmeling, and B. Scholkopf. A machine learning approach for non-blind image deconvolution. In Proc. CVPR, 2013. [20] P. Sermanet, D. Eigen, X. Zhang, M. Mathieu, R. Fergus, and Y. LeCun. Overfeat: Integrated recognition, localization and detection using convolutional networks. arXiv:1312.6229, 2013. [21] L. Shi and B. Funt. Re-processed version of the Gehler color constancy dataset of 568 images. 2010. Accessed from http://www.cs.sfu.ca/~colour/data/. [22] J. Sun and M. F. Tappen. Separable markov random field model and its applications in low level vision. IEEE Trans. Imag. Proc., 2013. [23] A. Veeraraghavan, R. Raskar, A. Agrawal, A. Mohan, and J. Tumblin. Dappled photography: Mask enhanced cameras for heterodyned light fields and coded aperture refocusing. 2007. [24] X. Wang, D. Fouhey, and A. Gupta. Designing deep networks for surface normal estimation. In Proc. CVPR, 2015. [25] A. E. Waters, A. C. Sankaranarayanan, and R. Baraniuk. Sparcs: Recovering low-rank and sparse matrices from compressive measurements. In NIPS, 2011. [26] L. Xu, J. S. Ren, C. Liu, and J. Jia. Deep convolutional neural network for image deconvolution. In NIPS, 2014. [27] L. Zhang and X. Wu. Color demosaicking via directional linear minimum mean square-error estimation. IEEE Trans. Imag. Proc., 2005. [28] D. Zoran and Y. Weiss. From learning models of natural image patches to whole image restoration. In Proc. ICCV, 2011. 9 | 2016 | 393 |
6,320 | “Short-Dot”: Computing Large Linear Transforms Distributedly Using Coded Short Dot Products Sanghamitra Dutta Carnegie Mellon University sanghamd@andrew.cmu.edu Viveck Cadambe Pennsylvania State University viveck@engr.psu.edu Pulkit Grover Carnegie Mellon University pgrover@andrew.cmu.edu Abstract Faced with saturation of Moore’s law and increasing size and dimension of data, system designers have increasingly resorted to parallel and distributed computing to reduce computation time of machine-learning algorithms. However, distributed computing is often bottle necked by a small fraction of slow processors called “stragglers” that reduce the speed of computation because the fusion node has to wait for all processors to complete their processing. To combat the effect of stragglers, recent literature proposes introducing redundancy in computations across processors, e.g., using repetition-based strategies or erasure codes. The fusion node can exploit this redundancy by completing the computation using outputs from only a subset of the processors, ignoring the stragglers. In this paper, we propose a novel technique – that we call “Short-Dot” – to introduce redundant computations in a coding theory inspired fashion, for computing linear transforms of long vectors. Instead of computing long dot products as required in the original linear transform, we construct a larger number of redundant and short dot products that can be computed more efficiently at individual processors. Further, only a subset of these short dot products are required at the fusion node to finish the computation successfully. We demonstrate through probabilistic analysis as well as experiments on computing clusters that Short-Dot offers significant speed-up compared to existing techniques. We also derive trade-offs between the length of the dot-products and the resilience to stragglers (number of processors required to finish), for any such strategy and compare it to that achieved by our strategy. 1 Introduction This work proposes a coding-theory inspired computation technique for speeding up computing linear transforms of high-dimensional data by distributing it across multiple processing units that compute shorter dot products. Our main focus is on addressing the “straggler effect,” i.e., the problem of delays caused by a few slow processors that bottleneck the entire computation. To address this problem, we provide techniques (building on [1] [2] [3] [4] [5]) that introduce redundancy in the computation by designing a novel error-correction mechanism that allows the size of individual dot products computed at each processor to be shorter than the length of the input. The problem of computing linear transforms of high-dimensional vectors is “the" critical step [6] in several machine learning and signal processing applications. Dimensionality reduction techniques such as Principal Component Analysis (PCA), Linear Discriminant Analysis (LDA), taking random projections, require the computation of short and fat linear transforms on high-dimensional data. Linear transforms are the building blocks of solutions to various machine learning problems, e.g., regression and classification etc., and are also used in acquiring and pre-processing the data through Fourier transforms, wavelet transforms, filtering, etc. Fast and reliable computation of linear transforms are thus a necessity for low-latency inference [6]. Due to saturation of Moore’s law, increasing 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. speed of computing in a single processor is becoming difficult, forcing practitioners to adopt parallel processing to speed up computing for ever increasing data dimensions and sizes. Classical approaches of computing linear transforms across parallel processors, e.g., Block-Striped Decomposition [7], Fox’s method [8, 7], and Cannon’s method [7], rely on dividing the computational task equally among all available processors1 without any redundant computation. The fusion node collects the outputs from each processors to complete the computation and thus has to wait for all the processors to finish. In almost all distributed systems, a few slow or faulty processors – called “stragglers”[11] – are observed to delay the entire computation. This unpredictable latency in distributed systems is attributed to factors such as network latency, shared resources, maintenance activities, and power limitations. In order to combat with stragglers, cloud computing frameworks like Hadoop [12] employ various straggler detection techniques and usually reset the task allotted to stragglers. Forward error-correction techniques offer an alternative approach to deal with this “straggler effect” by introducing redundancy in the computational tasks across different processors. The fusion node now requires outputs from only a subset of all the processors to successfully finish. In this context, the use of preliminary erasure codes dates back to the ideas of algorithmic fault tolerance [13] [14]. Recently optimized Repetition and Maximum Distance Separable (MDS) [19] codes have been explored [2] [3] [1] [16] to speed up computations. We consider the problem of computing Ax where A(M×N) is a given matrix and x(N×1) is a vector that is input to the computation (M ≪N). In contrast with [1], which also uses codes to compute linear transforms in parallel, we allow the size of individual dot products computed at each processor to be smaller than N, the length of the input. Why might one be interested in computing short dot products while performing an overall large linear transform? This is because for distributed digital processors, the computation time is reduced with the number of operations (length of the dot-products). In Sections 4 and 5, we show that the computation speed-up can be increased beyond that obtained in [1]. Another interesting example comes from recent work on designing processing units that exclusively compute dot-products using analog components [17, 18]. These devices are prone to errors and increased delays in convergence when designed for larger dot products. To summarize, our main contributions are: 1. To compute Ax for a given matrix A(M×N), we instead compute F x where we construct F(P ×N) (total no. of processors P > Required no. of dot-products M) such that each N-length row of F has at most N(P −K + M)/P non-zero elements. Because the locations of zeros in a row of F are known by design, this reduces the complexity of computing dot-products of rows of F with x. Here K parameterizes the resilience to stragglers: any K of the P dot products of rows of F with x are sufficient to recover Ax, i.e., any K rows of F can be linearly combined to generate the rows of A. 2. We provide fundamental limits on the trade-off between the length of the dot-products and the straggler resilience (number of processors to wait for) for any such strategy in Section 3. This suggests a lower bound on the length of task allotted per processor. However, we believe that these limits are loose and point to an interesting direction for future work. 3. Assuming exponential tails of service-times at each server (used in [1]), we derive the expected computation time required by our strategy and compare it to uncoded parallel processing, repetition strategy and MDS codes [19] (see Fig. 2). Short-Dot offers speed-up by a factor of Ω(log(P)) over uncoded, parallel processing and repetition, and nearly by a factor of Ω( P M ) compared to MDS codes when M is linear in P. The strategy out-performs repetition or MDS codes by a factor of Ω P M log(P/M) when M is sub-linear in P. 4. We provide experimental results showing that Short-Dot is faster than existing strategies. For the rest of the paper, we define the sparsity of a vector u ∈RN as the number of nonzero elements in the vector, i.e., ∥u∥0 = PN j=1 I(uj ̸= 0). We also assume that P divides N (P ≪N). Comparison with existing strategies: Consider the problem of computing a single dot product of an input vector x ∈RN with a pre-specified vector a ∈RN. By an “uncoded” parallel processing strategy (which includes Block Striped Decomposition [7]), we mean a strategy that does not use redundancy to overcome delays caused by stragglers. One uncoded strategy is to partition the dot product into P smaller dot products, where P is the number of available processors. E.g. a can 1Strassen’s algorithm [9] and its generalizations offer a recursive approach to faster matrix multiplications over multiple processors, but they are often not preferred because of their high communication cost [10]. 2 Figure 1: A dot-product of length N = 12 is being computed parallely using P = 6 processors. (Left) Uncoded Parallel Processing - Divide into P parts, (Right) Repetition with block partitioning. be divided into P parts – constructing P short vectors of sparsity N/P – with each vector stored in a different processor (as shown in Fig. 1 left). Only the nonzero values of the vector need to be stored since the locations of the nonzero values is known apriori at every node. One might expect the computation time for each processor to reduce by a factor of P. However, now the fusion node has to wait for all the P processors to finish their computation, and the stragglers can now delay the entire computation. Can we construct P vectors such that dot products of a subset of them with x are sufficient to compute ⟨a, x⟩? A simple coded strategy is Repetition with block partitioning i.e., constructing L vectors of sparsity N/L by partitioning the vector of length N into L parts (L < P), and repeating the L vectors P/L times so as to obtain P vectors of sparsity N/L as shown in Fig. 1 (right). For each of the L parts of the vector, the fusion node only needs the output of one processor among all its repetitions. Instead of a single dot-product, if one requires the dot-product of x with M vectors {a1, . . . , aM}, one can simply repeat the aforementioned strategy M times. For multiple dot-products, an alternative repetition-based strategy is to compute M dot products P/M times in parallel at different processors. Now we only have to wait for at least one processor corresponding to each of the M vectors to finish. Improving upon repetition, it is shown in [1] that an (P, M)-MDS code allows constructing P coded vectors such that any M of P dot-products can be used to reconstruct all the M original vectors (see Fig. 2b). This strategy is shown, both experimentally and theoretically, to perform better than repetition and uncoded strategies. (a) Uncoded Parallel Processing (b) Using MDS codes (c) Using Short-Dot Figure 2: Different strategies of parallel processing: Here M = 3 dot-products of length N = 12 are being computed using P = 6 processors. Can we go beyond MDS codes? MDS codes-based strategies require N-length dot-products to be computed on each processor. Short-Dot instead constructs P vectors of sparsity s (less than N), such that the dot product of x with any K (≥M) out of these P short vectors is sufficient to compute the dot-product of x with all the M given vectors (see Fig. 2c). Compared to MDS Codes, Short-Dot waits for some more processors (since K ≥M), but each processor computes a shorter dot product. We also propose Short-MDS, an extension of the MDS codes-based strategy in [1] to create short dot-products of length s, through block partitioning, and compare it with Short-Dot. In regimes where N s is an integer, Short-MDS may be viewed as a special case of Short-Dot. But when N s is not an integer, Short-MDS has to wait for more processors in worst case than Short-Dot for the same sparsity s, as discussed in Remark 1 in Section 2. 2 Our coded parallelization strategy: Short-Dot In this section, we provide our strategy of computing the linear transform Ax where x ∈RN is the input vector and A(M×N) = [a1, a2, . . . , aM]T is a given matrix. Short-Dot constructs a 3 Figure 3: Short-Dot: Distributes short dot-products over P parallel processors, such that outputs from any K out of P processors are sufficient to compute successfully. P × N matrix F = [f1, f2, . . . , fP ]T such that M predetermined linear combinations of any K rows of F are sufficient to generate each of {aT 1 , . . . , aT M}, and any row of F has sparsity at most s = N P (P −K + M). Each sparse row of F (say f T i ) is sent to the i-th processor (i = 1, . . . , P) and dot-products of x with all sparse rows are computed in parallel. Let Si denote the support (set of non-zero indices) of fi. Thus, for any unknown vector x, short dot products of length |Si| ≤s = N P (P −K + M) are computed on each processor. Since the linear combination of any K rows of F can generate the rows of A, i.e., {aT 1 , aT 2 , . . . , aT M}, the dot-product from the earliest K out of P processors can be linearly combined to obtain the linear transform Ax. Before formally stating our algorithm, we first provide an insight into why such a matrix F exists in the following theorem, and develop an intuition on the construction strategy. Theorem 1 Given row vectors {aT 1 , aT 2 , . . . , aT M}, there exists a P × N matrix F such that a linear combination of any K(> M) rows of the matrix is sufficient to generate the row vectors and each row of F has sparsity at most s = N P (P −K + M), provided P divides N. Proof: We may append (K −M) rows to A = [a1, a2, . . . , aM]T , to form a K × N matrix ˜ A = [a1, a2, . . . , aM, z1, . . . , zK−M]T . The precise choice of these additional vectors will be made explicit later. Next, we choose B, a P × K matrix such that any square sub-matrix of B is invertible. E.g., A Vandermonde or Cauchy Matrix, or a matrix with i.i.d. Gaussian entries can be shown to satisfy this property with probability 1. The following lemma shows that any K rows of the matrix B ˜ A are sufficient to generate any row of ˜ A, including {aT 1 , aT 2 , . . . , aT M}: Lemma 1 Let F = B ˜ A where ˜ A is a K × N matrix and B is any (P × K) matrix such that every square sub-matrix is invertible. Then, any K rows of F can be linearly combined to generate any row of ˜ A. Proof: Choose an arbitrary index set χ ⊂{1, 2, . . . , P} such that |χ| = K. Let F χ be the sub-matrix formed by chosen K rows of F indexed by χ. Then, F χ = Bχ ˜ A. Now, Bχ is a K × K sub-matrix of B, and is thus invertible. Thus, ˜ A = (Bχ)−1F χ. The i-th row of ˜ A is [i-th Row of (Bχ)−1]F χ for i = 1, 2, . . . , K. Thus, each row of ˜ A is generated by the chosen K rows of F . ■ In the next lemma, we show how the row sparsity of F can be constrained to be at most N P (P −K+M) by appropriately choosing the appended vectors z1, . . . , zK−M. Lemma 2 Given an M × N matrix A = [a1, . . . , aM]T , let ˜ A = [a1, . . . , aM, z1, . . . , zK−M]T be a K × N matrix formed by appending K −M row vectors to A. Also let B be a P × K matrix such that every square matrix is invertible. Then there exists a choice of the appended vectors z1, . . . , zK−M such that each row of F = B ˜ A has sparsity at most s = N P (P −K + M). Proof: We select a sparsity pattern that we want to enforce on F and then show that there exists a choice of the appended vectors z1, . . . , zK−M such that the pattern can be enforced. Sparsity Pattern enforced on F : This is illustrated in Fig. 4. First, we construct a P × P “unit block” with a cyclic structure of nonzero entries, where (K −M) zeros in each row and column are arranged as shown in Fig. 4. Each row and column have at most sc = P −K + M non-zero entries. This unit block is replicated horizontally N/P times to form an P × N matrix with at most 4 sc non-zero entries in each column, and and at most s = Nsr/P non-zero entries in each row. We now show how choice of z1, . . . , zK−M can enforce this pattern on F . Figure 4: Sparsity pattern of F : (Left) Unit Block (P × P); (Right) Unit Block concatenated N/P times to form N × P matrix F with row sparsity at most s. From F = B ˜ A, the j-th column of F can be written as, Fj = B ˜ Aj. Each column of F has at least K −M zeros at locations indexed by U ⊂{1, 2, . . . , P}. Let BU denote a ((K −M) × K) sub-matrix of B consisting of the rows of B indexed by U. Thus, BU ˜ Aj = [0](K−M)×1. Divide ˜ Aj into two portions of lengths M and K −M as follows: ˜ Aj = [AT j | zT ]T = [a1(j) a2(j) . . . aM(j) z1(j) . . . zK−M(j)]T Here Aj = [a1(j) a2(j) . . . aM(j)]T is actually the j-th column of given matrix A and z = [z1(j), . . . zK−M(j)]T depends on the choice of the appended vectors. Thus, BU cols 1:MAj + BU cols M+1:K z = [0]K−M×1 ⇒BU cols M+1:K z = −BU cols 1:M[Aj] ⇒[ z ] = −(BU cols M+1:K)−1 BU cols 1:M[Aj] (1) where the last step uses the fact that [BU cols M+1:K] is invertible because it is a (K −M) × (K −M) square sub-matrix of B. This explicitly provides the vector z which completes the j-th column of ˜ A. The other columns of ˜ A can be completed similarly, proving the lemma. ■ From Lemmas 1 and 2, for a given M × N matrix A, there always exists a P × N matrix F such that a linear combination of any K columns of F is sufficient to generate our given vectors and each row of F has sparsity at most s = N P (P −K + M). This proves the theorem. ■ With this insight in mind, we now formally state our computation strategy: Algorithm 1 Short-Dot [A] Pre-Processing Step: Encode F (Performed Offline) Given: AM×N = [a1, . . . , aM]T = [A1, A2, . . . , AN], parameter K, Matrix BP ×K 1: For j = 1 to N do 2: Set U ←({(j −1), . . . , (j + K −M −1)} mod P) + 1 3: ▷The set of (K −M) indices that are 0 for the j-th column of F 4: Set BU ←Rows of B indexed by U 5: Set [ z ] = −(BU cols M+1:K)−1 BU cols 1:M[Aj] ▷z(K−M)×1 is a row vector. 6: Set Fj = B[AT j |zT ]T ▷Fj is a column vector ( j-th col of F ) Encoded Output: FP ×N = [f1f2 . . . fP ]T ▷Row representation of matrix F 7: For i = 1 to P do 8: Store Si ←Support(fi) ▷Indices of non-zero entries in the i-th row of F 9: Send f Si i to i-th processor ▷i-th row of F sent to i-th processor [B] Online computations External Input : x Resources: P parallel processors (P > M) [B1] Parallelization Strategy: Divide task among parallel processors: 1: For i = 1 to P do 2: Send xSi to the i-th processor 3: Compute at i-th processor: ⟨f Si i , xSi⟩▷uS denotes only the rows of vector u indexed by S Output: ⟨f Si i , xSi⟩from K earliest processors 5 [B2] Fusion Node: Decode the dot-products from the processor outputs: 1: Set V ←Indices of the K processors that finished first 2: Set BV ←Rows of B indexed by V 3: Set vK×1 ←[⟨f Si i , xSi⟩, ∀i ∈V ] ▷Col Vector of outputs from first K processors 4: Set Ax = [⟨a1, x⟩, . . . , ⟨aM, x⟩]T ←[(BV )−1]rows 1:Mv 5: Output: ⟨x, a1⟩, . . . , ⟨x, aM⟩ Table 1: Trade-off between the length of the dot-products and parameter K for different strategies Strategy Length Parameter K Repetition N P − P M + 1 MDS N M Short-Dot s P − P s N + M Strategy Length Parameter K Repetition with block partition s P − j P M⌈N/s⌉ k + 1 Short-MDS s P − j P ⌈N/s⌉ k + M Remark 1: Short-MDS - a special case of Short-Dot An extension of the MDS codes-based strategy proposed in [1], that we call Short-MDS can be designed to achieve row-sparsity s. First block-partition the matrix of N columns, into ⌈N/s⌉sub-matrices of size M × s, and also divide the total processors P equally into ⌈N/s⌉parts. Now, each sub-matrix can be encoded using a ( P ⌈N/s⌉, M) MDS code. In the worst case, including all integer effects, this strategy requires K = P − j P ⌈N/s⌉ k +M processors to finish. In comparison, Short-Dot requires K = P − P s N +M processors to finish. In the regime where, s exactly divides N, Short-MDS can be viewed as a special case of Short-Dot, as both the expressions match. However, in the regime where s does not exactly divide N, Short-MDS requires more processors to finish in the worst case than Short-Dot. Short-Dot is a generalized framework that can achieve a wider variety of pre-specified sparsity patterns as required by the application. In Table 1, we compare the lengths of the dot-products and straggler resilience K, i.e., the number of processors to wait for in worst case, for different strategies. 3 Limits on trade-off between the length of dot-products and parameter K Theorem 2 Let AM×N be any matrix such that each column has at least one non-zero element. If the linear combination of any K rows of F(P ×N) can generate M rows of AM×N, then the average sparsity s of each row of F(P ×N) must satisfy s ≥N 1 −K P + N P . Proof: We claim that K is strictly greater than the maximum number of zeros that can occur in any column of the matrix F . If not, suppose the j-th column of F has more than K zeros. Then there exists a linear combination of K rows of F that will always have 0 at the j-th column index and it is not possible to generate any row of the given matrix A. Thus, K is no less than 1 + Max No. of 0s in any column ofF . Since, maximum value is always greater than average, K ≥1 + Avg. No. of 0s in any column ofF ≥1 + (N −s)P N . (2) A slight re-arrangement establishes the aforementioned lower bound. ■ Short-Dot achieves a row-sparsity of at most s = N 1 −K P + NM P while the lower bound for any such strategy is s ≥N 1 −K P + N P . Notice that the bounds only differ in the second term. We believe that the difference in the bounds arises due to the looseness of the fundamental limit: our technique is based on derivation for M = 1 (bound is tight), and could be tightened for M > 1. 4 Analysis of expected computation time for exponential tail models We now provide a probabilistic analysis of the computational time required by Short-Dot and compare it with uncoded parallel processing, repetition and MDS codes as shown in Fig. 5. Table 2 shows the order-sense expected computation time in the regimes where M is linear and sub-linear in P. A detailed analysis is provided in the supplement. Assume that the time required by a processor to 6 Figure 5: Expected computation time: Short-Dot is faster than MDS when M ≪P and Uncoded when M ≈P, and is universally faster over the entire range of M. For the choice of straggling parameter, Repetition is slowest. When M does not exactly divide P, the distribution of computation time for repetition and uncoded strategies is the maximum of non-identical but independent random variables, which produce the ripples in these curves (see supplement for details). compute a single dot-product follows an exponential distribution and is independent of the other processors, as described in [1]. Let the time required to compute a single dot-product of length N be distributed as: Pr(TN ≤t) = 1 −exp −µ t N −1 ∀t ≥N. Here, µ is the “straggling parameter” that determines the unpredictable latency in computation time. For an s length dot product, we simply replace N by s .The expected computation time for Short-Dot is the expected value of the K-th order statistic of these P iid exponential random variables, which is given by: E(T) = s 1 + log( P P −K ) µ ! = (P −K + M)N P 1 + log( P P −K ) µ ! . (3) Here, (3) uses the fact that the expected value of the K-th statistic of P iid exponential random variables with parameter 1 is PP i=1 1 i −PP −K i=1 1 i ≈log(P) −log(P −K) [1]. The expected computation time in the RHS of (3) is minimized when P −K = Θ(M). This minimal expected time is O( MN P ) for M linear in P and is O MN log(P/M) P for M sub-linear in P. Table 2: Probabilistic Computation Times Strategy E(T) M linear in P M sub-linear in P Only one Processor MN 1 + 1 µ Θ (MN) Θ (MN) Uncoded (M divides P)2 MN P 1 + log(P ) µ Θ MN P log(P) Θ MN P log(P) Repetition (M divides P) 2 N 1 + M log(M) P µ Θ MN P log(P) Θ (N) MDS N 1 + log( P P −M ) µ Θ(N) Θ(N) Short-Dot N(P −K+M) P 1 + log( P P −K ) µ O( MN P ) O MN P log P M 2 Refer to Supplement for more accurate analysis taking integer effects into account Encoding and Decoding Complexity: Even though encoding is a pre-processing step (since A is assumed to be given in advance), we include a complexity analysis for the sake of completeness. The encoding requires N P matrix inversions of size (K −M), and a P × K matrix multiplication with a K × N matrix. The naive encoding complexity is therefore O( N P (K −M)3 + NKP). This is higher than MDS codes that has an encoding complexity of O(NMP)), but it is only a one-time cost that provides savings in online steps (as discussed earlier in this section). The decoding complexity of Short-Dot is O(K3 + KM) which does not depend on N when M, K ≪N. This is nearly the same as O(M 3 + M 2) complexity of MDS codes. We believe that the complexities might be reduced further, based on special choices of encoding matrix B. 7 Table 3: Experimental computation time of 10000 dot products (N = 785, M = 10, P = 20) Strategy Parameter K Mean STDEV Minimum Time Maximum Time Uncoded 20 11.8653 2.8427 9.5192 27.0818 Short-Dot 18 10.4306 0.9253 8.2145 11.8340 MDS 10 15.3411 0.8987 13.8232 17.5416 5 Experimental Results We perform experiments on computing clusters at CMU to test the computational time. We use HTCondor [20] to schedule jobs simultaneously among the P processors. We compare the time required to classify 10000 handwritten digits of the MNIST [21] database, assuming we are given a trained 1-layer Neural Network. We separately trained the Neural network using training samples, to form a matrix of weights, denoted by A10×785. For testing, the multiplication of this given 10 × 785 matrix, with the test data matrix X785×10000 is considered. The total number of processors was 20. Assuming that A10×785 is encoded into F20×785 in a pre-processing step, we store the rows of F in each processor apriori. Now portions of the data matrix X of size s × 10000 are sent to each of the P parallel processors as input. We also send a C-program to compute dot-products of length s = N P (P −K + M) with appropriate rows of F using command condor-submit. Each processor outputs the value of one dot-product. The computation time reported in Fig. 6 includes the total time required to communicate inputs to each processor, compute the dot-products in parallel, fetch the required outputs, decode and classify all the 10000 test-images, based on 35 experimental runs. Figure 6: Experimental results: (Left) Mean computation time for Uncoded Strategy, Short-Dot (K=18) and MDS codes: Short-Dot is faster than MDS by 32% and Uncoded by 12%. (Right) Scatter plot of computation time for different experimental runs: Short-Dot is faster most of the time. Key Observations: (See Table 3 for detailed results). Computation time varies based on nature of straggling, at the particular instant of the experimental run. Short-Dot outperforms both MDS and Uncoded, in mean computation time. Uncoded is faster than MDS since per-processor computation time for MDS is larger, and it increases the straggling, even though MDS waits for only for 10 out of 20 processors. However, note that Uncoded has more variability than both MDS and Short-Dot, and its maximum time observed during the experiment is much greater than both MDS and Short-Dot. The classification accuracy was 85.98% on test data. 6 Discussion While we have presented the case of M < P here, Short-Dot easily generalizes to the case where M ≥P. The matrix can be divided horizontally into several chunks along the row dimension (shorter matrices) and Short-Dot can be applied on each of those chunks one after another. Moreover if rows with same sparsity pattern are grouped together and stored in the same processor initially, then the communication cost is also significantly reduced during the online computations, since only some elements of the unknown vector x are sent to a particular processor. Acknowledgments: Systems on Nanoscale Information fabriCs (SONIC), one of the six SRC STARnet Centers, sponsored by MARCO and DARPA. We also acknowledge NSF Awards 1350314, 1464336 and 1553248. S Dutta also received Prabhu and Poonam Goel Graduate Fellowship. 8 References [1] Kangwook Lee, Maximilian Lam, Ramtin Pedarsani, Dimitris Papailiopoulos, and Kannan Ramchandran. Speeding Up Distributed Machine Learning Using Codes. NIPS Workshop on Learning Systems, 2015. [2] Da Wang, Gauri Joshi, and Gregory Wornell. Using straggler replication to reduce latency in large-scale parallel computing. In ACM SIGMETRICS Performance Evaluation Review, volume 43, pages 7–11, 2015. [3] Da Wang, Gauri Joshi, and Gregory Wornell. Efficient Task Replication for Fast Response Times in Parallel Computation. In ACM SIGMETRICS Performance Evaluation Review, volume 42, pages 599–600, 2014. [4] Gauri Joshi, Yanpei Liu, and Emina Soljanin. On the delay-storage trade-off in content download from coded distributed storage systems. IEEE Journal on Selected Areas in Communications, 32(5):989–997, 2014. [5] Longbo Huang, Sameer Pawar, Hao Zhang, and Kannan Ramchandran. Codes can reduce queueing delay in data centers. In Proceedings IEEE International Symposium on Information Theory (ISIT), pages 2766–2770, 2012. [6] William Dally. High-performance hardware for machine learning. NIPS Tutorial, 2015. [7] Vipin Kumar, Ananth Grama, Gupta Anshul, and George Karypis. Introduction to Parallel Computing: Design and Analysis of Algorithms. The Benjamin/Cummings Publishing Company, Inc., Redwood City, 1994. [8] Geoffrey C Fox, Steve W Otto, and Anthony JG Hey. Matrix algorithms on a hypercube I: Matrix multiplication. Parallel computing, 4(1):17–31, 1987. [9] Volker Strassen. Gaussian elimination is not optimal. Numerische Mathematik, 13(4):354–356, 1969. [10] Grey Ballard, James Demmel, Olga Holtz, and Oded Schwartz. Communication costs of strassen’s matrix multiplication. Communications of the ACM, 57(2):107–114, 2014. [11] Jeffrey Dean and Luiz André Barroso. The tail at scale. Communications of the ACM, 56(2):74– 80, 2013. [12] Konstantin Shvachko, Hairong Kuang, Sanjay Radia, and Robert Chansler. The Hadoop Distributed File System. In Proceedings IEEE Symposium on Mass Storage Systems and Technologies (MSST), pages 1–10, 2010. [13] Kuang-Hua Huang and Jacob A. Abraham. Algorithm-based fault tolerance for matrix operations. IEEE transactions on computers, 100(6):518–528, 1984. [14] Thomas Herault and Yves Robert. Fault-Tolerance Techniques for High Performance Computing. Springer, 2015. [15] William Ryan and Shu Lin. Channel codes: Classical and Modern. Cambridge University Press, 2009. [16] Songze Li, Mohammad Ali Maddah-Ali, and A Salman Avestimehr. A unified coding framework for distributed computing with straggling servers. arXiv:1609.01690v1 [cs.IT], 2016. [17] Ihab Nahlus, Eric P Kim, Naresh R Shanbhag, and David Blaauw. Energy-efficient Dot-Product Computation using a Switched Analog Circuit Architecture. In International Symposium on Low Power Electronics and Design (ISLPED), pages 315–318, 2014. [18] Ning C Wang, Sujan K Gonugondla, Ihab Nahlus, Naresh Shanbhag, and Eric Pop. GDOT: a Graphene-Based Nanofunction for Dot-Product Computation. In IEEE Symposium on VLSI Technology, 2016. [19] HTCondor. https://research.cs.wisc.edu/htcondor/. [20] Yann LeCun, Corinna Cortes, and Christopher JC Burges. The MNIST database of handwritten digits. http://yann.lecun.com/exdb/mnist, 1998. 9 | 2016 | 394 |
6,321 | SEBOOST – Boosting Stochastic Learning Using Subspace Optimization Techniques Elad Richardson*1 Rom Herskovitz*1 Boris Ginsburg2 Michael Zibulevsky1 1Technion, Israel Institute of Technology 2Nvidia INC {eladrich,mzib}@cs.technion.ac.il {fornoch,boris.ginsburg}@gmail.com Abstract We present SEBOOST, a technique for boosting the performance of existing stochastic optimization methods. SEBOOST applies a secondary optimization process in the subspace spanned by the last steps and descent directions. The method was inspired by the SESOP optimization method, and has been adapted for the stochastic learning. It can be applied on top of any existing optimization method with no need to tweak the internal algorithm. We show that the method is able to boost the performance of different algorithms, and make them more robust to changes in their hyper-parameters. As the boosting steps of SEBOOST are applied between large sets of descent steps, the additional subspace optimization hardly increases the overall computational burden. We introduce hyper-parameters that control the balance between the baseline method and the secondary optimization process. The method was evaluated on several deep learning tasks, demonstrating significant improvement in performance. Video presentation is given in [15] 1 Introduction Stochastic Gradient Descent (SGD) based optimization methods are widely used for many different learning problems. Given some objective function that we want to optimize, a vanilla gradient descent method would simply take some fixed step in the direction of the current gradient. In many learning problems the objective, or loss, function is averaged over the set of given training examples. In that scenario calculating the loss over the entire training set would be expensive, and is therefore approximated on a small batch, resulting in a stochastic algorithm that requires relatively few calculations per step. The simplicity and efficiency of SGD algorithms have made them a standard choice for many learning tasks, and specifically for deep learning [9, 6, 5, 10] . Although the vanilla SGD has no memory of previous steps, they are usually utilized in some way, for example using momentum [13]. Alternatively, the AdaGrad method uses the previous gradients in order to normalize each component in the new gradient adaptively [3], while the ADAM method uses them to estimate an adaptive moment [8]. In this work we utilize the knowledge of previous steps in spirit of the Sequential Subspace Optimization (SESOP) framework [11]. The nature of SESOP allows it to be easily merged with existing algorithms. Several such extensions were introduced over the years to different fields, such as PCD-SESOP and SSF-SESOP, showing state-of-the-art results in their matching fields [4, 17, 16]. The core idea of our method is as follows. At every outer iteration we first perform several steps of a baseline stochastic optimization algorithm which are then summed up as an inner cumulative stochastic step. Afterwards, we minimize the objective function over the affine subspace spanned by the cumulative stochastic step, several previous outer steps and optional other directions. The subspace optimization boosts the performance of the baseline algorithm, therefore our method is called the Sequential Subspace Optimization Boosting method (SEBOOST). *Equal contribution 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. 2 The algorithm As our algorithm tries to find the balance between SGD and SESOP, we start by a brief review of the original algorithms, and then move to the SEBOOST algorithm. 2.1 Vanilla SGD In many different large-scale optimization problems, applying complex optimization methods is not practical. Thus, popular optimization methods for those problems are usually based on a stochastic estimation of the gradient. Let minx∈Rn f(x) be some minimization problem, and let g(x) be the gradient of f(x). The general stochastic approach applies the following optimization rule xk+1 = xk −ηg∗(xk) where xi is the result of the ith iteration, η is the learning rate and g∗(xk) is an approximation of g(xk) obtained using only a small subset (mini-batch) of the training data. These stochastic descent methods have proved themselves in many different problems, specifically in the context of deep learning algorithms, providing a combination of simplicity and speed. Notice that the vanilla SGD algorithm has no memory of previous iterations. Different optimization methods which are based on SGD usually utilize the previous iterations in order to make a more informed descent process. 2.2 Vanilla SESOP The SEquential Subspace OPtimization Method [11, 16] is an optimization technique used for large scale optimization problems. The core idea of SESOP is to perform the optimization of the objective function in the subspace spanned by the current gradient direction and a set of directions obtained from the previous optimization steps. Following the notations in Section 2.1, a subspace structure for SESOP is usually defined based on the following directions: 1. Gradients: Current gradient and [optionally] older ones {g (xi) : i = k, k −1, . . . k −s1} 2. Previous directions: {pi = xi −xi−1 : i = k, k −1, . . . k −s2} In the SESOP formulation the current gradient and the last step are mandatory and any other set can be used to enrich the subspace. From a theoretical point of view, one can enrich the subspace by two Nemirovsky directions: A weighted average of the previous gradients and the direction to the starting point. This will provide optimal worst case complexity of the method (see also [12].) Denoting Pk as the set of directions at iteration k, the SESOP algorithm would solve the minimization problem αk = arg min α f (xk + Pkα) xk+1 = xk + Pkαk Thus SESOP reduces the optimization problem to the subspace spanned by Pk at each iteration. This means that instead of solving an optimization problem in Rn the dimensionality of the subspace is governed by the size of Pk and can be controlled. 2.3 The SEBOOST algorithm As explained in Section 2.1, when dealing with large-scale optimization problems, stochastic learning methods are usually better fitted to the task then many more involved optimization methods. However, when applied correctly those methods can still be used to boost the optimization process and achieve faster convergence rates. We propose to start with some SGD algorithm as a baseline, and then apply a SESOP-like optimization method over it in an alternating manner. The subspace for the SESOP algorithm arises from the descent directions of the baseline, utilizing the previous iterations. A description of the method is given in Algorithm 1. Note that the subset of the training data used for the secondary optimization in step 7 isn’t necessarily the same as that of the baseline in step 2, as will be shown in Section 3. Also, note that in step 8 the last added direction is changed, that is done in order to incorporate the step performed by the secondary optimization into the subspace. 2 Algorithm 1 The SEBOOST algorithm 1: for k = 1, . . . do 2: Perform ℓsteps of baseline stochastic optimization method to get from xk 0 to xk ℓ 3: Add the direction of the cumulative step xk ℓ−xk 0 to the optimization subspace P 4: if Subspace dimension exceeded the limit: dim(P) > M then 5: Remove oldest direction from the optimization subspace P 6: end if 7: Perform optimization over subspace P to get from xk ℓto xk+1 0 8: Change the last added direction to p = xk+1 0 −xk 0 9: end for It is clear that SEBOOST offers an attractive balance between the baseline stochastic steps and the more costly subspace optimizations. Firstly, as the number ℓof stochastic steps grows, the effect of subspace optimization over the result subsides, where taking ℓ→∞reduces the algorithm back to the baseline method. Secondly, the dimensionality of the subspace optimization problem is governed by the size of P and can be reduced to as few parameters as desired. Notice also that as SEBOOST is added on top of baseline stochastic optimization method, it does not require any internal changes to be made to the original algorithm. Thus, it can be applied on top of any such method with minimal implementation cost, while potentially boosting the base method. 2.4 Enriching the subspace Although the core elements of our optimization subspace are the directions of last M −1 external steps and the new stochastic cumulative direction, many more elements can be added to enrich the subspace. Anchor points As only the last (M −1) directions are saved in our subspace, the subspace has knowledge only of recent history of the optimization process. The subspace might benefit from directions dependent on preceding directions as well. For example, one could think of the overall descent achieved by the algorithm p = xk 0 −x0 0 as a possible direction, or the descent over the second half of the optimization process p = xk 0 −xk/2 0 . We formulate this idea by defining anchor points. Anchors points are locations chosen throughout the descent process which we fix and update only rarely. For each anchor point ai the direction p = xk 0 −ai is added to the subspace. Different techniques can be chosen for setting and changing the anchors. In our formulation each point is associated with a parameter ri which describes the number of boosting steps between each update of the point. After every ri steps the corresponding point ai is initialized back to the current x. That way we can control the number of iterations before an anchor point becomes irrelevant and is initialized again. Algorithm 2 shows how the anchor points can be added to Algorithm 1, by incorporating it before step 7. Current gradient As in the SESOP formulation, the gradient at the current point can be added to the subspace. Momentum Similarly to the idea of momentum in SGD methods one can save a weighted average of the previous updates and add it to the optimization subspace. Denoting the current momentum as mk and the last step as p = xk+1 0 −xk 0, the momentum is updated as mk+1 = µ·mk + p, where µ is some hyper-parameter, as in regular SGD momentum. Algorithm 2 Controlling anchors in SEBOOST 1: for i = 1, . . . , #anchors do 2: if ri%k == 0 then 3: Change the anchor ai to xk ℓ 4: end if 5: Normalize the direction p = xk ℓ−ai and add it to the subspace 6: end for 3 0 5 10 15 20 25 train time in seconds -5.5 -5 -4.5 -4 -3.5 -3 -2.5 logarithmic test error Simple Regression SGD SEBOOST-SGD NAG SEBOOST-NAG ADAGRAD SEBOOST-ADAGRAD 0 50 100 150 200 250 300 350 400 number of epochs -5.5 -5 -4.5 -4 -3.5 -3 -2.5 logarithmic test error Simple Regression SGD SEBOOST-SGD NAG SEBOOST-NAG ADAGRAD SEBOOST-ADAGRAD Figure 1: Results for experiment 3.1. The baseline parameters was set as lrSGD = 0.5, lrNAG = 0.1, lrAdaGrad = 0.05, which provided good convergence. SEBOOST’s parameters were fixed at M = 50 and ℓ= 100 with 50 function evaluations for the secondary optimization. 3 Experiments Following the recent rise of interest in deep learning tasks we focus our evaluation on different neural networks problems. We start with a small, yet challenging, regression problem and then proceed to the known problems of the MNIST autoencoder and CIFAR-10 classifier. For each problem we compare the results of baseline stochastic methods with our boosted variants, showing that SEBOOST can give significant improvement over the base method. Note that the purpose of our work is not to directly compete with existing methods, but rather to show that SEBOOST can improve each learning method compared to its’ original variant, while preserving the original qualities of these algorithms. The chosen baselines were SGD with momentum, Nesterov’s Accelerated Gradient (NAG) [13] and AdaGrad [3]. The Conjugate Gradient (CG) [7] was used for the subspace optimization. Our algorithm was implemented and evaluated using the Torch7 framework [1], and is publicly available 1. The main hyper-parameters that were altered during the experiments were: • lrmethod - The learning rate of a baseline method. • M - Maximal number of old directions. • ℓ- Number of baseline steps between each subspace optimization. For all experiments the weight decay was set at 0.0001 and the momentum was fixed at 0.9 for SGD and NAG. Unless stated otherwise, the number of function evaluations for CG was set at 20. The baseline method used a mini-batch of size 100, while the subspace optimization was applied with a mini-batch of size 1000. Note that subspace optimization is applied over a significantly larger batch. That is because while a “bad” stochastic step will be canceled by the next ones, a single secondary step has a bigger effect on the overall result and therefore requires better approximation of the gradient. As the boosting step is applied only between large sets of the base method, the added cost does not hinder the algorithm. For each experiment a different architecture will be defined. We will use the notation a →L b to denote a classic linear layer with a inputs and b outputs followed by a non-linear Tanh function. Notice that when presenting our results we show two different graphs. The right one always shows the error as a function of the number of passes of the baseline algorithms over the data (i.e. epochs), while the left one shows the error as a function of the actual processor time, taking into account the additional work required by the boosted algorithms. 3.1 Simple regression We will start by evaluating our method on a small regression problem. The dataset in question is a set of 20,000 values simulating some continuous function f : R6 →R. The dataset was divided 1https://github.com/eladrich/seboost 4 into 18,000 training examples and 2,000 test examples. The problem was solved using a tiny neural network with the architecture 6 →L 12 →L 8 →L 4 →L 1. Although the network size is very small the resulting optimization problem remains challenging and gives clear indication of SEBOOST’s behavior. Figure 1 shows the optimization process for the different methods. In all examples the boosted variant converged faster. Note that the different variants of SEBOOST behave differently, governed by the corresponding baseline. 3.2 MNIST autoencoder One of the classic neural network formulation is that of an autoencoder, a network that tries to learn efficient representation for a given set of data. An autoencoder is usually composed of two parts, the encoder which takes the input and produces the compact representation and the decoder which takes the representation and tries to reconstruct the original input. In our experiment the MNIST dataset was used, with 60,000 training images of size 28 × 28 and 10,000 test images. The encoder was defined as three layer network with an architecture of form 784 →L 200 →L 100 →L 64, with a matching decoder 64 →L 100 →L 200 →L 784. Figure 3 shows the optimization process for the autoencoder problem. A similar trend can be seen to that of experiment 3.1, SEBOOST is able to significantly improve SGD and NAG and shows some improvement over AdaGrad, although not as noticeable. A nice byproduct of working with an autoencoding problem is that one can visualize the quality of the reconstructions as a function of the iterations. Figure 2 shows the change in reconstructions quality for SGD and SESOP-SGD, and shows that the boosting achieved is significant in terms on the actual results. Original #10 #30 #100 #200 Original #10 #30 #100 #200 Figure 2: Reconstruction Results. The first row shows results of the SGD algorithm, while the second row shows results of SESOP-SGD. The last row gives the number of passes over the data. 3.3 CIFAR-10 classifier For classification purposes a standard benchmark is the CIFAR-10 dataset. The dataset is composed of 60,000 images of size 32 × 32 from 10 different classes, where each class has 6,000 different images. 50,000 images are used for training and 10,000 for testing. In order to check SEBOOST’s ability to deal with large and modern networks the ResNet [6] architecture, winner of the ILSVRC 2015 classification task, is used. 0 10 20 30 40 50 60 train time in seconds 0 0.05 0.1 0.15 0.2 0.25 0.3 MSE test error MNIST Autoencoder SGD SEBOOST-SGD NAG SEBOOST-NAG ADAGRAD SEBOOST-ADAGRAD 0 50 100 150 200 250 300 350 400 number of epochs 0 0.05 0.1 0.15 0.2 0.25 0.3 MSE test error MNIST Autoencoder SGD SEBOOST-SGD NAG SEBOOST-NAG ADAGRAD SEBOOST-ADAGRAD Figure 3: Results for experiment 3.2. The baseline parameters was set at lrSGD = 0.1, lrNAG = 0.01, lrAdaGrad = 0.01. SEBOOST’s parameters were fixed at M = 10 and ℓ= 200. 5 0 500 1000 1500 2000 2500 3000 train time in seconds 0 10 20 30 40 50 60 test error (%) CIFAR-10 Classification SGD SEBOOST-SGD NAG SEBOOST-NAG ADAGRAD SEBOOST-ADAGRAD 0 20 40 60 80 100 120 140 160 number of epochs 0 10 20 30 40 50 60 test error (%) CIFAR-10 Classification SGD SEBOOST-SGD NAG SEBOOST-NAG ADAGRAD SEBOOST-ADAGRAD Figure 4: Results for experiment 3.3. All baselines were set with lr = 0.1 and a mini-batch of size 128. SEBOOST’s parameters were fixed at M = 10 and ℓ= 391, with a mini-batch of size 1024. Figure 4 shows the optimization process and the achieved accuracy for ResNet of depth 32. Note that we did not manually tweak the learning rate as was done in the original paper. While AdaGrad is not boosted for this experiment, SGD and NAG achieve significant boosting and reach a better minimum. The boosting step was applied only once every epoch, applying too frequent boosting steps resulted in a less stable optimization and higher minima, while applying infrequent steps also lead to higher minima. Experiment 3.4 shows similar results for MNIST and discusses them. 3.4 Understanding the hyper-parameters SEBOOST introduces two hyper-parameters: ℓthe number of baseline steps between each subspace optimization and M the number of old directions to use. The purpose of the following two experiments is to measure the effect of those parameters on the achieved result and to give some intuition as to their meaning. All experiments are based on the MNIST autoencoder problem defined in Section 3.2. First, let us consider the parameter ℓ, which controls the balance between the baseline SGD algorithm and the more involved optimization process. Taking small values of ℓresults in more steps of the secondary optimization process, however each direction in the subspace is then composed of fewer steps from the stochastic algorithm, making it less stable. Furthermore, recalling that our secondary optimization is more costly than regular optimization steps, applying it too often would hinder the algorithm’s performance. On the other hand, taking large values of ℓweakens the effect of SEBOOST over the baseline algorithm. Figure 5a shows how ℓaffects the optimization process. One can see that applying the subspace optimization too frequently increases the algorithm’s runtime and reaches an higher minimum than the other variants, as expected. Although taking a large value of ℓreaches a better minimum, taking a value which is too large slows the algorithm. We can see that for this experiment taking ℓ= 200 balances correctly the trade-offs. 0 20 40 60 80 100 120 train time in seconds 0.05 0.1 0.15 0.2 0.25 0.3 MSE test error MNIST Autoencoder - Baseline Steps NAG SEBOOST-NAG-50 SEBOOST-NAG-200 SEBOOST-NAG-800 (a) 0 20 40 60 80 100 120 train time in seconds 0.05 0.1 0.15 0.2 0.25 0.3 MSE test error MNIST Autoencoder - History Size NAG SEBOOST-NAG-5 SEBOOST-NAG-10 SEBOOST-NAG-20 SEBOOST-NAG-50 (b) Figure 5: Experiment 3.4, analyzing different changes in SEBOOST’s hyper-parameters 6 20 40 60 80 100 120 train time in seconds 0.05 0.1 0.15 0.2 0.25 0.3 MSE test error MNIST Autoencoder - Learning Rate NAG-0.05 SEBOOST-NAG-0.05 NAG-0.01 SEBOOST-NAG-0.01 NAG-0.005 SEBOOST-NAG-0.005 (a) 0 20 40 60 80 100 120 train time in seconds 0.05 0.1 0.15 0.2 0.25 0.3 MSE test error MNIST Autoencoder - Extra Directions NAG SEBOOST-NAG-basic SEBOOST-NAG-momentum SEBOOST-NAG-anchors SESOP-NAG-both (b) Figure 6: Experiment 3.5, analyzing different changes in SEBOOST’s subspace Let us now consider the effect of M, which governs the size of the subspace in which the secondary optimization is applied. Although taking large values of M allows us to hold more directions and apply the optimization in a larger subspace it also makes the optimization process more involved. Figure 5b shows how M affects the optimization process. Interestingly, the lower M is, the faster the algorithm starts descending. However, larger M values tend to reach better minima. For M = 20 the algorithm reaches the same minimum as M = 50, but starts the descent process faster, making it a good choice for this experiment. To conclude, the introduced hyper-parameters M and ℓaffect the overall boosting effect achieved by SEBOOST. Both parameters incorporate different trade-offs of the optimization problem and should be considered when using the algorithm. Our own experiments show that a good initialization would be to set ℓso the algorithm runs about once or twice per epoch, and to set M between 10 to 20. 3.5 Investigating the subspace One of the key components of SEBOOST is the structure of the subspace in which the optimization is applied. The purpose of the following two experiments is to see how changes in the baseline algorithm, or the addition of more directions, affect the algorithm. All experiments are based on the MNIST autoencoder problem defined in Section 3.2. In the basic formulation of SEBOOST the subspace is composed only from the directions of the baseline algorithm. In Section 3.2 we saw how choosing different baselines affect the algorithm. Another experiment of interest is to see how our algorithm is influenced by changes in the hyperparameters of the baseline algorithm. Figure 6a shows the effect of the learning rate over the baseline algorithms and their boosted variants. It can be seen that the change in the original baseline affects our algorithm, however the impact is noticeably smaller, showing that the algorithm has some robustness to the original learning rate. In Section 2.4 a set of additional directions which can be added to the subspace were defined, these directions can possibly enrich the subspace and improve the optimization process. Figure 6b shows the influence of those directions on the overall result. In SEBOOST-anchors a set of anchor points were added with the r values of 500, 250, 100, 50 and 20. In SEBOOST-momnetum a momentum vector with µ = 0.9 was used. It can be seen that using the proposed anchor directions can significantly boost the algorithm. The momentum direction is less useful, giving a small boost on its own and actually slightly hinders the performance when used in conjunction with the anchor directions. 4 Conclusion In this paper we presented SEBOOST, a technique for boosting stochastic learning algorithms via a secondary optimization process. The secondary optimization is applied in the subspace spanned by the preceding descent steps, which can be further extended with additional directions. We evaluated SEBOOST on different deep learning tasks, showing the achieved results of our methods compared to their original baselines. We believe that the flexibility of SEBOOST could make it useful for different learning tasks. One can easily change the frequency of the secondary optimization step, ranging from 7 frequent and more risky steps, to the more stable one step per epoch. Changing the baseline algorithm and the structure of the subspace allows us to further alter SEBOOST’s behavior. Although this is not the focus of our work, an interesting research direction for SEBOOST is that of parallel computing. Similarly to [2, 14], one can look at a framework composed of a single master and a set of workers, where each worker optimizes a local model and the master saves a global set of parameters which is based on the workers. Inspired by SEBOOST, one can take the descent directions from each of the workers and apply a subspace optimization in the spanned subspace, allowing the master to take a more efficient step based on information from each of its workers. Another interesting direction for future work is the investigation of pruning techniques. In our work, when the subspace if fully occupied the oldest direction is simply removed. One might consider more advanced pruning techniques, such as eliminating the direction which contributed the least for the secondary optimization step, or even randomly removing one of the subspace directions. A good pruning technique can potentially have a significant effect on the overall result. These two ideas will be further researched in future work. Overall, we believe SEBOOST provides a promising balance between popular stochastic descent methods and more involved optimization techniques. Acknowledgements The research leading to these results has received funding from the European Research Council under European Unions Seventh Framework Program, ERC Grant agreement no. 320649 and was supported by the Intel Collaborative Research Institute for Computational Intelligence (ICRI-CI). References [1] Ronan Collobert, Koray Kavukcuoglu, and Cl´ement Farabet. Torch7: A matlab-like environment for machine learning. In BigLearn, NIPS Workshop, number EPFL-CONF-192376, 2011. [2] Jeffrey Dean, Greg Corrado, Rajat Monga, Kai Chen, Matthieu Devin, Mark Mao, Andrew Senior, Paul Tucker, Ke Yang, Quoc V Le, et al. Large scale distributed deep networks. In Advances in Neural Information Processing Systems, pages 1223–1231, 2012. [3] 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. [4] Michael Elad, Boaz Matalon, and Michael Zibulevsky. Coordinate and subspace optimization methods for linear least squares with non-quadratic regularization. Applied and Computational Harmonic Analysis, 23(3):346–367, 2007. [5] Ross Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 580–587, 2014. [6] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. arXiv preprint arXiv:1512.03385, 2015. [7] Magnus Rudolph Hestenes and Eduard Stiefel. Methods of conjugate gradients for solving linear systems, volume 49. NBS, 1952. [8] Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. [9] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097–1105, 2012. [10] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3431–3440, 2015. [11] Guy Narkiss and Michael Zibulevsky. Sequential subspace optimization method for large-scale unconstrained problems. Technion-IIT, Department of Electrical Engineering, 2005. 8 [12] Arkadi Nemirovski. Orth-method for smooth convex optimization. Izvestia AN SSSR, Transl.: Eng. Cybern. Soviet J. Comput. Syst. Sci, 2:937–947, 1982. [13] Ilya Sutskever, James Martens, George Dahl, and Geoffrey Hinton. On the importance of initialization and momentum in deep learning. In Proceedings of the 30th international conference on machine learning (ICML-13), pages 1139–1147, 2013. [14] Sixin Zhang, Anna E Choromanska, and Yann LeCun. Deep learning with elastic averaging sgd. In Advances in Neural Information Processing Systems, pages 685–693, 2015. [15] Michael Zibulevsky. SESOP - Sequential Subspace Optimization framework. Video presentations, https://www.youtube.com/playlist?list=PLH39kM3nuavf2Hkr-gBAMBX7EPMB2kUqw. [16] Michael Zibulevsky. Speeding-up convergence via sequential subspace optimization: Current state and future directions. arXiv preprint arXiv:1401.0159, 2013. [17] Michael Zibulevsky and Michael Elad. L1-l2 optimization in signal and image processing. Signal Processing Magazine, IEEE, 27(3):76–88, 2010. 9 | 2016 | 395 |
6,322 | VIME: Variational Information Maximizing Exploration Rein Houthooft§†‡, Xi Chen†‡, Yan Duan†‡, John Schulman†‡, Filip De Turck§, Pieter Abbeel†‡ † UC Berkeley, Department of Electrical Engineering and Computer Sciences § Ghent University - imec, Department of Information Technology ‡ OpenAI Abstract Scalable and effective exploration remains a key challenge in reinforcement learning (RL). While there are methods with optimality guarantees in the setting of discrete state and action spaces, these methods cannot be applied in high-dimensional deep RL scenarios. As such, most contemporary RL relies on simple heuristics such as ϵ-greedy exploration or adding Gaussian noise to the controls. This paper introduces Variational Information Maximizing Exploration (VIME), an exploration strategy based on maximization of information gain about the agent’s belief of environment dynamics. We propose a practical implementation, using variational inference in Bayesian neural networks which efficiently handles continuous state and action spaces. VIME modifies the MDP reward function, and can be applied with several different underlying RL algorithms. We demonstrate that VIME achieves significantly better performance compared to heuristic exploration methods across a variety of continuous control tasks and algorithms, including tasks with very sparse rewards. 1 Introduction Reinforcement learning (RL) studies how an agent can maximize its cumulative reward in a previously unknown environment, which it learns about through experience. A long-standing problem is how to manage the trade-off between exploration and exploitation. In exploration, the agent experiments with novel strategies that may improve returns in the long run; in exploitation, it maximizes rewards through behavior that is known to be successful. An effective exploration strategy allows the agent to generate trajectories that are maximally informative about the environment. For small tasks, this trade-off can be handled effectively through Bayesian RL [1] and PAC-MDP methods [2–6], which offer formal guarantees. However, these guarantees assume discrete state and action spaces. Hence, in settings where state-action discretization is infeasible, many RL algorithms use heuristic exploration strategies. Examples include acting randomly using ϵ-greedy or Boltzmann exploration [7], and utilizing Gaussian noise on the controls in policy gradient methods [8]. These heuristics often rely on random walk behavior which can be highly inefficient, for example Boltzmann exploration requires a training time exponential in the number of states in order to solve the well-known n-chain MDP [9]. In between formal methods and simple heuristics, several works have proposed to address the exploration problem using less formal, but more expressive methods [10–14]. However, none of them fully address exploration in continuous control, as discretization of the state-action space scales exponentially in its dimensionality. For example, the Walker2D task [15] has a 26-dim state-action space. If we assume a coarse discretization into 10 bins for each dimension, a table of state-action visitation counts would require 1026 entries. This paper proposes a curiosity-driven exploration strategy, making use of information gain about the agent’s internal belief of the dynamics model as a driving force. This principle can be traced back to the concepts of curiosity and surprise [16–18]. Within this framework, agents are encouraged to take actions that result in states they deem surprising—i.e., states that cause large updates to the dynamics model distribution. We propose a practical implementation of measuring information gain using variational inference. Herein, the agent’s current understanding of the environment dynamics is represented by a Bayesian neural networks (BNN) [19, 20]. We also show how this can be interpreted as measuring compression improvement, a proposed model of curiosity [21]. In contrast to previous curiosity-based approaches [10, 22], our model scales naturally to continuous state and action spaces. The presented approach is evaluated on a range of continuous control tasks, and multiple underlying RL algorithms. Experimental results show that VIME achieves significantly better performance than naïve exploration strategies. 2 Methodology In Section 2.1, we establish notation for the subsequent equations. Next, in Section 2.2, we explain the theoretical foundation of curiosity-driven exploration. In Section 2.3 we describe how to adapt this idea to continuous control, and we show how to build on recent advances in variational inference for Bayesian neural networks (BNNs) to make this formulation practical. Thereafter, we make explicit the intuitive link between compression improvement and the variational lower bound in Section 2.4. Finally, Section 2.5 describes how our method is practically implemented. 2.1 Preliminaries This paper assumes a finite-horizon discounted Markov decision process (MDP), defined by (S, A, P, r, ρ0, γ, T), in which S ⊆Rn is a state set, A ⊆Rm an action set, P : S × A × S →R≥0 a transition probability distribution, r : S × A →R a bounded reward function, ρ0 : S →R≥0 an initial state distribution, γ ∈(0, 1] a discount factor, and T the horizon. States and actions viewed as random variables are abbreviated as S and A. The presented models are based on the optimization of a stochastic policy πα : S × A →R≥0, parametrized by α. Let µ(πα) denote its expected discounted return: µ(πα) = Eτ[PT t=0 γtr(st, at)], where τ = (s0, a0, . . .) denotes the whole trajectory, s0 ∼ρ0(s0), at ∼πα(at|st), and st+1 ∼P(st+1|st, at). 2.2 Curiosity Our method builds on the theory of curiosity-driven exploration [16, 17, 21, 22], in which the agent engages in systematic exploration by seeking out state-action regions that are relatively unexplored. The agent models the environment dynamics via a model p(st+1|st, at; θ), parametrized by the random variable Θ with values θ ∈Θ. Assuming a prior p(θ), it maintains a distribution over dynamic models through a distribution over θ, which is updated in a Bayesian manner (as opposed to a point estimate). The history of the agent up until time step t is denoted as ξt = {s1, a1, . . . , st}. According to curiosity-driven exploration [17], the agent should take actions that maximize the reduction in uncertainty about the dynamics. This can be formalized as maximizing the sum of reductions in entropy P t (H(Θ|ξt, at) −H(Θ|St+1, ξt, at)) , (1) through a sequence of actions {at}. According to information theory, the individual terms equal the mutual information between the next state distribution St+1 and the model parameter Θ, namely I (St+1; Θ|ξt, at). Therefore, the agent is encouraged to take actions that lead to states that are maximally informative about the dynamics model. Furthermore, we note that I (St+1; Θ|ξt, at) = Est+1∼P(·|ξt,at) DKL[p(θ|ξt, at, st+1)∥p(θ|ξt)] , (2) the KL divergence from the agent’s new belief over the dynamics model to the old one, taking expectation over all possible next states according to the true dynamics P. This KL divergence can be interpreted as information gain. 2 If calculating the posterior dynamics distribution is tractable, it is possible to optimize Eq. (2) directly by maintaining a belief over the dynamics model [17]. However, this is not generally the case. Therefore, a common practice [10, 23] is to use RL to approximate planning for maximal mutual information along a trajectory P t I (St+1; Θ|ξt, at) by adding each term I (St+1; Θ|ξt, at) as an intrinsic reward, which captures the agent’s surprise in the form of a reward function. This is practically realized by taking actions at ∼πα(st) and sampling st+1 ∼P(·|st, at) in order to add DKL[p(θ|ξt, at, st+1)∥p(θ|ξt)] to the external reward. The trade-off between exploitation and exploration can now be realized explicitly as follows: r′(st, at, st+1) = r(st, at) + ηDKL[p(θ|ξt, at, st+1)∥p(θ|ξt)], (3) with η ∈R+ a hyperparameter controlling the urge to explore. In conclusion, the biggest practical issue with maximizing information gain for exploration is that the computation of Eq. (3) requires calculating the posterior p(θ|ξt, at, st+1), which is generally intractable. 2.3 Variational Bayes We propose a tractable solution to maximize the information gain objective presented in the previous section. In a purely Bayesian setting, we can derive the posterior distribution given a new state-action pair through Bayes’ rule as p(θ|ξt, at, st+1) = p(θ|ξt)p(st+1|ξt, at; θ) p(st+1|ξt, at) , (4) with p(θ|ξt, at) = p(θ|ξt) as actions do not influence beliefs about the environment [17]. Herein, the denominator is computed through the integral p(st+1|ξt, at) = Z Θ p(st+1|ξt, at; θ)p(θ|ξt)dθ. (5) In general, this integral tends to be intractable when using highly expressive parametrized models (e.g., neural networks), which are often needed to accurately capture the environment model in high-dimensional continuous control. We propose a practical solution through variational inference [24]. Herein, we embrace the fact that calculating the posterior p(θ|D) for a data set D is intractable. Instead we approximate it through an alternative distribution q(θ; φ), parameterized by φ, by minimizing DKL[q(θ; φ)∥p(θ|D)]. This is done through maximization of the variational lower bound L[q(θ; φ), D]: L[q(θ; φ), D] = Eθ∼q(·;φ) [log p(D|θ)] −DKL[q(θ; φ)∥p(θ)]. (6) Rather than computing information gain in Eq. (3) explicitly, we compute an approximation to it, leading to the following total reward: r′(st, at, st+1) = r(st, at) + ηDKL[q(θ; φt+1)∥q(θ; φt)], (7) with φt+1 the updated and φt the old parameters representing the agent’s belief. Natural candidates for parametrizing the agent’s dynamics model are Bayesian neural networks (BNNs) [19], as they maintain a distribution over their weights. This allows us to view the BNN as an infinite neural network ensemble by integrating out its parameters: p(y|x) = Z Θ p(y|x; θ)q(θ; φ)dθ. (8) In particular, we utilize a BNN parametrized by a fully factorized Gaussian distribution [20]. Practical BNN implementation details are deferred to Section 2.5, while we give some intuition into the behavior of BNNs in the appendix. 2.4 Compression It is possible to derive an interesting relationship between compression improvement—an intrinsic reward objective defined in [25], and the information gain of Eq. (2). In [25], the agent’s curiosity is 3 equated with compression improvement, measured through C(ξt; φt−1) −C(ξt; φt), where C(ξ; φ) is the description length of ξ using φ as a model. Furthermore, it is known that the negative variational lower bound can be viewed as the description length [19]. Hence, we can write compression improvement as L[q(θ; φt), ξt] −L[q(θ; φt−1), ξt]. In addition, an alternative formulation of the variational lower bound in Eq. (6) is given by log p(D) = L[q(θ;φ),D] z }| { Z Θ q(θ; φ) log p(θ, D) q(θ; φ) dθ +DKL[q(θ; φ)∥p(θ|D)]. (9) Thus, compression improvement can now be written as (log p(ξt) −DKL[q(θ; φt)∥p(θ|ξt)]) −(log p(ξt) −DKL[q(θ; φt−1)∥p(θ|ξt)]) . (10) If we assume that φt perfectly optimizes the variational lower bound for the history ξt, then DKL[q(θ; φt)∥p(θ|ξt)] = 0, which occurs when the approximation equals the true posterior, i.e., q(θ; φt) = p(θ|ξt). Hence, compression improvement becomes DKL[p(θ|ξt−1)∥p(θ|ξt)]. Therefore, optimizing for compression improvement comes down to optimizing the KL divergence from the posterior given the past history ξt−1 to the posterior given the total history ξt. As such, we arrive at an alternative way to encode curiosity than information gain, namely DKL[p(θ|ξt)∥p(θ|ξt, at, st+1)], its reversed KL divergence. In experiments, we noticed no significant difference between the two KL divergence variants. This can be explained as both variants are locally equal when introducing small changes to the parameter distributions. Investigation of how to combine both information gain and compression improvement is deferred to future work. 2.5 Implementation The complete method is summarized in Algorithm 1. We first set forth implementation and parametrization details of the dynamics BNN. The BNN weight distribution q(θ; φ) is given by the fully factorized Gaussian distribution [20]: q(θ; φ) = Q|Θ| i=1 N(θi|µi; σ2 i ). (11) Hence, φ = {µ, σ}, with µ the Gaussian’s mean vector and σ the covariance matrix diagonal. This is particularly convenient as it allows for a simple analytical formulation of the KL divergence. This is described later in this section. Because of the restriction σ > 0, the standard deviation of the Gaussian BNN parameter is parametrized as σ = log(1 + eρ), with ρ ∈R [20]. Now the training of the dynamics BNN through optimization of the variational lower bound is described. The second term in Eq. (6) is approximated through sampling Eθ∼q(·;φ) [log p(D|θ)] ≈ 1 N PN i=1 log p(D|θi) with N samples drawn according to θ ∼q(·; φ) [20]. Optimizing the variational lower bound in Eq. (6) in combination with the reparametrization trick is called stochastic gradient variational Bayes (SGVB) [26] or Bayes by Backprop [20]. Furthermore, we make use of the local reparametrization trick proposed in [26], in which sampling at the weights is replaced by sampling the neuron pre-activations, which is more computationally efficient and reduces gradient variance. The optimization of the variational lower bound is done at regular intervals during the RL training process, by sampling D from a FIFO replay pool that stores recent samples (st, at, st+1). This is to break up the strong intratrajectory sample correlation which destabilizes learning in favor of obtaining i.i.d. data [7]. Moreover, it diminishes the effect of compounding posterior approximation errors. The posterior distribution of the dynamics parameter, which is needed to compute the KL divergence in the total reward function r′ of Eq. (7), can be computed through the following minimization φ′ = arg min φ h ℓ(q(θ;φ),st) z }| { DKL[q(θ; φ)∥q(θ; φt−1)] | {z } ℓKL(q(θ;φ)) −Eθ∼q(·;φ) [log p(st|ξt, at; θ)] i , (12) where we replace the expectation over θ with samples θ ∼q(·; φ). Because we only update the model periodically based on samples drawn from the replay pool, this optimization can be performed in parallel for each st, keeping φt−1 fixed. Once φ′ has been obtained, we can use it to compute the intrinsic reward. 4 Algorithm 1: Variational Information Maximizing Exploration (VIME) for each epoch n do for each timestep t in each trajectory generated during n do Generate action at ∼πα(st) and sample state st+1 ∼P(·|ξt, at), get r(st, at). Add triplet (st, at, st+1) to FIFO replay pool R. Compute DKL[q(θ; φ′ n+1)∥q(θ; φn+1)] by approximation ∇⊤H−1∇, following Eq. (16) for diagonal BNNs, or by optimizing Eq. (12) to obtain φ′ n+1 for general BNNs. Divide DKL[q(θ; φ′ n+1)∥q(θ; φn+1)] by median of previous KL divergences. Construct r′(st, at, st+1) ←r(st, at) + ηDKL[q(θ; φ′ n+1)∥q(θ; φn+1)], following Eq. (7). Minimize DKL[q(θ; φn)∥p(θ)] −Eθ∼q(·;φn) [log p(D|θ)] following Eq. (6), with D sampled randomly from R, leading to updated posterior q(θ; φn+1). Use rewards {r′(st, at, st+1)} to update policy πα using any standard RL method. To optimize Eq. (12) efficiently, we only take a single second-order step. This way, the gradient is rescaled according to the curvature of the KL divergence at the origin. As such, we compute DKL[q(θ; φ + λ∆φ)∥q(θ; φ)], with the update step ∆φ defined as ∆φ = H−1(ℓ)∇φℓ(q(θ; φ), st), (13) in which H(ℓ) is the Hessian of ℓ(q(θ; φ), st). Since we assume that the variational approximation is a fully factorized Gaussian, the KL divergence from posterior to prior has a particularly simple form: DKL[q(θ; φ)∥q(θ; φ′)] = 1 2 P|Θ| i=1 σi σ′ i 2 + 2 log σ′ i −2 log σi + (µ′ i−µi)2 σ′2 i −|Θ| 2 . (14) Because this KL divergence is approximately quadratic in its parameters and the log-likelihood term can be seen as locally linear compared to this highly curved KL term, we approximate H by only calculating it for the term KL term ℓKL(q(θ; φ)). This can be computed very efficiently in case of a fully factorized Gaussian distribution, as this approximation becomes a diagonal matrix. Looking at Eq. (14), we can calculate the following Hessian at the origin. The µ and ρ entries are defined as ∂2ℓKL ∂µ2 i = 1 log2(1 + eρi) and ∂2ℓKL ∂ρ2 i = 2e2ρi (1 + eρi)2 1 log2(1 + eρi), (15) while all other entries are zero. Furthermore, it is also possible to approximate the KL divergence through a second-order Taylor expansion as 1 2∆φH∆φ = 1 2 H−1∇ ⊤H H−1∇ , since both the value and gradient of the KL divergence are zero at the origin. This gives us DKL[q(θ; φ + λ∆φ)∥q(θ; φ)] ≈1 2λ2∇φℓ⊤H−1(ℓKL)∇φℓ. (16) Note that H−1(ℓKL) is diagonal, so this expression can be computed efficiently. Instead of using the KL divergence DKL[q(θ; φt+1)∥q(θ; φt)] directly as an intrinsic reward in Eq. (7), we normalize it by division through the average of the median KL divergences taken over a fixed number of previous trajectories. Rather than focusing on its absolute value, we emphasize relative difference in KL divergence between samples. This accomplishes the same effect since the variance of KL divergence converges to zero, once the model is fully learned. 3 Experiments In this section, we investigate (i) whether VIME can succeed in domains that have extremely sparse rewards, (ii) whether VIME improves learning when the reward is shaped to guide the agent towards its goal, and (iii) how η, as used in in Eq. (3), trades off exploration and exploitation behavior. All experiments make use of the rllab [15] benchmark code base and the complementary continuous control tasks suite. The following tasks are part of the experimental setup: CartPole (S ⊆R4, A ⊆R1), CartPoleSwingup (S ⊆R4, A ⊆R1), DoublePendulum (S ⊆R6, A ⊆R1), MountainCar (S ⊆R3, A ⊆R1), locomotion tasks HalfCheetah (S ⊆R20, A ⊆R6), Walker2D (S ⊆R20, A ⊆R6), and the hierarchical task SwimmerGather (S ⊆R33, A ⊆R2). 5 Performance is measured through the average return (not including the intrinsic rewards) over the trajectories generated (y-axis) at each iteration (x-axis). More specifically, the darker-colored lines in each plot represent the median performance over a fixed set of 10 random seeds while the shaded areas show the interquartile range at each iteration. Moreover, the number in each legend shows this performance measure, averaged over all iterations. The exact setup is described in the Appendix. (a) MountainCar (b) CartPoleSwingup (c) HalfCheetah (d) state space Figure 1: (a,b,c) TRPO+VIME versus TRPO on tasks with sparse rewards; (d) comparison of TRPO+VIME (red) and TRPO (blue) on MountainCar: visited states until convergence Domains with sparse rewards are difficult to solve through naïve exploration behavior because, before the agent obtains any reward, it lacks a feedback signal on how to improve its policy. This allows us to test whether an exploration strategy is truly capable of systematic exploration, rather than improving existing RL algorithms by adding more hyperparameters. Therefore, VIME is compared with heuristic exploration strategies on the following tasks with sparse rewards. A reward of +1 is given when the car escapes the valley on the right side in MountainCar; when the pole is pointed upwards in CartPoleSwingup; and when the cheetah moves forward over five units in HalfCheetah. We compare VIME with the following baselines: only using Gaussian control noise [15] and using the ℓ2 BNN prediction error as an intrinsic reward, a continuous extension of [10]. TRPO [8] is used as the RL algorithm, as it performs very well compared to other methods [15]. Figure 1 shows the performance results. We notice that using a naïve exploration performs very poorly, as it is almost never able to reach the goal in any of the tasks. Similarly, using ℓ2 errors does not perform well. In contrast, VIME performs much better, achieving the goal in most cases. This experiment demonstrates that curiosity drives the agent to explore, even in the absence of any initial reward, where naïve exploration completely breaks down. To further strengthen this point, we have evaluated VIME on the highly difficult hierarchical task SwimmerGather in Figure 5 whose reward signal is naturally sparse. In this task, a two-link robot needs to reach “apples” while avoiding “bombs” that are perceived through a laser scanner. However, before it can make any forward progress, it has to learn complex locomotion primitives in the absence of any reward. None of the RL methods tested previously in [15] were able to make progress with naïve exploration. Remarkably, VIME leads the agent to acquire coherent motion primitives without any reward guidance, achieving promising results on this challenging task. Next, we investigate whether VIME is widely applicable by (i) testing it on environments where the reward is well shaped, and (ii) pairing it with different RL methods. In addition to TRPO, we choose to equip REINFORCE [27] and ERWR [28] with VIME because these two algorithms usually suffer from premature convergence to suboptimal policies [15, 29], which can potentially be alleviated by better exploration. Their performance is shown in Figure 2 on several well-established continuous control tasks. Furthermore, Figure 3 shows the same comparison for the Walker2D locomotion task. In the majority of cases, VIME leads to a significant performance gain over heuristic exploration. Our exploration method allows the RL algorithms to converge faster, and notably helps REINFORCE and ERWR avoid converging to a locally optimal solution on DoublePendulum and MountainCar. We note that in environments such as CartPole, a better exploration strategy is redundant as following the policy gradient direction leads to the globally optimal solution. Additionally, we tested adding Gaussian noise to the rewards as a baseline, which did not improve performance. To give an intuitive understanding of VIME’s exploration behavior, the distribution of visited states for both naïve exploration and VIME after convergence is investigated. Figure 1d shows that using Gaussian control noise exhibits random walk behavior: the state visitation plot is more condensed and ball-shaped around the center. In comparison, VIME leads to a more diffused visitation pattern, exploring the states more efficiently, and hence reaching the goal more quickly. 6 (a) CartPole (b) CartPoleSwingup (c) DoublePendulum (d) MountainCar Figure 2: Performance of TRPO (top row), ERWR (middle row), and REINFORCE (bottom row) with (+VIME) and without exploration for different continuous control tasks. Figure 3: Performance of TRPO with and without VIME on the high-dimensional Walker2D locomotion task. Figure 4: VIME: performance over the first few iterations for TRPO, REINFORCE, and ERWR i.f.o. η on MountainCar. Figure 5: Performance of TRPO with and without VIME on the challenging hierarchical task SwimmerGather. Finally, we investigate how η, as used in in Eq. (3), trades off exploration and exploitation behavior. On the one hand, higher η values should lead to a higher curiosity drive, causing more exploration. On the other hand, very low η values should reduce VIME to traditional Gaussian control noise. Figure 4 shows the performance on MountainCar for different η values. Setting η too high clearly results in prioritizing exploration over getting additional external reward. Too low of an η value reduces the method to the baseline algorithm, as the intrinsic reward contribution to the total reward r′ becomes negligible. Most importantly, this figure highlights that there is a wide η range for which the task is best solved, across different algorithms. 4 Related Work A body of theoretically oriented work demonstrates exploration strategies that are able to learn online in a previously unknown MDP and incur a polynomial amount of regret—as a result, these algorithms find a near-optimal policy in a polynomial amount of time. Some of these algorithms are based on the principle of optimism under uncertainty: E3 [3], R-Max [4], UCRL [30]. An alternative approach is Bayesian reinforcement learning methods, which maintain a distribution over possible MDPs [1, 17, 23, 31]. The optimism-based exploration strategies have been extended to continuous state spaces, for example, [6, 9], however these methods do not accommodate nonlinear function approximators. Practical RL algorithms often rely on simple exploration heuristics, such as ϵ-greedy and Boltzmann exploration [32]. However, these heuristics exhibit random walk exploratory behavior, which can lead 7 to exponential regret even in case of small MDPs [9]. Our proposed method of utilizing information gain can be traced back to [22], and has been further explored in [17, 33, 34]. Other metrics for curiosity have also been proposed, including prediction error [10, 35], prediction error improvement [36], leverage [14], neuro-correlates [37], and predictive information [38]. These methods have not been applied directly to high-dimensional continuous control tasks without discretization. We refer the reader to [21, 39] for an extensive review on curiosity and intrinsic rewards. Recently, there have been various exploration strategies proposed in the context of deep RL. [10] proposes to use the ℓ2 prediction error as the intrinsic reward. [12] performs approximate visitation counting in a learned state embedding using Gaussian kernels. [11] proposes a form of Thompson sampling, training multiple value functions using bootstrapping. Although these approaches can scale up to high-dimensional state spaces, they generally assume discrete action spaces. [40] make use of mutual information for gait stabilization in continuous control, but rely on state discretization. Finally, [41] proposes a variational method for information maximization in the context of optimizing empowerment, which, as noted by [42], does not explicitly favor exploration. 5 Conclusions We have proposed Variational Information Maximizing Exploration (VIME), a curiosity-driven exploration strategy for continuous control tasks. Variational inference is used to approximate the posterior distribution of a Bayesian neural network that represents the environment dynamics. Using information gain in this learned dynamics model as intrinsic rewards allows the agent to optimize for both external reward and intrinsic surprise simultaneously. Empirical results show that VIME performs significantly better than heuristic exploration methods across various continuous control tasks and algorithms. As future work, we would like to investigate measuring surprise in the value function and using the learned dynamics model for planning. Acknowledgments This work was supported in part by DARPA, the Berkeley Vision and Learning Center (BVLC), the Berkeley Artificial Intelligence Research (BAIR) laboratory, Berkeley Deep Drive (BDD), and ONR through a PECASE award. Rein Houthooft is supported by a Ph.D. Fellowship of the Research Foundation - Flanders (FWO). Xi Chen was also supported by a Berkeley AI Research lab Fellowship. Yan Duan was also supported by a Berkeley AI Research lab Fellowship and a Huawei Fellowship. References [1] M. Ghavamzadeh, S. Mannor, J. Pineau, and A. Tamar, “Bayesian reinforcement learning: A survey”, Found. Trends. Mach. Learn., vol. 8, no. 5-6, pp. 359–483, 2015. [2] S. Kakade, M. Kearns, and J. Langford, “Exploration in metric state spaces”, in ICML, vol. 3, 2003, pp. 306–312. [3] M. Kearns and S. Singh, “Near-optimal reinforcement learning in polynomial time”, Mach. Learn., vol. 49, no. 2-3, pp. 209–232, 2002. [4] R. I. Brafman and M. Tennenholtz, “R-Max - a general polynomial time algorithm for near-optimal reinforcement learning”, J. Mach. Learn. Res., vol. 3, pp. 213–231, 2003. [5] P. Auer, “Using confidence bounds for exploitation-exploration trade-offs”, J. Mach. Learn. Res., vol. 3, pp. 397–422, 2003. [6] J. Pazis and R. Parr, “PAC optimal exploration in continuous space Markov decision processes”, in AAAI, 2013. [7] 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, vol. 518, no. 7540, pp. 529–533, 2015. [8] J. Schulman, S. Levine, P. Moritz, M. I. Jordan, and P. Abbeel, “Trust region policy optimization”, in ICML, 2015. [9] I. Osband, B. Van Roy, and Z. Wen, “Generalization and exploration via randomized value functions”, ArXiv preprint arXiv:1402.0635, 2014. 8 [10] B. C. Stadie, S. Levine, and P. Abbeel, “Incentivizing exploration in reinforcement learning with deep predictive models”, ArXiv preprint arXiv:1507.00814, 2015. [11] I. Osband, C. Blundell, A. Pritzel, and B. Van Roy, “Deep exploration via bootstrapped DQN”, in ICML, 2016. [12] J. Oh, X. Guo, H. Lee, R. L. Lewis, and S. Singh, “Action-conditional video prediction using deep networks in Atari games”, in NIPS, 2015, pp. 2845–2853. [13] T. Hester and P. Stone, “Intrinsically motivated model learning for developing curious robots”, Artificial Intelligence, 2015. [14] K. Subramanian, C. L. Isbell Jr, and A. L. Thomaz, “Exploration from demonstration for interactive reinforcement learning”, in AAMAS, 2016. [15] Y. Duan, X. Chen, R. Houthooft, J. Schulman, and P. Abbeel, “Benchmarking deep reinforcement learning for continous control”, in ICML, 2016. [16] J. Schmidhuber, “Curious model-building control systems”, in IJCNN, 1991, pp. 1458–1463. [17] Y. Sun, F. Gomez, and J. Schmidhuber, “Planning to be surprised: Optimal Bayesian exploration in dynamic environments”, in Artificial General Intelligence, 2011, pp. 41–51. [18] L. Itti and P. F. Baldi, “Bayesian surprise attracts human attention”, in NIPS, 2005, pp. 547–554. [19] A. Graves, “Practical variational inference for neural networks”, in NIPS, 2011, pp. 2348–2356. [20] C. Blundell, J. Cornebise, K. Kavukcuoglu, and D. Wierstra, “Weight uncertainty in neural networks”, in ICML, 2015. [21] J. Schmidhuber, “Formal theory of creativity, fun, and intrinsic motivation (1990–2010)”, IEEE Trans. Auton. Mental Develop., vol. 2, no. 3, pp. 230–247, 2010. [22] J. Storck, S. Hochreiter, and J. Schmidhuber, “Reinforcement driven information acquisition in nondeterministic environments”, in ICANN, vol. 2, 1995, pp. 159–164. [23] J. Z. Kolter and A. Y. Ng, “Near-Bayesian exploration in polynomial time”, in ICML, 2009, pp. 513–520. [24] G. E. Hinton and D. Van Camp, “Keeping the neural networks simple by minimizing the description length of the weights”, in COLT, 1993, pp. 5–13. [25] J. Schmidhuber, “Simple algorithmic principles of discovery, subjective beauty, selective attention, curiosity & creativity”, in Intl. Conf. on Discovery Science, 2007, pp. 26–38. [26] D. P. Kingma, T. Salimans, and M. Welling, “Variational dropout and the local reparameterization trick”, in NIPS, 2015, pp. 2575–2583. [27] R. J. Williams, “Simple statistical gradient-following algorithms for connectionist reinforcement learning”, Mach. Learn., vol. 8, no. 3-4, pp. 229–256, 1992. [28] J. Kober and J. R. Peters, “Policy search for motor primitives in robotics”, in NIPS, 2009, pp. 849–856. [29] J. Peters and S. Schaal, “Reinforcement learning by reward-weighted regression for operational space control”, in ICML, 2007, pp. 745–750. [30] P. Auer, T. Jaksch, and R. Ortner, “Near-optimal regret bounds for reinforcement learning”, in NIPS, 2009, pp. 89–96. [31] A. Guez, N. Heess, D. Silver, and P. Dayan, “Bayes-adaptive simulation-based search with value function approximation”, in NIPS, 2014, pp. 451–459. [32] R. S. Sutton, Introduction to reinforcement learning. [33] S. Still and D. Precup, “An information-theoretic approach to curiosity-driven reinforcement learning”, Theory Biosci., vol. 131, no. 3, pp. 139–148, 2012. [34] D. Y. Little and F. T. Sommer, “Learning and exploration in action-perception loops”, Closing the Loop Around Neural Systems, p. 295, 2014. [35] S. B. Thrun, “Efficient exploration in reinforcement learning”, Tech. Rep., 1992. [36] M. Lopes, T. Lang, M. Toussaint, and P.-Y. Oudeyer, “Exploration in model-based reinforcement learning by empirically estimating learning progress”, in NIPS, 2012, pp. 206–214. [37] J. Schossau, C. Adami, and A. Hintze, “Information-theoretic neuro-correlates boost evolution of cognitive systems”, Entropy, vol. 18, no. 1, p. 6, 2015. [38] K. Zahedi, G. Martius, and N. Ay, “Linear combination of one-step predictive information with an external reward in an episodic policy gradient setting: A critical analysis”, Front. Psychol., vol. 4, 2013. [39] P.-Y. Oudeyer and F. Kaplan, “What is intrinsic motivation? a typology of computational approaches”, Front Neurorobot., vol. 1, p. 6, 2007. [40] G. Montufar, K. Ghazi-Zahedi, and N. Ay, “Information theoretically aided reinforcement learning for embodied agents”, ArXiv preprint arXiv:1605.09735, 2016. [41] S. Mohamed and D. J. Rezende, “Variational information maximisation for intrinsically motivated reinforcement learning”, in NIPS, 2015, pp. 2116–2124. [42] C. Salge, C. Glackin, and D. Polani, “Guided self-organization: Inception”, in. 2014, ch. Empowerment– An Introduction, pp. 67–114. 9 | 2016 | 396 |
6,323 | Toward Deeper Understanding of Neural Networks: The Power of Initialization and a Dual View on Expressivity Amit Daniely Google Brain Roy Frostig∗ Google Brain Yoram Singer Google Brain Abstract We develop a general duality between neural networks and compositional kernel Hilbert spaces. We introduce the notion of a computation skeleton, an acyclic graph that succinctly describes both a family of neural networks and a kernel space. Random neural networks are generated from a skeleton through node replication followed by sampling from a normal distribution to assign weights. The kernel space consists of functions that arise by compositions, averaging, and non-linear transformations governed by the skeleton’s graph topology and activation functions. We prove that random networks induce representations which approximate the kernel space. In particular, it follows that random weight initialization often yields a favorable starting point for optimization despite the worst-case intractability of training neural networks. 1 Introduction Neural network (NN) learning has underpinned state of the art empirical results in numerous applied machine learning tasks, see for instance [25, 26]. Nonetheless, theoretical analyses of neural network learning are still lacking in several regards. Notably, it remains unclear why training algorithms find good weights and how learning is impacted by network architecture and its activation functions. This work analyzes the representation power of neural networks within the vicinity of random initialization. We show that for regimes of practical interest, randomly initialized neural networks well-approximate a rich family of hypotheses. Thus, despite worst-case intractability of training neural networks, commonly used initialization procedures constitute a favorable starting point for training. Concretely, we define a computation skeleton that is a succinct description of feed-forward networks. A skeleton induces a family of network architectures as well as an hypothesis class H of functions obtained by non-linear compositions mandated by the skeleton’s structure. We then analyze the set of functions that can be expressed by varying the weights of the last layer, a simple region of the training domain over which the objective is convex. We show that with high probability over the choice of initial network weights, any function in H can be approximated by selecting the final layer’s weights. Before delving into technical detail, we position our results in the context of previous research. Current theoretical understanding of NN learning. Standard results from complexity theory [22] imply that all efficiently computable functions can be expressed by a network of moderate size. Barron’s theorem [7] states that even two-layer networks can express a very rich set of functions. The generalization ability of algorithms for training neural networks is also fairly well studied. Indeed, both classical [3, 9, 10] and more recent [18, 33] results from statistical learning theory show that, as the number of examples grows in comparison to the size of the network, the empirical risk approaches the population risk. In contrast, it remains puzzling why and when efficient algorithms, such as stochastic gradient methods, yield solutions that perform well. While learning algorithms succeed in ∗Most of this work performed while the author was at Stanford University. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. practice, theoretical analyses are overly pessimistic. For example, hardness results suggest that, in the worst case, even very simple 2-layer networks are intractable to learn. Concretely, it is hard to construct a hypothesis which predicts marginally better than random [15, 23, 24]. In the meantime, recent empirical successes of neural networks prompted a surge of theoretical results on NN learning. For instance, we refer the reader to [1, 4, 12, 14, 16, 28, 32, 38, 42] and the references therein. Compositional kernels and connections to networks. The idea of composing kernels has repeatedly appeared in the machine learning literature. See for instance the early work by Grauman and Darrell [17], Schölkopf et al. [41]. Inspired by deep networks’ success, researchers considered deep composition of kernels [11, 13, 29]. For fully connected two-layer networks, the correspondence between kernels and neural networks with random weights has been examined in [31, 36, 37, 45]. Notably, Rahimi and Recht [37] proved a formal connection, in a similar sense to ours, for the RBF kernel. Their work was extended to include polynomial kernels [21, 35] as well as other kernels [5, 6]. Several authors have further explored ways to extend this line of research to deeper, either fully-connected networks [13] or convolutional networks [2, 20, 29]. This work establishes a common foundation for the above research and expands the ideas therein. We extend the scope from fully-connected and convolutional networks to a broad family of architectures. In addition, we prove approximation guarantees between a network and its corresponding kernel in our general setting. We thus generalize previous analyses which are only applicable to fully connected two-layer networks. 2 Setting Notation. We denote vectors by bold-face letters (e.g. x), and matrices by upper case Greek letters (e.g. Σ). The 2-norm of x ∈Rd is denoted by x. For functions σ : R →R we let σ := EX∼N (0,1) σ2(X) = 1 √ 2π ∞ −∞σ2(x)e−x2 2 dx . Let G = (V, E) be a directed acyclic graph. The set of neighbors incoming to a vertex v is denoted in(v) := {u ∈V | uv ∈E} . The d −1 dimensional sphere is denoted Sd−1 = {x ∈Rd | x = 1}. We provide a brief overview of reproducing kernel Hilbert spaces in the sequel and merely introduce notation here. In a Hilbert space H, we use a slightly non-standard notation HB for the ball of radius B, {x ∈H | xH ≤B}. We use [x]+ to denote max(x, 0) and 1[b] to denote the indicator function of a binary variable b. Input space. Throughout the paper we assume that each example is a sequence of n elements, each of which is represented as a unit vector. Namely, we fix n and take the input space to be X = Xn,d = Sd−1n. Each input example is denoted, x = (x1, . . . , xn), where xi ∈Sd−1 . (1) We refer to each vector xi as the input’s ith coordinate, and use xi j to denote it jth scalar entry. Though this notation is slightly non-standard, it unifies input types seen in various domains. For example, binary features can be encoded by taking d = 1, in which case X = {±1}n. Meanwhile, images and audio signals are often represented as bounded and continuous numerical values; we can assume in full generality that these values lie in [−1, 1]. To match the setup above, we embed [−1, 1] into the circle S1, e.g. through the map x → sin πx 2 , cos πx 2 . When each coordinate is categorical, taking one of d values, one can represent the category j ∈[d] by the unit vector ej ∈Sd−1. When d is very large or the basic units exhibit some structure—such as when the input is a sequence of words—a more concise encoding may be useful, e.g. using unit vectors in a low dimension space Sd where d d (see for instance Levy and Goldberg [27], Mikolov et al. [30]). 2 Supervised learning. The goal in supervised learning is to devise a mapping from the input space X to an output space Y based on a sample S = {(x1, y1), . . . , (xm, ym)}, where (xi, yi) ∈X × Y, drawn i.i.d. from a distribution D over X × Y. A supervised learning problem is further specified by an output length k and a loss function : Rk × Y →[0, ∞), and the goal is to find a predictor h : X →Rk whose loss, LD(h) := E (x,y)∼D (h(x), y) is small. The empirical loss LS(h) := 1 m m i=1 (h(xi), yi) is commonly used as a proxy for the loss LD. Regression problems correspond to Y = R and, for instance, the squared loss (ˆy, y) = (ˆy −y)2. Binary classification is captured by Y = {±1} and, say, the zero-one loss (ˆy, y) = 1[ˆyy ≤0] or the hinge loss (ˆy, y) = [1 −ˆyy]+, with standard extensions to the multiclass case. A loss is L-Lipschitz if |(y1, y) −(y2, y)| ≤L|y1 −y2| for all y1, y2 ∈Rk, y ∈Y, and it is convex if (·, y) is convex for every y ∈Y. Neural network learning. We define a neural network N to be directed acyclic graph (DAG) whose nodes are denoted V (N) and edges E(N). Each of its internal units, i.e. nodes with both incoming and outgoing edges, is associated with an activation function σv : R →R. In this paper’s context, an activation can be any function that is square integrable with respect to the Gaussian measure on R. We say that σ is normalized if σ = 1. The set of nodes having only incoming edges are called the output nodes. To match the setup of a supervised learning problem, a network N has nd input nodes and k output nodes, denoted o1, . . . , ok. A network N together with a weight vector w = {wuv | uv ∈E} defines a predictor hN ,w : X →Rk whose prediction is given by “propagating” x forward through the network. Formally, we define hv,w(·) to be the output of the subgraph of the node v as follows: for an input node v, hv,w is the identity function, and for all other nodes, we define hv,w recursively as hv,w(x) = σv u∈in(v) wuv hu,w(x) . Finally, we let hN ,w(x) = (ho1,w(x), . . . , hok,w(x)). We also refer to internal nodes as hidden units. The output layer of N is the sub-network consisting of all output neurons of N along with their incoming edges. The representation induced by a network N is the network rep(N) obtained from N by removing the output layer. The representation function induced by the weights w is RN ,w := hrep(N ),w. Given a sample S, a learning algorithm searches for weights w having small empirical loss LS(w) = 1 m m i=1 (hN ,w(xi), yi). A popular approach is to randomly initialize the weights and then use a variant of the stochastic gradient method to improve these weights in the direction of lower empirical loss. Kernel learning. A function κ : X × X →R is a reproducing kernel, or simply a kernel, if for every x1, . . . , xr ∈X, the r × r matrix Γi,j = {κ(xi, xj)} is positive semi-definite. Each kernel induces a Hilbert space Hκ of functions from X to R with a corresponding norm ·Hκ. A kernel and its corresponding space are normalized if ∀x ∈X, κ(x, x) = 1. Given a convex loss function , a sample S, and a kernel κ, a kernel learning algorithm finds a function f = (f1, . . . , fk) ∈Hk κ whose empirical loss, LS(f) = 1 m i (f(xi), yi), is minimal among all functions with i fi2 κ ≤R2 for some R > 0. Alternatively, kernel algorithms minimize the regularized loss, LR S (f) = 1 m m i=1 (f(xi), yi) + 1 R2 k i=1 fi2 κ , a convex objective that often can be efficiently minimized. 3 Computation skeletons In this section we define a simple structure that we term a computation skeleton. The purpose of a computational skeleton is to compactly describe feed-forward computation from an input to an output. A single skeleton encompasses a family of neural networks that share the same skeletal structure. Likewise, it defines a corresponding kernel space. 3 S1 S2 S3 S4 Figure 1: Examples of computation skeletons. Definition. A computation skeleton S is a DAG whose non-input nodes are labeled by activations. Though the formal definition of neural networks and skeletons appear identical, we make a conceptual distinction between them as their role in our analysis is rather different. Accompanied by a set of weights, a neural network describes a concrete function, whereas the skeleton stands for a topology common to several networks as well as for a kernel. To further underscore the differences we note that skeletons are naturally more compact than networks. In particular, all examples of skeletons in this paper are irreducible, meaning that for each two nodes v, u ∈V (S), in(v) = in(u). We further restrict our attention to skeletons with a single output node, showing later that single-output skeletons can capture supervised problems with outputs in Rk. We denote by |S| the number of non-input nodes of S. Figure 1 shows four example skeletons, omitting the designation of the activation functions. The skeleton S1 is rather basic as it aggregates all the inputs in a single step. Such topology can be useful in the absence of any prior knowledge of how the output label may be computed from an input example, and it is commonly used in natural language processing where the input is represented as a bag-of-words [19]. The only structure in S1 is a single fully connected layer: Terminology (Fully connected layer of a skeleton). An induced subgraph of a skeleton with r + 1 nodes, u1, . . . , ur, v, is called a fully connected layer if its edges are u1v, . . . , urv. The skeleton S2 is slightly more involved: it first processes consecutive (overlapping) parts of the input, and the next layer aggregates the partial results. Altogether, it corresponds to networks with a single one-dimensional convolutional layer, followed by a fully connected layer. The two-dimensional (and deeper) counterparts of such skeletons correspond to networks that are common in visual object recognition. Terminology (Convolution layer of a skeleton). Let s, w, q be positive integers and denote n = s(q −1)+w. A subgraph of a skeleton is a one dimensional convolution layer of width w and stride s if it has n + q nodes, u1, . . . , un, v1, . . . , vq, and qw edges, us(i−1)+j vi, for 1 ≤i ≤q, 1 ≤j ≤w. The skeleton S3 is a somewhat more sophisticated version of S2: the local computations are first aggregated, then reconsidered with the aggregate, and finally aggregated again. The last skeleton, S4, corresponds to the networks that arise in learning sequence-to-sequence mappings as used in translation, speech recognition, and OCR tasks (see for example Sutskever et al. [44]). 3.1 From computation skeletons to neural networks The following definition shows how a skeleton, accompanied with a replication parameter r ≥1 and a number of output nodes k, induces a neural network architecture. Recall that inputs are ordered sets of vectors in Sd−1. 4 S N(S, 5) Figure 2: A 5-fold realizations of the computation skeleton S with d = 1. Definition (Realization of a skeleton). Let S be a computation skeleton and consider input coordinates in Sd−1 as in (1). For r, k ≥1 we define the following neural network N = N(S, r, k). For each input node in S, N has d corresponding input neurons. For each internal node v ∈S labeled by an activation σ, N has r neurons v1, . . . , vr, each with an activation σ. In addition, N has k output neurons o1, . . . , ok with the identity activation σ(x) = x. There is an edge viuj ∈E(N) whenever uv ∈E(S). For every output node v in S, each neuron vj is connected to all output neurons o1, . . . , ok. We term N the (r, k)-fold realization of S. We also define the r-fold realization of S as2 N(S, r) = rep (N(S, r, 1)). Note that the notion of the replication parameter r corresponds, in the terminology of convolutional networks, to the number of channels taken in a convolutional layer and to the number of hidden units taken in a fully-connected layer. Figure 2 illustrates a 5-realization of a skeleton with coordinate dimension d = 1. The realization is a network with a single (one dimensional) convolutional layer having 5 channels, stride of 1, and width of 2, followed by two fully-connected layers. The global replication parameter r in a realization is used for brevity; it is straightforward to extend results when the different nodes in S are each replicated to a different extent. We next define a scheme for random initialization of the weights of a neural network, that is similar to what is often done in practice. We employ the definition throughout the paper whenever we refer to random weights. Definition (Random weights). A random initialization of a neural network N is a multivariate Gaussian w = (wuv)uv∈E(N ) such that each weight wuv is sampled independently from a normal distribution with mean 0 and variance 1/ σu2 |in(v)| . Architectures such as convolutional nets have weights that are shared across different edges. Again, it is straightforward to extend our results to these cases and for simplicity we assume no weight sharing. 3.2 From computation skeletons to reproducing kernels In addition to networks’ architectures, a computation skeleton S also defines a normalized kernel κS : X × X →[−1, 1] and a corresponding norm · S on functions f : X →R. This norm has the property that fS is small if and only if f can be obtained by certain simple compositions of functions according to the structure of S. To define the kernel, we introduce a dual activation and dual kernel. For ρ ∈[−1, 1], we denote by Nρ the multivariate Gaussian distribution on R2 with mean 0 and covariance matrix 1 ρ ρ 1 . Definition (Dual activation and kernel). The dual activation of an activation σ is the function ˆσ : [−1, 1] →R defined as ˆσ(ρ) = E (X,Y )∼Nρ σ(X)σ(Y ) . The dual kernel w.r.t. to a Hilbert space H is the kernel κσ : H1 × H1 →R defined as κσ(x, y) = ˆσ(x, y
H) . 2Note that for every k, rep (N(S, r, 1)) = rep (N(S, r, k)). 5 Activation Dual Activation Kernel Ref Identity x ρ linear 2nd Hermite x2−1 √ 2 ρ2 poly ReLU √ 2 [x]+ 1 π + ρ 2 + ρ2 2π + ρ4 24π + . . . = √ 1−ρ2+(π−cos−1(ρ))ρ π arccos1 [13] Step √ 2 1[x ≥0] 1 2 + ρ π + ρ3 6π + 3ρ5 40π + . . . = π−cos−1(ρ) π arccos0 [13] Exponential ex−2 1 e + ρ e + ρ2 2e + ρ3 6e + . . . = eρ−1 RBF [29] Table 1: Activation functions and their duals. We show in the supplementary material that κσ is indeed a kernel for every activation σ that adheres with the square-integrability requirement. In fact, any continuous µ : [−1, 1] →R, such that (x, y) →µ(x, y
H) is a kernel for all H, is the dual of some activation. Note that κσ is normalized iff σ is normalized. We show in the supplementary material that dual activations are closely related to Hermite polynomial expansions, and that these can be used to calculate the duals of activation functions analytically. Table 1 lists a few examples of normalized activations and their corresponding dual (corresponding derivations are in supplementary material). The following definition gives the kernel corresponding to a skeleton having normalized activations.3 Definition (Compositional kernels). Let S be a computation skeleton with normalized activations and (single) output node o. For every node v, inductively define a kernel κv : X × X →R as follows. For an input node v corresponding to the ith coordinate, define κv(x, y) = xi, yi
. For a non-input node v, define κv(x, y) = ˆσv u∈in(v) κu(x, y) |in(v)| . The final kernel κS is κo, the kernel associated with the output node o. The resulting Hilbert space and norm are denoted HS and · S respectively, and Hv and · v denote the space and norm when formed at node v. As we show later, κS is indeed a (normalized) kernel for every skeleton S. To understand the kernel in the context of learning, we need to examine which functions can be expressed as moderate norm functions in HS. As we show in the supplementary material, these are the functions obtained by certain simple compositions according to the feed-forward structure of S. For intuition, we contrast two examples of two commonly used skeletons. For simplicity, we restrict to the case X = Xn,1 = {±1}n, and omit the details of derivations. Example 1 (Fully connected skeletons). Let S be a skeleton consisting of l fully connected layers, where the i’th layer is associated with the activation σi. We have κS(x, x) = ˆσl ◦. . . ◦ˆσ1 x,y n . For such kernels, any moderate norm function in H is well approximated by a low degree polynomial. For example, if fS ≤n, then there is a second degree polynomial p such that f −p2 ≤O 1 √n . We next argue that convolutional skeletons define kernel spaces that are quite different from kernels spaces defined by fully connected skeletons. Concretely, suppose f : X →R is of the form f = m i=1 fi where each fi depends only on q adjacent coordinates. We call f a q-local function. In Example 1 we stated that for fully-connected skeletons, any function of in the induced space of norm less then n is well approximated by second degree polynomials. In contrast, the following example underscores that for convolutional skeletons, we can find functions that are more complex, provided that they are local. Example 2 (Convolutional skeletons). Let S be a skeleton consisting of a convolutional layer of stride 1 and width q, followed by a single fully connected layer. (The skeleton S2 from Figure 1 is a concrete example with q = 2 and n = 4.) To simplify the argument, we assume that all activations are σ(x) = ex and q is a constant. For any q-local function f : X →R we have fS ≤C · √n · f2 . 3For a skeleton S with unnormalized activations, the corresponding kernel is the kernel of the skeleton S obtained by normalizing the activations of S. 6 Here, C > 0 is a constant depending only on q. Hence, for example, any average of functions from X to [−1, 1], each of which depends on q adjacent coordinates, is in HS and has norm of merely O (√n). 4 Main results We review our main results. Proofs can be found in the supplementary material. Let us fix a compositional kernel S. There are a few upshots to underscore upfront. First, our analysis implies that a representation generated by a random initialization of N = N(S, r, k) approximates the kernel κS. The sense in which the result holds is twofold. First, with the proper rescaling we show that RN ,w(x), RN ,w(x)
≈κS(x, x). Then, we also show that the functions obtained by composing bounded linear functions with RN ,w are approximately the bounded-norm functions in HS. In other words, the functions expressed by N under varying the weights of the final layer are approximately bounded-norm functions in HS. For simplicity, we restrict the analysis to the case k = 1. We also confine the analysis to either bounded activations, with bounded first and second derivatives, or the ReLU activation. Extending the results to a broader family of activations is left for future work. Through this and remaining sections we use to hide universal constants. Definition. An activation σ : R →R is C-bounded if it is twice continuously differentiable and σ∞, σ∞, σ∞≤σC. Note that many activations are C-bounded for some constant C > 0. In particular, most of the popular sigmoid-like functions such as 1/(1 + e−x), erf(x), x/ √ 1 + x2, tanh(x), and tan−1(x) satisfy the boundedness requirements. We next introduce terminology that parallels the representation layer of N with a kernel space. Concretely, let N be a network whose representation part has q output neurons. Given weights w, the normalized representation Ψw is obtained from the representation RN ,w by dividing each output neuron v by σv√q. The empirical kernel corresponding to w is defined as κw(x, x) = Ψw(x), Ψw(x)
. We also define the empirical kernel space corresponding to w as Hw = Hκw. Concretely, Hw = {hv(x) = v, Ψw(x)
| v ∈Rq} , and the norm of Hw is defined as hw = inf{v | h = hv}. Our first result shows that the empirical kernel approximates the kernel kS. Theorem 3. Let S be a skeleton with C-bounded activations. Let w be a random initialization of N = N(S, r) with r ≥(4C4)depth(S)+1 log (8|S|/δ) 2 . Then, for all x, x ∈X, with probability of at least 1 −δ, |kw(x, x) −kS(x, x)| ≤ . We note that if we fix the activation and assume that the depth of S is logarithmic, then the required bound on r is polynomial. For the ReLU activation we get a stronger bound with only quadratic dependence on the depth. However, it requires that ≤1/depth(S). Theorem 4. Let S be a skeleton with ReLU activations. Let w be a random initialization of N(S, r) with r depth2(S) log (|S|/δ) 2 . Then, for all x, x ∈X and 1/depth(S), with probability of at least 1 −δ, |κw(x, x) −κS(x, x)| ≤ . For the remaining theorems, we fix a L-Lipschitz loss : R × Y →[0, ∞). For a distribution D on X × Y we denote by D0 the cardinality of the support of the distribution. We note that log (D0) is bounded by, for instance, the number of bits used to represent an element in X × Y. We use the following notion of approximation. Definition. Let D be a distribution on X ×Y. A space H1 ⊂RX -approximates the space H2 ⊂RX w.r.t. D if for every h2 ∈H2 there is h1 ∈H1 such that LD(h1) ≤LD(h2) + . 7 Theorem 5. Let S be a skeleton with C-bounded activations and let R > 0. Let w be a random initialization of N(S, r) with r L4 R4 (4C4)depth(S)+1 log LRC|S| δ 4 . Then, with probability of at least 1 −δ over the choices of w we have that, for any data distribution, H √ 2R w -approximates HR S and H √ 2R S -approximates HR w. Theorem 6. Let S be a skeleton with ReLU activations, 1/depth(C), and R > 0. Let w be a random initialization of N(S, r) with r L4 R4 depth2(S) log D 0|S| δ 4 . Then, with probability of at least 1 −δ over the choices of w we have that, for any data distribution, H √ 2R w -approximates HR S and H √ 2R S -approximates HR w. As in Theorems 3 and 4, for a fixed C-bounded activation and logarithmically deep S, the required bounds on r are polynomial. Analogously, for the ReLU activation the bound is polynomial even without restricting the depth. However, the polynomial growth in Theorems 5 and 6 is rather large. Improving the bounds, or proving their optimality, is left to future work. Acknowledgments We would like to thank Percy Liang and Ben Recht for fruitful discussions, comments, and suggestions. References [1] A. Andoni, R. Panigrahy, G. Valiant, and L. Zhang. Learning polynomials with neural networks. In Proceedings of the 31st International Conference on Machine Learning, pages 1908–1916, 2014. [2] F. Anselmi, L. Rosasco, C. Tan, and T. Poggio. Deep convolutional networks are hierarchical kernel machines. arXiv:1508.01084, 2015. [3] M. Anthony and P. Bartlet. Neural Network Learning: Theoretical Foundations. Cambridge University Press, 1999. [4] S. Arora, A. Bhaskara, R. Ge, and T. Ma. Provable bounds for learning some deep representations. In Proceedings of The 31st International Conference on Machine Learning, pages 584–592, 2014. [5] F. Bach. Breaking the curse of dimensionality with convex neural networks. arXiv:1412.8690, 2014. [6] F. Bach. On the equivalence between kernel quadrature rules and random feature expansions. 2015. [7] A.R. Barron. Universal approximation bounds for superposition of a sigmoidal function. IEEE Transactions on Information Theory, 39(3):930–945, 1993. [8] P. L. Bartlett and S. Mendelson. Rademacher and Gaussian complexities: Risk bounds and structural results. Journal of Machine Learning Research, 3:463–482, 2002. [9] P.L. Bartlett. The sample complexity of pattern classification with neural networks: the size of the weights is more important than the size of the network. IEEE Transactions on Information Theory, 44(2):525–536, March 1998. [10] E.B. Baum and D. Haussler. What size net gives valid generalization? Neural Computation, 1(1):151–160, 1989. [11] L. Bo, K. Lai, X. Ren, and D. Fox. Object recognition with hierarchical kernel descriptors. In Computer Vision and Pattern Recognition (CVPR), 2011 IEEE Conference on, pages 1729–1736. IEEE, 2011. [12] J. Bruna and S. Mallat. Invariant scattering convolution networks. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(8):1872–1886, 2013. [13] Y. Cho and L.K. Saul. Kernel methods for deep learning. In Advances in neural information processing systems, pages 342–350, 2009. [14] A. Choromanska, M. Henaff, M. Mathieu, G. Ben Arous, and Y. LeCun. The loss surfaces of multilayer networks. In AISTATS, pages 192–204, 2015. [15] A. Daniely and S. Shalev-Shwartz. Complexity theoretic limitations on learning DNFs. In COLT, 2016. [16] R. Giryes, G. Sapiro, and A.M. Bronstein. Deep neural networks with random gaussian weights: A universal classification strategy? arXiv preprint arXiv:1504.08291, 2015. 8 [17] K. Grauman and T. Darrell. The pyramid match kernel: Discriminative classification with sets of image features. In Tenth IEEE International Conference on Computer Vision, volume 2, pages 1458–1465, 2005. [18] M. Hardt, B. Recht, and Y. Singer. Train faster, generalize better: Stability of stochastic gradient descent. arXiv:1509.01240, 2015. [19] Z.S. Harris. Distributional structure. Word, 1954. [20] T. Hazan and T. Jaakkola. Steps toward deep kernel methods from infinite neural networks. arXiv:1508.05133, 2015. [21] P. Kar and H. Karnick. Random feature maps for dot product kernels. arXiv:1201.6530, 2012. [22] R.M. Karp and R.J. Lipton. Some connections between nonuniform and uniform complexity classes. In Proceedings of the twelfth annual ACM symposium on Theory of computing, pages 302–309. ACM, 1980. [23] M. Kearns and L.G. Valiant. Cryptographic limitations on learning Boolean formulae and finite automata. In STOC, pages 433–444, May 1989. [24] A.R. Klivans and A.A. Sherstov. Cryptographic hardness for learning intersections of halfspaces. In FOCS, 2006. [25] A. Krizhevsky, I. Sutskever, and G.E. Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097–1105, 2012. [26] Y. LeCun, Y. Bengio, and G. Hinton. Deep learning. Nature, 521(7553):436–444, 2015. [27] O. Levy and Y. Goldberg. Neural word embedding as implicit matrix factorization. In Advances in Neural Information Processing Systems, pages 2177–2185, 2014. [28] R. Livni, S. Shalev-Shwartz, and O. Shamir. On the computational efficiency of training neural networks. In Advances in Neural Information Processing Systems, pages 855–863, 2014. [29] J. Mairal, P. Koniusz, Z. Harchaoui, and Cordelia Schmid. Convolutional kernel networks. In Advances in Neural Information Processing Systems, pages 2627–2635, 2014. [30] T. Mikolov, I. Sutskever, K. Chen, G.S. Corrado, and J. Dean. Distributed representations of words and phrases and their compositionality. In NIPS, pages 3111–3119, 2013. [31] R.M. Neal. Bayesian learning for neural networks, volume 118. Springer Science & Business Media, 2012. [32] B. Neyshabur, R. R Salakhutdinov, and N. Srebro. Path-SGD: Path-normalized optimization in deep neural networks. In Advances in Neural Information Processing Systems, pages 2413–2421, 2015. [33] B. Neyshabur, N. Srebro, and R. Tomioka. Norm-based capacity control in neural networks. In COLT, 2015. [34] R. O’Donnell. Analysis of boolean functions. Cambridge University Press, 2014. [35] J. Pennington, F. Yu, and S. Kumar. Spherical random features for polynomial kernels. In Advances in Neural Information Processing Systems, pages 1837–1845, 2015. [36] A. Rahimi and B. Recht. Random features for large-scale kernel machines. In NIPS, pages 1177–1184, 2007. [37] A. Rahimi and B. Recht. Weighted sums of random kitchen sinks: Replacing minimization with randomization in learning. In Advances in neural information processing systems, pages 1313–1320, 2009. [38] I. Safran and O. Shamir. On the quality of the initial basin in overspecified neural networks. arxiv:1511.04210, 2015. [39] S. Saitoh. Theory of reproducing kernels and its applications. Longman Scientific & Technical England, 1988. [40] I.J. Schoenberg et al. Positive definite functions on spheres. Duke Mathematical Journal, 9(1):96–108, 1942. [41] B. Schölkopf, P. Simard, A. Smola, and V. Vapnik. Prior knowledge in support vector kernels. In Advances in Neural Information Processing Systems 10, pages 640–646. MIT Press, 1998. [42] H. Sedghi and A. Anandkumar. Provable methods for training neural networks with sparse connectivity. arXiv:1412.2693, 2014. [43] S. Shalev-Shwartz and S. Ben-David. Understanding Machine Learning: From Theory to Algorithms. Cambridge University Press, 2014. [44] I. Sutskever, O. Vinyals, and Q.V. Le. Sequence to sequence learning with neural networks. In Advances in neural information processing systems, pages 3104–3112, 2014. [45] C.K.I. Williams. Computation with infinite neural networks. pages 295–301, 1997. 9 | 2016 | 397 |
6,324 | Unsupervised Domain Adaptation with Residual Transfer Networks Mingsheng Long†, Han Zhu†, Jianmin Wang†, and Michael I. Jordan♯ †KLiss, MOE; TNList; School of Software, Tsinghua University, China ♯University of California, Berkeley, Berkeley, USA {mingsheng,jimwang}@tsinghua.edu.cn, zhuhan10@gmail.com, jordan@berkeley.edu Abstract The recent success of deep neural networks relies on massive amounts of labeled data. For a target task where labeled data is unavailable, domain adaptation can transfer a learner from a different source domain. In this paper, we propose a new approach to domain adaptation in deep networks that can jointly learn adaptive classifiers and transferable features from labeled data in the source domain and unlabeled data in the target domain. We relax a shared-classifier assumption made by previous methods and assume that the source classifier and target classifier differ by a residual function. We enable classifier adaptation by plugging several layers into deep network to explicitly learn the residual function with reference to the target classifier. We fuse features of multiple layers with tensor product and embed them into reproducing kernel Hilbert spaces to match distributions for feature adaptation. The adaptation can be achieved in most feed-forward models by extending them with new residual layers and loss functions, which can be trained efficiently via back-propagation. Empirical evidence shows that the new approach outperforms state of the art methods on standard domain adaptation benchmarks. 1 Introduction Deep networks have significantly improved the state of the art for a wide variety of machine-learning problems and applications. Unfortunately, these impressive gains in performance come only when massive amounts of labeled data are available for supervised training. Since manual labeling of sufficient training data for diverse application domains on-the-fly is often prohibitive, for problems short of labeled data, there is strong incentive to establishing effective algorithms to reduce the labeling consumption, typically by leveraging off-the-shelf labeled data from a different but related source domain. However, this learning paradigm suffers from the shift in data distributions across different domains, which poses a major obstacle in adapting predictive models for the target task [1]. Domain adaptation [1] is machine learning under the shift between training and test distributions. A rich line of approaches to domain adaptation aim to bridge the source and target domains by learning domain-invariant feature representations without using target labels, so that the classifier learned from the source domain can be applied to the target domain. Recent studies have shown that deep networks can learn more transferable features for domain adaptation [2, 3], by disentangling explanatory factors of variations behind domains. Latest advances have been achieved by embedding domain adaptation in the pipeline of deep feature learning which can extract domain-invariant representations [4, 5, 6, 7]. The previous deep domain adaptation methods work under the assumption that the source classifier can be directly transferred to the target domain upon the learned domain-invariant feature representations. This assumption is rather strong as in practical applications, it is often infeasible to check whether the source classifier and target classifier can be shared or not. Hence we focus in this paper on a more general, and safe, domain adaptation scenario in which the source classifier and target classifier differ 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. by a small perturbation function. The goal of this paper is to simultaneously learn adaptive classifiers and transferable features from labeled data in the source domain and unlabeled data in the target domain by embedding the adaptations of both classifiers and features in a unified deep architecture. Motivated by the state of the art deep residual learning [8], winner of the ImageNet ILSVRC 2015 challenge, we propose a new Residual Transfer Network (RTN) approach to domain adaptation in deep networks which can simultaneously learn adaptive classifiers and transferable features. We relax the shared-classifier assumption made by previous methods and assume that the source and target classifiers differ by a small residual function. We enable classifier adaptation by plugging several layers into deep networks to explicitly learn the residual function with reference to the target classifier. In this way, the source classifier and target classifier can be bridged tightly in the back-propagation procedure. The target classifier is tailored to the target data better by exploiting the low-density separation criterion. We fuse features of multiple layers with tensor product and embed them into reproducing kernel Hilbert spaces to match distributions for feature adaptation. The adaptation can be achieved in most feed-forward models by extending them with new residual layers and loss functions, and can be trained efficiently using standard back-propagation. Extensive evidence suggests that the RTN approach outperforms several state of art methods on standard domain adaptation benchmarks. 2 Related Work Domain adaptation [1] builds models that can bridge different domains or tasks, which mitigates the burden of manual labeling for machine learning [9, 10, 11, 12], computer vision [13, 14, 15] and natural language processing [16]. The main technical problem of domain adaptation is that the domain discrepancy in probability distributions of different domains should be formally reduced. Deep neural networks can learn abstract representations that disentangle different explanatory factors of variations behind data samples [17] and manifest invariant factors underlying different populations that transfer well from original tasks to similar novel tasks [3]. Thus deep neural networks have been explored for domain adaptation [18, 19, 15], multimodal and multi-task learning [16, 20], where significant performance gains have been witnessed relative to prior shallow transfer learning methods. However, recent advances show that deep networks can learn abstract feature representations that can only reduce, but not remove, the cross-domain discrepancy [18, 4]. Dataset shift has posed a bottleneck to the transferability of deep features, resulting in statistically unbounded risk for target tasks [21, 22]. Some recent work addresses the aforementioned problem by deep domain adaptation, which bridges the two worlds of deep learning and domain adaptation [4, 5, 6, 7]. They extend deep convolutional networks (CNNs) to domain adaptation either by adding one or multiple adaptation layers through which the mean embeddings of distributions are matched [4, 5], or by adding a fully connected subnetwork as a domain discriminator whilst the deep features are learned to confuse the domain discriminator in a domain-adversarial training paradigm [6, 7]. While performance was significantly improved, these state of the art methods may be restricted by the assumption that under the learned domain-invariant feature representations, the source classifier can be directly transferred to the target domain. In particular, this assumption may not hold when the source classifier and target classifier cannot be shared. As theoretically studied in [22], when the combined error of the ideal joint hypothesis is large, then there is no single classifier that performs well on both source and target domains, so we cannot find a good target classifier by directly transferring from the source domain. This work is primarily motivated by He et al. [8], the winner of the ImageNet ILSVRC 2015 challenge. They present deep residual learning to ease the training of very deep networks (hundreds of layers), termed residual nets. The residual nets explicitly reformulate the layers as learning residual functions ∆F(x) with reference to the layer inputs x, instead of directly learning the unreferenced functions F(x) = ∆F(x) + x. The method focuses on standard deep learning in which training data and test data are drawn from identical distributions, hence it cannot be directly applied to domain adaptation. In this paper, we propose to bridge the source classifier fS(x) and target classifier fT (x) by the residual layers such that the classifier mismatch across domains can be explicitly modeled by the residual functions ∆F(x) in a deep learning architecture. Although the idea of adapting source classifier to target domain by adding a perturbation function has been studied by [23, 24, 25], these methods require target labeled data to learn the perturbation function, which cannot be applied to unsupervised domain adaptation, the focus of this study. Another distinction is that their perturbation function is defined in the input space x, while the input to our residual function is the target classifier fT (x), which can capture the connection between the source and target classifiers more effectively. 2 3 Residual Transfer Networks In unsupervised domain adaptation problem, we are given a source domain Ds = {(xs i, ys i )}ns i=1 of ns labeled examples and a target domain Dt = {xt j}nt j=1 of nt unlabeled examples. The source domain and target domain are sampled from different probability distributions p and q respectively, and p ̸= q. The goal of this paper is to design a deep neural network that enables learning of transfer classifiers y = fs (x) and y = ft (x) to close the source-target discrepancy, such that the expected target risk Rt (ft) = E(x,y)∼q [ft (x) ̸= y] can be bounded by leveraging the source domain supervised data. The challenge of unsupervised domain adaptation arises in that the target domain has no labeled data, while the source classifier fs trained on source domain Ds cannot be directly applied to the target domain Dt due to the distribution discrepancy p(x, y) ̸= q(x, y). The distribution discrepancy may give rise to mismatches in both features and classifiers, i.e. p(x) ̸= q(x) and fs(x) ̸= ft(x). Both mismatches should be fixed by joint adaptation of features and classifiers to enable effective domain adaptation. Classifier adaptation is more difficult than feature adaptation because it is directly related to the labels but the target domain is fully unlabeled. Note that the state of the art deep feature adaptation methods [5, 6, 7] generally assume classifiers can be shared on adapted deep features. This paper assumes fs ̸= ft and presents an end-to-end deep learning framework for classifier adaptation. Deep networks [17] can learn distributed, compositional, and abstract representations for natural data such as image and text. This paper addresses unsupervised domain adaptation within deep networks for jointly learning transferable features and adaptive classifiers. We extend deep convolutional networks (CNNs), i.e. AlexNet [26], to novel residual transfer networks (RTNs) as shown in Figure 1. Denote by fs(x) the source classifier, and the empirical error of CNN on source domain data Ds is min fs 1 ns ns X i=1 L (fs (xs i) , ys i ), (1) where L(·, ·) is the cross-entropy loss function. Based on the quantification study of feature transferability in deep convolutional networks [3], convolutional layers can learn generic features that are transferable across domains [3]. Hence we opt to fine-tune, instead of directly adapt, the features of convolutional layers when transferring pre-trained deep models from source domain to target domain. 3.1 Feature Adaptation Deep features learned by CNNs can disentangle explanatory factors of variations behind data distributions to boost knowledge transfer [19, 17]. However, the latest literature findings reveal that deep features can reduce, but not remove, the cross-domain distribution discrepancy [3], which motivates the state of the art deep feature adaptation methods [5, 6, 7]. Deep features in standard CNNs must eventually transition from general to specific along the network, and the transferability of features and classifiers will decrease when the cross-domain discrepancy increases [3]. In other words, the shifts in the data distributions linger even after multilayer feature abstractions. In this paper, we perform feature adaptation by matching the feature distributions of multiple layers ℓ∈L across domains. We reduce feature dimensions by adding a bottleneck layer fcb on top of the last feature layer of CNNs, and then fine-tune CNNs on source labeled examples such that the feature distributions of the source and target are made similar under new feature representations in multiple layers L = {fcb, fcc}, as shown in Figure 1. To adapt multiple feature layers effectively, we propose the tensor product between features of multiple layers to perform lossless multi-layer feature fusion, i.e. zs i ≜⊗ℓ∈Lxsℓ i and zt j ≜⊗ℓ∈Lxtℓ j . We then perform feature adaptation by minimizing the Maximum Mean Discrepancy (MMD) [27] between source and target domains using the fusion features (dubbed tensor MMD) as min fs,ft DL (Ds, Dt) = ns X i=1 ns X j=1 k zs i, zs j n2s + nt X i=1 nt X j=1 k zt i, zt j n2 t −2 ns X i=1 nt X j=1 k zs i, zt j nsnt , (2) where the characteristic kernel k(z, z′) = e−∥vec(z)−vec(z′)∥ 2/b is the Gaussian kernel function defined on the vectorization of tensors z and z′ with bandwidth parameter b. Different from DAN [5] that adapts multiple feature layers using multiple MMD penalties, this paper adapts multiple feature layers by first fusing them and then adapting the fused features. The advantage of our method against DAN [5] is that our method can capture full interactions across multilayer features and facilitate easier model selection, while DAN [5] needs |L| independent MMD penalties for adapting |L| layers. 3 fcc fcb fcc fcb MMD AlexNet, ResNet… Xs Xt weight layer weight layer + fc1 fc2 Ys Yt x entropy minimization Δf x( ) fS x( ) fT x( ) ✖ ➕ ✖ fS x( ) = fT x( )+ Δf x( ) MMD ✖ ✖ Xs Xs Xt Xt F x( ) = ΔF x( )+ x ΔF x( ) Zs Zt fcb fcb fcc fcc fT x( ) Figure 1: (left) Residual Transfer Network (RTN) for domain adaptation, based on well-established architectures. Due to dataset shift, (1) the last-layer features are tailored to domain-specific structures that are not safely transferable, hence we add a bottleneck layer fcb that is adapted jointly with the classifier layer fcc by the tensor MMD module; (2) Supervised classifiers are not safely transferable, hence we bridge them by the residual layers fc1–fc2 so that fS (x) = fT (x)+∆f (x). (middle) The tensor MMD module for multi-layer feature adaptation. (right) The building block for deep residual learning; Instead of using the residual block to model feature mappings, we use it to bridge the source classifier fS(x) and target classifier fT (x) with x ≜fT (x), F(x) ≜fS(x), and ∆F(x) ≜∆f(x). 3.2 Classifier Adaptation As feature adaptation cannot remove the mismatch in classification models, we further perform classifier adaptation to learn transfer classifiers that make domain adaptation more effective. Although the source classifier fs(x) and target classifier ft(x) are different, fs(x) ̸= ft(x), they should be related to ensure the feasibility of domain adaptation. It is reasonable to assume that fs(x) and ft(x) differ only by a small perturbation function ∆f(x). Prior work on classifier adaptation [23, 24, 25] assumes that ft(x) = fs(x) + ∆f(x), where the perturbation ∆f(x) is a function of input feature x. However, these methods require target labeled data to learn the perturbation function, which cannot be applied to unsupervised domain adaptation where target domain has no labeled data. How to bridge fs(x) and ft(x) in a framework is a key challenge of unsupervised domain adaptation. We postulate that the perturbation function ∆f(x) can be learned jointly from the source labeled data and target unlabeled data, given that the source classifier and target classifier are properly connected. To enable classifier adaptation, consider fitting F(x) as an original mapping by a few stacked layers (convolutional or fully connected layers) in Figure 1 (right), where x denotes the inputs to the first of these layers [8]. If one hypothesizes that multiple nonlinear layers can asymptotically approximate complicated functions, then it is equivalent to hypothesize that they can asymptotically approximate the residual functions, i.e. F(x) −x. Rather than expecting stacked layers to approximate F(x), one explicitly lets these layers approximate a residual function ∆F(x) ≜F(x) −x, with the original function being ∆F(x) + x. The operation ∆F(x) + x is performed by a shortcut connection and an element-wise addition, while the residual function is parameterized by residual layers within each residual block. Although both forms are able to asymptotically approximate the desired functions, the ease of learning is different. In reality, it is unlikely that identity mappings are optimal, but it should be easier to find the perturbations with reference to an identity mapping, than to learn the function as new. The residual learning is the key to the successful training of very deep networks. The deep residual network (ResNet) framework [8] bridges the inputs and outputs of the residual layers by the shortcut connection (identity mapping) such that F(x) = ∆F(x) + x, which eases the learning of residual function ∆F(x) (similar to the perturbation function across the source and target classifiers). Based on this key observation, we extend the CNN architectures (Figure 1, left) by plugging in the residual block (Figure 1, right). We reformulate the residual block to bridge the source classifier fS(x) and target classifier fT (x) by letting x ≜fT (x), F(x) ≜fS(x), and ∆F(x) ≜∆f(x). Note that fS(x) is the outputs of the element-wise addition operator and fT (x) is the outputs of the targetclassifier layer fcc, both before softmax activation σ(·), fs (x) ≜σ (fS (x)) , ft (x) ≜σ (fT (x)). We can connect the source classifier and target classifier (before activation) by the residual block as fS (x) = fT (x) + ∆f (x) , (3) where we use functions fS and fT before softmax for residual block to ensure that the final classifiers fs and ft will output probabilities. Residual layers fc1–fc2 are fully-connected layers with c × c units, where c is the number of classes. We set the source classifier fS as the outputs of the residual block to make it better trainable from the source-labeled data by deep residual learning [8]. In other words, if we set fT as the outputs of the residual block, then we may be unable to learn it successfully as we do not have target labeled data and thus standard back-propagation will not work. Deep residual learning [8] ensures to output valid classifiers |∆f (x)| ≪|fT (x)| ≈|fS (x)|, and more importantly, 4 makes the perturbation function ∆f (x) dependent on both the target classifier fT (x) (due to the functional dependency) as well as the source classifier fS(x) (due to the back-propagation pipeline). Although we successfully cast the classifier adaptation into the residual learning framework while the residual learning framework tends to make the target classifier ft(x) not deviate much from the source classifier fs(x), we still cannot guarantee that ft(x) will fit the target-specific structures well. To address this problem, we further exploit the entropy minimization principle [28] for refining the classifier adaptation, which encourages the low-density separation between classes by minimizing the entropy of class-conditional distribution f t j(xt i) = p(yt i = j|xt i; ft) on target domain data Dt as min ft 1 nt nt X i=1 H ft xt i , (4) where H(·) is the entropy function of class-conditional distribution ft (xt i) defined as H (ft (xt i)) = −Pc j=1 f t j (xt i) log f t j (xt i), c is the number of classes, and f t j (xt i) is the probability of predicting point xt i to class j. By minimizing entropy penalty (4), the target classifier ft(x) is made directly accessible to target-unlabeled data and will amend itself to pass through the target low-density regions. 3.3 Residual Transfer Network To enable effective unsupervised domain adaptation, we propose Residual Transfer Network (RTN), which jointly learns transferable features and adaptive classifiers by integrating deep feature learning (1), feature adaptation (2), and classifier adaptation (3)–(4) in an end-to-end deep learning framework, min fS=fT +∆f 1 ns ns X i=1 L (fs (xs i) , ys i ) + γ nt nt X i=1 H ft xt i + λ DL (Ds, Dt), (5) where λ and γ are the tradeoff parameters for the tensor MMD penalty (2) and entropy penalty (4) respectively. The proposed RTN model (5) is enabled to learn both transferable features and adaptive classifiers. As classifier adaptation proposed in this paper and feature adaptation studied in [5, 6] are tailored to adapt different layers of deep networks, they can complement each other to establish better performance. Since training deep CNNs requires a large amount of labeled data that is prohibitive for many domain adaptation applications, we start with the CNN models pre-trained on ImageNet 2012 data and fine-tune it as [5]. The training of RTN mainly follows standard back-propagation, with the residual transfer layers for classifier adaptation as [8]. Note that, the optimization of tensor MMD penalty (2) requires carefully-designed algorithm to establish linear-time training, as detailed in [5]. We also adopt bilinear pooling [29] to reduce the dimensions of fusion features in tensor MMD (2). 4 Experiments We evaluate the residual transfer network against state of the art transfer learning and deep learning methods. Codes and datasets will be available at https://github.com/thuml/transfer-caffe. 4.1 Setup Office-31 [13] is a benchmark for domain adaptation, comprising 4,110 images in 31 classes collected from three distinct domains: Amazon (A), which contains images downloaded from amazon.com, Webcam (W) and DSLR (D), which contain images taken by web camera and digital SLR camera with different photographical settings, respectively. To enable unbiased evaluation, we evaluate all methods on all six transfer tasks A →W, D →W, W →D, A →D, D →A and W →A as in [5, 7]. Office-Caltech [14] is built by selecting the 10 common categories shared by Office-31 and Caltech256 (C), and is widely used by previous methods [14, 30]. We can build 12 transfer tasks: A →W, D →W, W →D, A →D, D →A, W →A, A →C, W →C, D →C, C →A, C →W, and C →D. While Office-31 has more categories and is more difficult for domain adaptation algorithms, 5 Office-Caltech provides more transfer tasks to enable an unbiased look at dataset bias [31]. We adopt DeCAF7 [2] features for shallow transfer methods and original images for deep adaptation methods. We compare with both conventional and the state of the art transfer learning and deep learning methods: Transfer Component Analysis (TCA) [9], Geodesic Flow Kernel (GFK) [14], Deep Convolutional Neural Network (AlexNet [26]), Deep Domain Confusion (DDC) [4], Deep Adaptation Network (DAN) [5], and Reverse Gradient (RevGrad) [6]. TCA is a conventional transfer learning method based on MMD-regularized Kernel PCA. GFK is a manifold learning method that interpolates across an infinite number of intermediate subspaces to bridge domains. DDC is the first method that maximizes domain invariance by adding to AlexNet an adaptation layer using linear-kernel MMD [27]. DAN learns more transferable features by embedding deep features of multiple task-specific layers to reproducing kernel Hilbert spaces (RKHSs) and matching different distributions optimally using multi-kernel MMD. RevGrad improves domain adaptation by making the source and target domains indistinguishable for a discriminative domain classifier via an adversarial training paradigm. To go deeper with the efficacy of classifier adaptation (residual transfer block) and feature adaptation (tensor MMD module), we perform ablation study by evaluating several variants of RTN: (1) RTN (mmd), which adds the tensor MMD module to AlexNet; (2) RTN (mmd+ent), which further adds the entropy penalty to AlexNet; (3) RTN (mmd+ent+res), which further adds the residual module to AlexNet. Note that RTN (mmd) improves DAN [5] by replacing the multiple MMD penalties in DAN by a single tensor MMD penalty in RTN (mmd), which facilitates much easier parameter selection. We follow standard protocols and use all labeled source data and all unlabeled target data for domain adaptation [5]. We compare average classification accuracy of each transfer task using three random experiments. For MMD-based methods (TCA, DDC, DAN, and RTN), we use Gaussian kernel with bandwidth b set to median pairwise squared distances on training data, i.e. median heuristic [27]. As there are no target labeled data in unsupervised domain adaptation, model selection proves difficult. For all methods, we perform cross-valuation on labeled source data to select candidate parameters, then conduct validation on transfer task A →W by requiring one labeled example per category from target domain W as the validation set, and fix the selected parameters throughout all transfer tasks. We implement all deep methods based on the Caffe deep-learning framework, and fine-tune from Caffe-provided models of AlexNet [26] pre-trained on ImageNet. For RTN, We fine-tune all the feature layers, train bottleneck layer fcb, classifier layer fcc and residual layers fc1–fc2, all through standard back-propagation. Since these new layers are trained from scratch, we set their learning rate to be 10 times that of the other layers. We use mini-batch stochastic gradient descent (SGD) with momentum of 0.9 and the learning rate annealing strategy implemented in RevGrad [6]: the learning rate is not selected through a grid search due to high computational cost—it is adjusted during SGD using the following formula: ηp = η0 (1+αp)β , where p is the training progress linearly changing from 0 to 1, η0 = 0.01, α = 10 and β = 0.75, which is optimized for low error on the source domain. As RTN can work stably across different transfer tasks, the MMD penalty parameter λ and entropy penalty γ are first selected on A →W and then fixed as λ = 0.3, γ = 0.3 for all other transfer tasks. 4.2 Results The classification accuracy results on the six transfer tasks of Office-31 are shown in Table 1, and the results on the twelve transfer tasks of Office-Caltech are shown in Table 2. The RTN model based on AlexNet (Figure 1) outperforms all comparison methods on most transfer tasks. In particular, RTN substantially improves the accuracy on hard transfer tasks, e.g. A →W and C →W, where the source and target domains are very different, and achieves comparable accuracy on easy transfer tasks, D →W and W →D, where source and target domains are similar [13]. These results suggest that RTN is able to learn more adaptive classifiers and transferable features for safer domain adaptation. From the results, we can make interesting observations. (1) Standard deep-learning methods (AlexNet) perform comparably with traditional shallow transfer-learning methods with deep DeCAF7 features as input (TCA and GFK). The only difference between these two sets of methods is that AlexNet can take the advantage of supervised fine-tuning on the source-labeled data, while TCA and GFK can take benefits of their domain adaptation procedures. This result confirms the current practice that supervised fine-tuning is important for transferring source classifier to target domain [19], and sustains the recent discovery that deep neural networks learn abstract feature representation, which can only reduce, but not remove, the cross-domain discrepancy [3]. This reveals that the two worlds of deep 6 Table 1: Accuracy on Office-31 dataset using standard protocol [5] for unsupervised adaptation. Method A →W D →W W →D A →D D →A W →A Avg TCA [9] 59.0±0.0 90.2±0.0 88.2±0.0 57.8±0.0 51.6±0.0 47.9±0.0 65.8 GFK [14] 58.4±0.0 93.6±0.0 91.0±0.0 58.6±0.0 52.4±0.0 46.1±0.0 66.7 AlexNet [26] 60.6±0.4 95.4±0.2 99.0±0.1 64.2±0.3 45.5±0.5 48.3±0.5 68.8 DDC [4] 61.0±0.5 95.0±0.3 98.5±0.3 64.9±0.4 47.2±0.5 49.4±0.6 69.3 DAN [5] 68.5±0.3 96.0±0.1 99.0±0.1 66.8±0.2 50.0±0.4 49.8±0.3 71.7 RevGrad [6] 73.0±0.6 96.4±0.4 99.2±0.3 RTN (mmd) 70.0±0.4 96.1±0.3 99.2±0.3 67.6±0.4 49.8±0.4 50.0±0.3 72.1 RTN (mmd+ent) 71.2±0.3 96.4±0.2 99.2±0.1 69.8±0.2 50.2±0.3 50.7±0.2 72.9 RTN (mmd+ent+res) 73.3±0.3 96.8±0.2 99.6±0.1 71.0±0.2 50.5±0.3 51.0±0.1 73.7 Table 2: Accuracy on Office-Caltech dataset using standard protocol [5] for unsupervised adaptation. Method A→W D→W W→D A→D D→A W→A A→C W→C D→C C→A C→W C→D Avg TCA [9] 84.4 96.9 99.4 82.8 90.4 85.6 81.2 75.5 79.6 92.1 88.1 87.9 87.0 GFK [14] 89.5 97.0 98.1 86.0 89.8 88.5 76.2 77.1 77.9 90.7 78.0 77.1 85.5 AlexNet [26] 79.5 97.7 100.0 87.4 87.1 83.8 83.0 73.0 79.0 91.9 83.7 87.1 86.1 DDC [4] 83.1 98.1 100.0 88.4 89.0 84.9 83.5 73.4 79.2 91.9 85.4 88.8 87.1 DAN [5] 91.8 98.5 100.0 91.7 90.0 92.1 84.1 81.2 80.3 92.0 90.6 89.3 90.1 RTN (mmd) 93.2 98.5 100.0 91.7 88.0 90.7 84.0 81.3 80.4 91.0 89.8 90.4 90.0 RTN (mmd+ent) 93.8 98.6 100.0 92.9 93.6 92.7 87.8 84.8 83.4 93.2 96.6 93.9 92.6 RTN (mmd+ent+res) 95.2 99.2 100.0 95.5 93.8 92.5 88.1 86.6 84.6 93.7 96.9 94.2 93.4 learning and domain adaptation cannot reinforce each other substantially in the two-step pipeline, which motivates carefully-designed deep adaptation architectures to unify them. (2) Deep-transfer learning methods that reduce the domain discrepancy by domain-adaptive deep networks (DDC, DAN and RevGrad) substantially outperform standard deep learning methods (AlexNet) and traditional shallow transfer-learning methods with deep features as the input (TCA and GFK). This confirms that incorporating domain-adaptation modules into deep networks can improve domain adaptation performance. By adapting source-target distributions in multiple task-specific layers using optimal multi-kernel two-sample matching, DAN performs the best in general among the prior deep-transfer learning methods. (3) The proposed residual transfer network (RTN) performs the best and sets up a new state of the art result on these benchmark datasets. Different from all the previous deep-transfer learning methods that only adapt the feature layers of deep neural networks to learn more transferable features, RTN further adapts the classifier layers to bridge the source and target classifiers in an end-to-end residual learning framework, which can correct the classifier mismatch more effectively. To go deeper into different modules of RTN, we show the results of RTN variants in Tables 1 and 2. (1) RTN (mmd) slightly outperforms DAN, but RTN (mmd) has only one MMD penalty parameter while DAN has two or three. Thus the proposed tensor MMD module is effective for adapting multiple feature layers using a single MMD penalty, which is important for easy model selection. (2) RTN (mmd+ent) performs substantially better than RTN (mmd). This highlights the importance of entropy minimization for low-density separation, which exploits the cluster structure of target-unlabeled data such that the target-classifier can be better adapted to the target data. (3) RTN (mmd+ent+res) performs the best across all variants. This highlights the importance of residual transfer of classifier layers for learning more adaptive classifiers. This is critical as in practical applications, there is no guarantee that the source classifier and target classifier can be safely shared. It is worth noting that, the entropy penalty and the residual module should be used together, otherwise the residual function tends to learn useless zero mapping such that the source and target classifiers are nearly identical [8]. 4.3 Discussion Predictions Visualization: We respectively visualize in Figures 2(a)–2(d) the t-SNE embeddings [2] of the predictions by DAN and RTN on transfer task A →W. We can make the following observations. (1) The predictions made by DAN in Figure 2(a)–2(b) show that the target categories are not well discriminated by the source classifier, which implies that target data is not well compatible with the source classifier. Hence the source and target classifiers should not be assumed to be identical, which has been a common assumption made by all prior deep domain adaptation methods [4, 5, 6, 7]. (2) The predictions made by RTN in Figures 2(c)–2(d) show that the target categories are discriminated 7 (a) DAN: Source=A (b) DAN: Target=W (c) RTN: Source=A (d) RTN: Target=W Figure 2: Visualization: (a)-(b) t-SNE of DAN predictions; (c)-(d) t-SNE of RTN predictions. mean deviation Statistics 0 2 4 6 8 Layer Responses fS(x) fT(x) ∆f(x) (a) Layer Responses 10 20 30 Class -1.5 -1 -0.5 Weight Parameters fs ft (b) Classifier Shift 0.01 0.04 0.07 0.1 0.4 0.7 1 γ 50 60 70 80 90 100 Average Accuracy (%) A→W C→W (c) Accuracy w.r.t. γ Figure 3: (a) layer responses; (b) classifier shift; (c) sensitivity of γ (dashed lines show best baselines). better by the target classifier (larger class-to-class distances), which suggests that residual transfer of classifiers is a reasonable extension to previous deep feature adaptation methods. RTN simultaneously learns more adaptive classifiers and more transferable features to enable effective domain adaptation. Layer Responses: We show in Figure 3(a) the means and standard deviations of the layer responses [8], which are the outputs of fT (x) (fcc layer), ∆f(x) (fc2 layer), and fS(x) (after element-wise sum operator), respectively. This exposes the response strength of the residual functions. The results show that the residual function ∆f(x) have generally much smaller responses than the shortcut function fT (x). These results support our motivation that the residual functions are generally smaller than the non-residual functions, as they characterize the small gap between the source classifier and target classifier. The small residual function can be learned effectively via deep residual learning [8]. Classifier Shift: To justify that there exists a classifier shift between source classifier fs and target classifier ft, we train fs on source domain and ft on target domain, both provided with labeled data. By taking A as source domain and W as target domain, the weight parameters of the classifiers (e.g. softmax regression) are shown in Figure 3(b), which shows that fs and ft are substantially different. Parameter Sensitivity: We check the sensitivity of entropy parameter γ on transfer tasks A →W (31 classes) and C →W (10 classes) by varying the parameter in {0.01, 0.04, 0.07, 0.1, 0.4, 0.7, 1.0}. The results are shown in Figures 3(c), with the best results of the baselines shown as dashed lines. The accuracy of RTN first increases and then decreases as γ varies and demonstrates a desirable bell-shaped curve. This justifies our motivation of jointly learning transferable features and adaptive classifiers by the RTN model, as a good trade-off between them can promote transfer performance. 5 Conclusion This paper presented a novel approach to unsupervised domain adaptation in deep networks, which enables end-to-end learning of adaptive classifiers and transferable features. Similar to many prior domain adaptation techniques, feature adaptation is achieved by matching the distributions of features across domains. However, unlike previous work, the proposed approach also supports classifier adaptation, which is implemented through a new residual transfer module that bridges the source classifier and target classifier. This makes the approach a good complement to existing techniques. The approach can be trained by standard back-propagation, which is scalable and can be implemented by most deep learning package. Future work constitutes semi-supervised domain adaptation extensions. Acknowledgments This work was supported by the National Natural Science Foundation of China (61502265, 61325008), National Key R&D Program of China (2016YFB1000701, 2015BAF32B01), and TNList Key Project. 8 References [1] S. J. Pan and Q. Yang. A survey on transfer learning. TKDE, 22(10):1345–1359, 2010. [2] J. Donahue, Y. Jia, O. Vinyals, J. Hoffman, N. Zhang, E. Tzeng, and T. Darrell. Decaf: A deep convolutional activation feature for generic visual recognition. In ICML, 2014. [3] J. Yosinski, J. Clune, Y. Bengio, and H. Lipson. How transferable are features in deep neural networks? In NIPS, 2014. [4] E. Tzeng, J. Hoffman, N. Zhang, K. Saenko, and T. Darrell. Deep domain confusion: Maximizing for domain invariance. 2014. [5] M. Long, Y. Cao, J. Wang, and M. I. Jordan. Learning transferable features with deep adaptation networks. In ICML, 2015. [6] Y. Ganin and V. Lempitsky. Unsupervised domain adaptation by backpropagation. In ICML, 2015. [7] E. Tzeng, J. Hoffman, N. Zhang, K. Saenko, and T. Darrell. Simultaneous deep transfer across domains and tasks. In ICCV, 2015. [8] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In CVPR, 2016. [9] S. J. Pan, I. W. Tsang, J. T. Kwok, and Q. Yang. Domain adaptation via transfer component analysis. TNNLS, 22(2):199–210, 2011. [10] L. Duan, I. W. Tsang, and D. Xu. Domain transfer multiple kernel learning. TPAMI, 34(3):465–479, 2012. [11] K. Zhang, B. Schölkopf, K. Muandet, and Z. Wang. Domain adaptation under target and conditional shift. In ICML, 2013. [12] X. Wang and J. Schneider. Flexible transfer learning under support and model shift. In NIPS, 2014. [13] K. Saenko, B. Kulis, M. Fritz, and T. Darrell. Adapting visual category models to new domains. In ECCV, 2010. [14] B. Gong, Y. Shi, F. Sha, and K. Grauman. Geodesic flow kernel for unsupervised domain adaptation. In CVPR, 2012. [15] J. Hoffman, S. Guadarrama, E. Tzeng, R. Hu, J. Donahue, R. Girshick, T. Darrell, and K. Saenko. LSDA: Large scale detection through adaptation. In NIPS, 2014. [16] R. Collobert, J. Weston, L. Bottou, M. Karlen, K. Kavukcuoglu, and P. Kuksa. Natural language processing (almost) from scratch. JMLR, 12:2493–2537, 2011. [17] Y. Bengio, A. Courville, and P. Vincent. Representation learning: A review and new perspectives. TPAMI, 35(8):1798–1828, 2013. [18] X. Glorot, A. Bordes, and Y. Bengio. Domain adaptation for large-scale sentiment classification: A deep learning approach. In ICML, 2011. [19] M. Oquab, L. Bottou, I. Laptev, and J. Sivic. Learning and transferring mid-level image representations using convolutional neural networks. In CVPR, June 2013. [20] J. Ngiam, A. Khosla, M. Kim, J. Nam, H. Lee, and A. Y. Ng. Multimodal deep learning. In ICML, 2011. [21] Y. Mansour, M. Mohri, and A. Rostamizadeh. Domain adaptation: Learning bounds and algorithms. In COLT, 2009. [22] S. Ben-David, J. Blitzer, K. Crammer, A. Kulesza, F. Pereira, and J. W. Vaughan. A theory of learning from different domains. MLJ, 79(1-2):151–175, 2010. [23] J. Yang, R. Yan, and A. G. Hauptmann. Cross-domain video concept detection using adaptive svms. In MM, pages 188–197. ACM, 2007. [24] Lixin Duan, Ivor W Tsang, Dong Xu, and Tat-Seng Chua. Domain adaptation from multiple sources via auxiliary classifiers. In ICML, pages 289–296. ACM, 2009. [25] L. Duan, D. Xu, I. W. Tsang, and J. Luo. Visual event recognition in videos by learning from web data. TPAMI, 34(9):1667–1680, 2012. [26] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012. [27] A. Gretton, K. Borgwardt, M. Rasch, B. Schölkopf, and A. Smola. A kernel two-sample test. JMLR, 13:723–773, March 2012. [28] Y. Grandvalet and Y. Bengio. Semi-supervised learning by entropy minimization. In NIPS, 2004. [29] Tsung-Yu Lin, Aruni RoyChowdhury, and Subhransu Maji. Bilinear cnn models for fine-grained visual recognition. In CVPR, pages 1449–1457, 2015. [30] B. Sun, J. Feng, and K. Saenko. Return of frustratingly easy domain adaptation. In AAAI, 2016. [31] A. Torralba and A. A. Efros. Unbiased look at dataset bias. In CVPR, 2011. 9 | 2016 | 398 |
6,325 | Stochastic Gradient MCMC with Stale Gradients Changyou Chen† Nan Ding‡ Chunyuan Li† Yizhe Zhang† Lawrence Carin† †Dept. of Electrical and Computer Engineering, Duke University, Durham, NC, USA ‡Google Inc., Venice, CA, USA †{cc448,cl319,yz196,lcarin}@duke.edu; ‡dingnan@google.com Abstract Stochastic gradient MCMC (SG-MCMC) has played an important role in largescale Bayesian learning, with well-developed theoretical convergence properties. In such applications of SG-MCMC, it is becoming increasingly popular to employ distributed systems, where stochastic gradients are computed based on some outdated parameters, yielding what are termed stale gradients. While stale gradients could be directly used in SG-MCMC, their impact on convergence properties has not been well studied. In this paper we develop theory to show that while the bias and MSE of an SG-MCMC algorithm depend on the staleness of stochastic gradients, its estimation variance (relative to the expected estimate, based on a prescribed number of samples) is independent of it. In a simple Bayesian distributed system with SG-MCMC, where stale gradients are computed asynchronously by a set of workers, our theory indicates a linear speedup on the decrease of estimation variance w.r.t. the number of workers. Experiments on synthetic data and deep neural networks validate our theory, demonstrating the effectiveness and scalability of SG-MCMC with stale gradients. 1 Introduction The pervasiveness of big data has made scalable machine learning increasingly important, especially for deep models. A basic technique is to adopt stochastic optimization algorithms [1], e.g., stochastic gradient descent and its extensions [2]. In each iteration of stochastic optimization, a minibatch of data is used to evaluate the gradients of the objective function and update model parameters (errors are introduced in the gradients, because they are computed based on minibatches rather than the entire dataset; since the minibatches are typically selected at random, this yields the term “stochastic” gradient). This is highly scalable because processing a minibatch of data in each iteration is relatively cheap compared to analyzing the entire (large) dataset at once. Under certain conditions, stochastic optimization is guaranteed to converge to a (local) optima [1]. Because of its scalability, the minibatch strategy has recently been extended to Markov Chain Monte Carlo (MCMC) Bayesian sampling methods, yielding SG-MCMC [3, 4, 5]. In order to handle large-scale data, distributed stochastic optimization algorithms have been developed, for example [6], to further improve scalability. In a distributed setting, a cluster of machines with multiple cores cooperate with each other, typically through an asynchronous scheme, for scalability [7, 8, 9]. A downside of an asynchronous implementation is that stale gradients must be used in parameter updates (“stale gradients” are stochastic gradients computed based on outdated parameters, instead of the latest parameters; they are easier to compute in a distributed system, but introduce additional errors relative to traditional stochastic gradients). While some theory has been developed to guarantee the convergence of stochastic optimization with stale gradients [10, 11, 12], little analysis has been done in a Bayesian setting, where SG-MCMC is applied. Distributed SG-MCMC algorithms share characteristics with distributed stochastic optimization, and thus are highly scalable and suitable for large-scale Bayesian learning. Existing Bayesian distributed systems with traditional MCMC methods, such as [13], usually employ stale statistics instead of stale gradients, where stale statistics 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. are summarized based on outdated parameters, e.g., outdated topic distributions in distributed Gibbs sampling [13]. Little theory exists to guarantee the convergence of such methods. For existing distributed SG-MCMC methods, typically only standard stochastic gradients are used, for limited problems such as matrix factorization, without rigorous convergence theory [14, 15, 16]. In this paper, by extending techniques from standard SG-MCMC [17], we develop theory to study the convergence behavior of SG-MCMC with Stale gradients (S2G-MCMC). Our goal is to evaluate the posterior average of a test function φ(x), defined as ¯φ ≜ R X φ(x)ρ(x)d x, where ρ(x) is the desired posterior distribution with x the possibly augmented model parameters (see Section 2). In practice, S2G-MCMC generates L samples {xl}L l=1 and uses the sample average ˆφL ≜ 1 L PL l=1 φ(xl) to approximate ¯φ. We measure how ˆφL approximates ¯φ in terms of bias, MSE and estimation variance, defined as |EˆφL −¯φ|, E ˆφL −¯φ 2 and E ˆφL −EˆφL 2 , respectively. From the definitions, the bias and MSE characterize how accurately ˆφL approximates ¯φ, and the variance characterizes how fast ˆφL converges to its own expectation (for a prescribed number of samples L). Our theoretical results show that while the bias and MSE depend on the staleness of stochastic gradients, the variance is independent of it. In a simple asynchronous Bayesian distributed system with S2G-MCMC, our theory indicates a linear speedup on the decrease of the variance w.r.t. the number of workers used to calculate the stale gradients, while maintaining the same optimal bias level as standard SG-MCMC. We validate our theory on several synthetic experiments and deep neural network models, demonstrating the effectiveness and scalability of the proposed S2G-MCMC framework. Related Work Using stale gradients is a standard setup in distributed stochastic optimization systems. Representative algorithms include, but are not limited to, the ASYSG-CON [6] and HOGWILD! algorithms [18], and some more recent developments [19, 20]. Furthermore, recent research on stochastic optimization has been extended to non-convex problems with provable convergence rates [12]. In Bayesian learning with MCMC, existing work has focused on running parallel chains on subsets of data [21, 22, 23, 24], and little if any effort has been made to use stale stochastic gradients, the setting considered in this paper. 2 Stochastic Gradient MCMC Throughout this paper, we denote vectors as bold lower-case letters, and matrices as bold uppercase letters. For example, N(m, Σ) means a multivariate Gaussian distribution with mean m and covariance Σ. In the analysis we consider algorithms with fixed-stepsizes for simplicity; decreasingstepsize variants can be addressed similarly as in [17]. The goal of SG-MCMC is to generate random samples from a posterior distribution p(θ| D) ∝ p(θ) QN i=1 p(di |θ), which are used to evaluate a test function. Here θ ∈Rn represents the parameter vector and D = {d1, · · · , dN} represents the data, p(θ) is the prior distribution, and p(di |θ) the likelihood for di. SG-MCMC algorithms are based on a class of stochastic differential equations, called Itô diffusion, defined as d xt = F(xt)dt + g(xt)dwt , (1) where x ∈Rm represents the model states, typically x augments θ such that θ ⊆x and n ≤m; t is the time index, wt ∈Rm is m-dimensional Brownian motion, functions F : Rm →Rm and g : Rm →Rm×m are assumed to satisfy the usual Lipschitz continuity condition [25]. For appropriate functions F and g, the stationary distribution, ρ(x), of the Itô diffusion (1) has a marginal distribution equal to the posterior distribution p(θ| D) [26]. For example, denoting the unnormalized negative log-posterior as U(θ) ≜−log p(θ) −PN i=1 log p(di |θ), the stochastic gradient Langevin dynamic (SGLD) method [3] is based on 1st-order Langevin dynamics, with x = θ, and F(xt) = −∇θU(θ), g(xt) = √ 2 In, where In is the n × n identity matrix. The stochastic gradient Hamiltonian Monte Carlo (SGHMC) method [4] is based on 2nd-order Langevin dynamics, with x = (θ, q), and F(xt) = q −B q −∇θU(θ) , g(xt) = √ 2B 0 0 0 In for a scalar B > 0; q is an auxiliary variable known as the momentum [4, 5]. Diffusion forms for other SG-MCMC algorithms, such as the stochastic gradient thermostat [5] and variants with Riemannian information geometry [27, 26, 28], are defined similarly. In order to efficiently draw samples from the continuous-time diffusion (1), SG-MCMC algorithms typically apply two approximations: i) Instead of analytically integrating infinitesimal increments 2 dt, numerical integration over small step size h is used to approximate the integration of the true dynamics. ii) Instead of working with the full gradient ∇θU(θlh), a stochastic gradient ∇θ ˜Ul(θlh), defined as ∇θ ˜Ul(θ) ≜−∇θ log p(θ) −N J J X i=1 ∇θ log p(dπi |θ), (2) is calculated from a minibatch of size J, where {π1, · · · , πJ} is a random subset of {1, · · · , N}. Note that to match the time index t in (1), parameters have been and will be indexed by “lh” in the l-th iteration. 3 Stochastic Gradient MCMC with Stale Gradients In this section, we extend SG-MCMC to the stale-gradient setting, commonly met in asynchronous distributed systems [7, 8, 9], and develop theory to analyze convergence properties. 3.1 Stale stochastic gradient MCMC (S2G-MCMC) The setting for S2G-MCMC is the same as the standard SG-MCMC described above, except that the stochastic gradient (2) is replaced with a stochastic gradient evaluated with outdated parameter θ(l−τl)h instead of the latest version θlh (see Appendix A for an example): ∇θ ˆUτl(θ) ≜−∇θ log p(θ(l−τl)h) −N J J X i=1 ∇θ log p(dπi |θ(l−τl)h), (3) where τl ∈Z+ denotes the staleness of the parameter used to calculate the stochastic gradient in the l-th iteration. A distinctive difference between S2G-MCMC and SG-MCMC is that stale stochastic gradients are no longer unbiased estimations of the true gradients. This leads to additional challenges in developing convergence bounds, one of the main contributions of this paper. Algorithm 1 State update of SGHMC with the stale stochastic gradient ∇θ ˆUτl(θ) Input: xlh = (θlh, qlh), ∇θ ˆUτl(θ), τl, τ, h, B Output: x(l+1)h = (θ(l+1)h, q(l+1)h) if τl ≤τ then Draw ζl ∼N(0, I); q(l+1)h = (1−Bh) qlh −∇θ ˆUτl(θ)h+ √ 2Bhζl; θ(l+1)h = θlh + q(l+1)h h; end if We assume a bounded staleness for all τl’s, i.e., max l τl ≤τ for some constant τ. As an example, Algorithm 1 describes the update rule of the stale-SGHMC in each iteration with the Euler integrator, where the stale gradient ∇θ ˆUτl(θ) with staleness τl is used. 3.2 Convergence analysis This section analyzes the convergence properties of the basic S2G-MCMC; an extension with multiple chains is discussed in Section 3.3. It is shown that the bias and MSE depend on the staleness parameter τ, while the variance is independent of it, yielding significant speedup in Bayesian distributed systems. Bias and MSE In [17], the bias and MSE of the standard SG-MCMC algorithms with a Kth order integrator were analyzed, where the order of an integrator reflects how accurately an SG-MCMC algorithm approximates the corresponding continuous diffusion. Specifically, if evolving xt with a numerical integrator using discrete time increment h induces an error bounded by O(hK), the integrator is called a Kth order integrator, e.g., the popular Euler method used in SGLD [3] is a 1st-order integrator. In particular, [17] proved the bounds stated in Lemma 1. Lemma 1 ([17]). Under standard assumptions (see Appendix B), the bias and MSE of SG-MCMC with a Kth-order integrator at time T = hL are bounded as: Bias: EˆφL −¯φ = O P l ∥E∆Vl∥ L + 1 Lh + hK MSE: E ˆφL −¯φ 2 = O 1 L P l E ∥∆Vl∥2 L + 1 Lh + h2K ! Here ∆Vl ≜L −˜Ll, where L is the generator of the Itô diffusion (1) defined as Lf(xt) ≜lim h→0+ E [f(xt+h)] −f(xt) h = F(xt) · ∇x + 1 2 g(xt)g(xt)T :∇x∇T x f(xt) , (4) 3 for any compactly supported twice differentiable function f : Rn →R, h →0+ means h approaches zero along the positive real axis. ˜Ll is the same as L except using the stochastic gradient ∇˜Ul instead of the full gradient. We show that the bounds of the bias and MSE of S2G-MCMC share similar forms as SG-MCMC, but with additional dependence on the staleness parameter. In addition to the assumptions in SG-MCMC [17] (see details in Appendix B), the following additional assumption is imposed. Assumption 1. The noise in the stochastic gradients is well-behaved, such that: 1) the stochastic gradient is unbiased, i.e., ∇θU(θ) = Eξ∇θ ˜U(θ) where ξ denotes the random permutation over {1, · · · , N}; 2) the variance of stochastic gradient is bounded, i.e., Eξ
U(θ) −˜U(θ)
2 ≤σ2; 3) the gradient function ∇θU is Lipschitz (so is ∇θ ˜U), i.e., ∥∇θU(x) −∇θU(y)∥≤C ∥x −y∥, ∀x, y. In the following theorems, we omit the assumption statement for conciseness. Due to the staleness of the stochastic gradients, the term ∆Vl in S2G-MCMC is equal to L −˜Ll−τl, where ˜Ll−τl arises from ∇θ ˆUτl. The challenge arises to bound these terms involving ∆Vl. To this end, define flh ≜
xlh −x(l−1)h
, and ψ to be a functional satisfying the Poisson Equation∗: 1 L L X l=1 Lψ(xlh) = ˆφL −¯φ . (5) Theorem 2. After L iterations, the bias of S2G-MCMC with a Kth-order integrator is bounded, for some constant D1 independent of {L, h, τ}, as: EˆφL −¯φ ≤D1 1 Lh + M1τh + M2hK , where M1 ≜maxl |Lflh| maxl ∥E∇ψ(xlh)∥C, M2 ≜PK k=1 P l E˜L k+1 l ψ(x(l−1)h) (k+1)!L are constants. Theorem 3. After L iterations, the MSE of S2G-MCMC with a Kth-order integrator is bounded, for some constant D2 independent of {L, h, τ}, as: E ˆφL −¯φ 2 ≤D2 1 Lh + ˜ M1τ 2h2 + ˜ M2h2K , where constants ˜ M1 ≜maxl ∥E∇ψ(xlh)∥2 maxl (Lflh)2 C2, ˜ M2 ≜E( P l ˜L K+1 l ψ(x(l−1)h) L(K+1)! )2. The theorems indicate that both the bias and MSE depend on the staleness parameter τ. For a fixed computational time, this could possibly lead to unimproved bounds, compared to standard SG-MCMC, when τ is too large, i.e., the terms with τ would dominate, as is the case in the distributed system discussed in Section 4. Nevertheless, better bounds than standard SG-MCMC could be obtained if the decrease of 1 Lh is faster than the increase of the staleness in a distributed system. Variance Next we investigate the convergence behavior of the variance, Var(ˆφL) ≜ E ˆφL −EˆφL 2 . Theorem 4 indicates the variance is independent of τ, hence a linear speedup in the decrease of variance is always achievable when stale gradients are computed in parallel. An example is discussed in the Bayesian distributed system in Section 4. Theorem 4. After L iterations, the variance of S2G-MCMC with a Kth-order integrator is bounded, for some constant D, as: Var ˆφL ≤D 1 Lh + h2K . The variance bound is the same as for standard SG-MCMC, whereas L could increase linearly w.r.t.the number of workers in a distributed setting, yielding significant variance reduction. When optimizing the the variance bound w.r.t.h, we get an optimal variance bound stated in Corollary 5. Corollary 5. In term of estimation variance, the optimal convergence rate of S2G-MCMC with a Kth-order integrator is bounded as: Var ˆφL ≤O L−2K/(2K+1) . ∗The existence of a nice ψ is guaranteed in the elliptic/hypoelliptic SDE settings when x is on a torus [25]. 4 In real distributed systems, the decrease of 1/Lh and increase of τ, in the bias and MSE bounds, would typically cancel, leading to the same bias and MSE level compared to standard SG-MCMC, whereas a linear speedup on the decrease of variance w.r.t. the number of workers is always achievable. More details are discussed in Section 4. 3.3 Extension to multiple parallel chains This section extends the theory to the setting with S parallel chains, each independently running an S2G-MCMC algorithm. After generating samples from the S chains, an aggregation step is needed to combine the sample average from each chain, i.e., {ˆφLs}M s=1, where Ls is the number of iterations on chain s. For generality, we allow each chain to have different step sizes, e.g., (hs)S s=1. We aggregate the sample averages as ˆφS L ≜PS s=1 Ts T ˆφLs, where Ts ≜Lshs, T ≜PS s=1 Ts. Interestingly, with increasing S, using multiple chains does not seem to directly improve the convergence rate for the bias, but improves the MSE bound, as stated in Theorem 6. Theorem 6. Let Tm ≜maxl Tl, hm ≜maxl hl, ¯T = T/S, the bias and MSE of S parallel S2GMCMC chains with a Kth-order integrator are bounded, for some constants D1 and D2 independent of {L, h, τ}, as: Bias: EˆφS L −¯φ ≤D1 1 ¯T + Tm ¯T M1τhs + M2hK s MSE: E ˆφS L −¯φ 2 ≤D2 1 −1/ ¯T T + 1 ¯T 2 + T 2 m ¯T 2 M 2 1 τ 2h2 s + M 2 2 h2K s . Assume that ¯T = T/S is independent of the number of chains. As a result, using multiple chains does not directly improve the bound for the bias†. However, for the MSE bound, although the last two terms are independent of S, the first term decreases linearly with respect to S because T = ¯TS. This indicates a decreased estimation variance with more chains. This matches the intuition because more samples can be obtained with more chains in a given amount of time. The decrease of MSE for multiple-chain is due to the decrease of the variance as stated in Theorem 7. Theorem 7. The variance of S parallel S2G-MCMC chains with a Kth-order integrator is bounded, for some constant D independent of {L, h, τ}, as: E ˆφS L −EˆφS L 2 ≤D 1 T + S X s=1 T 2 s T 2 h2K s ! . When using the same step size for all chains, Theorem 7 gives an optimal variance bound of O (P s Ls)−2K/(2K+1) , i.e. a linear speedup with respect to S is achieved. In addition, Theorem 6 with τ = 0 and K = 1 provides convergence rates for the distributed SGLD algorithm in [14], i.e., improved MSE and variance bounds compared to the single-server SGLD. 4 Applications to Distributed SG-MCMC Systems Our theory for S2G-MCMC is general, serving as a basic analytic tool for distributed SG-MCMC systems. We propose two simple Bayesian distributed systems with S2G-MCMC in the following. Single-chain distributed SG-MCMC Perhaps the simplest architecture is an asynchronous distributed SG-MCMC system, where a server runs an S2G-MCMC algorithm, with stale gradients computed asynchronously from W workers. The detailed operations of the server and workers are described in Appendix A. With our theory, now we explain the convergence property of this simple distributed system with SG-MCMC, i.e., a linear speedup w.r.t. the number of workers on the decrease of variance, while maintaining the same bias level. To this end, rewrite L = W ¯L from Theorems 2 and 3, where ¯L is the average number of iterations on each worker. We can observe from the theorems that when M1τh > M2hK in the bias and ˜ M1τ 2h2 > ˜ M2h2K in the MSE, the terms with τ dominate. Optimizing the bounds with respect to h yields a bound of O((τ/W ¯L)1/2) for the bias, and O((τ/W ¯L)2/3) for the MSE. In practice, we usually observe τ ≈W, making W in the optimal bounds cancels, i.e., the same optimal bias and MSE bounds as standard SG-MCMC are obtained, no theoretical speedup is †It means the bound does not directly relate to low-order terms of S, though constants might be improved. 5 achieved when increasing W. However, from Corollary 5, the variance is independent of τ, thus a linear speedup on the variance bound can be always obtained when increasing the number of workers, i.e., the distributed SG-MCMC system convergences a factor of W faster than standard SG-MCMC with a single machine. We are not aware of similar conclusions from optimization, because most of the research focuses on the convex setting, thus only variance (equivalent to MSE) is studied. Multiple-chain distributed SG-MCMC We can also adopt multiple servers based on the multiplechain setup in Section 3.3, where each chain corresponds to one server. The detailed architecture is described in Appendix A. This architecture trades off communication cost with convergence rates. As indicated by Theorems 6 and 7, the MSE and variance bounds can be improved with more servers. Note that when only one worker is associated with one server, we recover the setting of S independent servers. Compared to the single-server architecture described above with S workers, from Theorems 2–7, while the variance bound is the same, the single-server arthitecture improves the bias and MSE bounds by a factor of S. More advanced architectures More complex architectures could also be designed to reduce communication cost, for example, by extending the downpour [7] and elastic SGD [29] architectures to the SG-MCMC setting. Their convergence properties can also be analyzed with our theory since they are essentially using stale gradients. We leave the detailed analysis for future work. 5 Experiments Our primal goal is to validate the theory, comparing with different distributed architectures and algorithms, such as [30, 31], is beyond the scope of this paper. We first use two synthetic experiments to validate the theory, then apply the distributed architecture described in Section 4 for Bayesian deep learning. To quantitatively describe the speedup property, we adopt the the iteration speedup [12], defined as: iteration speedup ≜#iterations with a single worker average #iterations on a worker , where # is the iteration count when the same level of precision is achieved. This speedup best matches with the theory. We also consider the time speedup, defined as: running time for a single worker running time for W worker , where the running time is recorded at the same accuracy. It is affected significantly by hardware, thus is not accurately consistent with the theory. 5.1 Synthetic experiments 10 1 10 2 10 3 10 4 #iterations: L 10 0 10 1 MSE = = 1 = = 2 = = 5 = = 10 = = 15 = = 20 Achieving the same MSE level Figure 1: MSE vs. # iterations (L = 500 × τ) with increasing staleness τ. Resulting in roughly the same MSE. Impact of stale gradients A simple Gaussian model is used to verify the impact of stale gradients on the convergence accuracy, with di ∼N(θ, 1), θ ∼N(0, 1). 1000 data samples {di} are generated, with minibatches of size 10 to calculate stochastic gradients. The test function is φ(θ) ≜θ2. The distributed SGLD algorithm is adopted in this experiment. We aim to verify that the optimal MSE bound ∝τ 2/3L−2/3, derived from Theorem 3 and discussed in Section 4 (with W = 1). The optimal stepsize is h = Cτ −2/3L−1/3 for some constant C. Based on the optimal bound, setting L = L0 × τ for some fixed L0 and varying τ’s would result in the same MSE, which is ∝L−2/3 0 . In the experiments we set C = 1/30, L0 = 500, τ = {1, 2, 5, 10, 15, 20}, and average over 200 runs to approximate the expectations in the MSE formula. As indicated in Figure 1, approximately the same MSE’s are obtained after L0τ iterations for different τ values, consistent with the theory. Note since the stepsizes are set to make end points of the curves reach the optimal MSE’s, the curves would not match the optimal MSE curves of τ 2/3L−2/3 in general, except for the end points, i.e., they are lower bounded by τ 2/3L−2/3. Convergence speedup of the variance A Bayesian logistic regression model (BLR) is adopted to verify the variance convergence properties. We use the Adult dataset‡, a9a, with 32,561 training samples and 16,281 test samples. The test function is defined as the standard logistic loss. We average over 10 runs to estimate the expectation EˆφL in the variance. We use the single-server distributed architecture in Section 4, with multiple workers computing stale gradients in parallel. We plot the variance versus the average number of iterations on the workers (¯L) and the running time in Figure 2 (a) and (b), respectively. We can see that the variance drops faster with increasing number ‡http://www.csie.ntu.edu.tw/ cjlin/libsvmtools/datasets/binary.html. 6 10 0 10 1 10 2 10 3 #iterations 10 -8 10 -6 10 -4 10 -2 10 0 Var 1 worker 2 workers 3 workers 4 workers 5 workers 6 workers 7 workers 8 workers 9 workers 10 -1 10 0 Time (s) 10 -6 10 -4 10 -2 Var 1 worker 2 workers 3 workers 4 workers 5 workers 6 workers 7 workers 8 workers 9 workers 2 4 6 8 #workers 1 2 3 4 5 6 7 8 9 Speedup linear speedup iteration-speedup time-speedup (a) Variance vs. Iteration ¯L (b) Variance vs. Time (c) Speedup Figure 2: Variance with increasing number of workers. of workers. To quantitatively relate these results to the theory, Corollary 5 indicates that L1 L2 = W1 W2 , where (Wi, Li)2 i=1 means the number of workers and iterations at the same variance, i.e., a linear speedup is achieved. The iteration speedup and time speedup are plotted in Figure 2 (c), showing that the iteration speedup approximately scales linearly worker numbers, consistent with Corollary 5; whereas the time speedup deteriorates when the worker number is large due to high system latency. 5.2 Applications to deep learning We further test S2G-MCMC on Bayesian learning of deep neural networks. The distributed system is developed based on an MPI (message passing interface) extension of the popular Caffe package for deep learning [32]. We implement the SGHMC algorithm, with the point-to-point communications between servers and workers handled by the MPICH library.The algorithm is run on a cluster of five machines. Each machine is equipped with eight 3.60GHz Intel(R) Core(TM) i7-4790 CPU cores. We evaluate S2G-MCMC on the above BLR model and two deep convolutional neural networks (CNN). In all these models, zero mean and unit variance Gaussian priors are employed for the weights to capture weight uncertainties, an effective way to deal with overfitting [33]. We vary the number of servers S among {1, 3, 5, 7}, and the number of workers for each server from 1 to 9. LeNet for MNIST We modify the standard LeNet to a Bayesian setting for the MNIST dataset.LeNet consists of 2 convolutional layers, 2 max pool layers and 2 ReLU nonlinear layers, followed by 2 fully connected layers [34]. The detailed specification can be found in Caffe. For simplicity, we use the default parameter setting specified in Caffe, with the additional parameter B in SGHMC (Algorithm 1) set to (1 −m), where m is the moment variable defined in the SGD algorithm in Caffe. Cifar10-Quick net for CIFAR10 The Cifar10-Quick net consists of 3 convolutional layers, 3 max pool layers and 3 ReLU nonlinear layers, followed by 2 fully connected layers. The CIFAR-10 dataset consists of 60,000 color images of size 32×32 in 10 classes, with 50,000 for training and 10,000 for testing.Similar to LeNet, default parameter setting specified in Caffe is used. In these models, the test function is defined as the cross entropy of the softmax outputs {o1, · · · , oN} for test data {(d1, y1), · · · , (dN, yN)} with C classes, i.e., loss = −PN i=1 oyi +N log PC c=1 eoc. Since the theory indicates a linear speedup on the decrease of variance w.r.t. the number of workers, this means for a single run of the models, the loss would converge faster to its expectation with increasing number of workers. The following experiments verify this intuition. 5.2.1 Single-server experiments We first test the single-server architecture in Section 4 on the three models. Because the expectations in the bias, MSE or variance are not analytically available in these complex models, we instead plot the loss versus average number of iterations (¯L defined in Section 4) on each worker and the running time in Figure 3. As mentioned above, faster decrease of the loss with more workers is expected. For the ease of visualization, we only plot the results with {1, 2, 4, 6, 9} workers; more detailed results are provided in Appendix I. We can see that generally the loss decreases faster with increasing number of workers. In the CIFAR-10 dataset, the final losses of 6 and 9 workers are worst than the one with 4 workers. It shows that the accuracy of the sample average suffers from the increased staleness due to the increased number of workers. Therefore a smaller step size h should be considered to maintain high accuracy when using a large number of workers. Note the 1-worker curves correspond to the standard SG-MCMC, whose loss decreases much slower due to high estimation variance, 7 #iterations 100 101 102 103 104 Loss 0.35 0.4 0.45 0.5 0.55 0.6 1 worker 2 workers 4 workers 6 workers 9 workers #iterations 2000 4000 6000 8000 10000 Loss 10-1 100 1 worker 2 workers 4 workers 6 workers 9 workers #iterations #104 0.5 1 1.5 2 Loss 0.8 1 1.2 1.4 1.6 1.8 2 2.2 1 worker 2 workers 4 workers 6 workers 9 workers Time (s) 10-1 100 101 Loss 0.35 0.4 0.45 0.5 0.55 0.6 1 worker 2 workers 4 workers 6 workers 9 workers Time (s) 0 100 200 300 400 500 600 Loss 10-1 100 1 worker 2 workers 4 workers 6 workers 9 workers Time (s) 0 1000 2000 3000 4000 Loss 0.8 1 1.2 1.4 1.6 1.8 2 2.2 1 worker 2 workers 4 workers 6 workers 9 workers Figure 3: Testing loss vs. #workers. From left to right, each column corresponds to the a9a, MNIST and CIFAR dataset, respectively. The loss is defined in the text. though in theory it has the same level of bias as the single-server architecture for a given number of iterations (they will converge to the same accuracy). 5.2.2 Multiple-server experiments Finally, we test the multiple-servers architecture on the same models. We use the same criterion as the single-server setting to measure the convergence behavior. The loss versus average number of iterations on each worker (¯L defined in Section 4) for the three datasets are plotted in Figure 4, where we vary the number of servers among {1, 3, 5, 7}, and use 2 workers for each server. The plots of loss versus time and using different number of workers for each server are provided in the Appendix. We can see that in the simple BLR model, multiple servers do not seem to show significant speedup, probably due to the simplicity of the posterior, where the sample variance is too small for multiple servers to take effect; while in the more complicated deep neural networks, using more servers results in a faster decrease of the loss, especially in the MNIST dataset. #iterations 100 101 102 103 104 Loss 0.35 0.4 0.45 0.5 0.55 0.6 1 server 3 servers 5 servers 7 servers #iterations 2000 4000 6000 8000 10000 Loss 10-1 100 1 server 3 servers 5 servers 7 servers #iterations #104 0.5 1 1.5 2 Loss 1 1.2 1.4 1.6 1.8 2 2.2 1 server 3 servers 5 servers 7 servers Figure 4: Testing loss vs. #servers. From left to right, each column corresponds to the a9a, MNIST and CIFAR dataset, respectively. The loss is defined in the text. 6 Conclusion We extend theory from standard SG-MCMC to the stale stochastic gradient setting, and analyze the impacts of the staleness to the convergence behavior of an S2G-MCMC algorithm. Our theory reveals that the estimation variance is independent of the staleness, leading to a linear speedup w.r.t. the number of workers, although in practice little speedup in terms of optimal bias and MSE might be achieved due to their dependence on the staleness. We test our theory on a simple asynchronous distributed SG-MCMC system with two simulated examples and several deep neural network models. Experimental results verify the effectiveness and scalability of the proposed S2G-MCMC framework. Acknowledgements Supported in part by ARO, DARPA, DOE, NGA, ONR and NSF. 8 References [1] L. Bottou, editor. Online algorithms and stochastic approximations. Cambridge University Press, 1998. [2] L. Bottou. Stochastic gradient descent tricks. Technical report, Microsoft Research, Redmond, WA, 2012. [3] M. Welling and Y. W. Teh. Bayesian learning via stochastic gradient Langevin dynamics. In ICML, 2011. [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] A. Agarwal and J. C. Duchi. Distributed delayed stochastic optimization. In NIPS, 2011. [7] J. Dean et al. Large scale distributed deep networks. In NIPS, 2012. [8] T. Chen et al. MXNet: A flexible and efficient machine learning library for heterogeneous distributed systems. (arXiv:1512.01274), Dec. 2015. [9] M. Abadi et al. TensorFlow: Large-scale machine learning on heterogeneous systems, 2015. Software available from tensorflow.org. [10] Q. Ho, J. Cipar, H. Cui, J. K. Kim, S. Lee, P. B. Gibbons, G. A. Gibbons, G. R. Ganger, and E. P. Xing. More effective distributed ML via a stale synchronous parallel parameter server. In NIPS, 2013. [11] M. Li, D. Andersen, A. Smola, and K. Yu. Communication efficient distributed machine learning with the parameter server. In NIPS, 2014. [12] X. Lian, Y. Huang, Y. Li, and J. Liu. Asynchronous parallel stochastic gradient for nonconvex optimization. In NIPS, 2015. [13] A. Ahmed, M. Aly, J. Gonzalez, S. Narayanamurthy, and A. J. Smola. Scalable inference in latent variable models. In WSDM, 2012. [14] S. Ahn, B. Shahbaba, and M. Welling. Distributed stochastic gradient MCMC. In ICML, 2014. [15] S. Ahn, A. Korattikara, N. Liu, S. Rajan, and M. Welling. Large-scale distributed Bayesian matrix factorization using stochastic gradient MCMC. In KDD, 2015. [16] U. Simsekli, H. Koptagel, Guldas H, A. Y. Cemgil, F. Oztoprak, and S. Birbil. Parallel stochastic gradient Markov chain Monte Carlo for matrix factorisation models. Technical report, 2015. [17] C. Chen, N. Ding, and L. Carin. On the convergence of stochastic gradient MCMC algorithms with high-order integrators. In NIPS, 2015. [18] F. Niu, B. Recht, C. Ré, and S. J. Wright. Hogwild!: A lock-free approach to parallelizing stochastic gradient descent. In NIPS, 2011. [19] H. R. Feyzmahdavian, A. Aytekin, and M. Johansson. An asynchronous mini-batch algorithm for regularised stochastic optimization. Technical Report arXiv:1505.04824, May 2015. [20] S. Chaturapruek, J. C. Duchi, and C. Ré. Asynchronous stochastic convex optimization: the noise is in the noise and SGD don’t care. In NIPS, 2015. [21] S. L. Scott, A. W. Blocker, and F. V. Bonassi. Bayes and big data: The consensus Monte Carlo algorithm. Bayes 250, 2013. [22] M. Rabinovich, E. Angelino, and M. I. Jordan. Variational consensus Monte Carlo. In NIPS, 2015. [23] W. Neiswanger, C. Wang, and E. P. Xing. Asymptotically exact, embarrassingly parallel MCMC. In UAI, 2014. [24] X. Wang, F. Guo, K. Heller, and D. Dunson. Parallelizing MCMC with random partition trees. In NIPS, 2015. [25] J. C. Mattingly, A. M. Stuart, and M. V. Tretyakov. Construction of numerical time-average and stationary measures via Poisson equations. SIAM Journal on Numerical Analysis, 48(2):552–577, 2010. [26] Y. A. Ma, T. Chen, and E. B. Fox. A complete recipe for stochastic gradient MCMC. In NIPS, 2015. [27] S. Patterson and Y. W. Teh. Stochastic gradient Riemannian Langevin dynamics on the probability simplex. In NIPS, 2013. [28] C. Li, C. Chen, D. Carlson, and L. Carin. Preconditioned stochastic gradient Langevin dynamics for deep neural networks. In AAAI, 2016. [29] S. Zhang, A. E. Choromanska, and Y. Lecun. Deep learning with elastic averaging SGD. In NIPS, 2015. [30] Y. W. Teh, L. Hasenclever, T. Lienart, S. Vollmer, S. Webb, B. Lakshminarayanan, and C. Blundell. Distributed Bayesian learning with stochastic natural-gradient expectation propagation and the posterior server. Technical Report arXiv:1512.09327v1, December 2015. [31] R. Bardenet, A. Doucet, and C. Holmes. On Markov chain Monte Carlo methods for tall data. Technical Report arXiv:1505.02827, May 2015. [32] T. 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. [33] C. Blundell, J. Cornebise, K. Kavukcuoglu, and D. Wierstra. Weight uncertainty in neural networks. In ICML, 2015. [34] A. Krizhevshy, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012. [35] S. J. Vollmer, K. C. Zygalakis, and Y. W. Teh. (Non-)asymptotic properties of stochastic gradient Langevin dynamics. Technical Report arXiv:1501.00438, University of Oxford, UK, January 2015. 9 | 2016 | 399 |
6,326 | Online Bayesian Moment Matching for Topic Modeling with Unknown Number of Topics Wei-Shou Hsu and Pascal Poupart David R. Cheriton School of Computer Science University of Waterloo Wateroo, ON N2L 3G1 {wwhsu,ppoupart}@uwaterloo.ca Abstract Latent Dirichlet Allocation (LDA) is a very popular model for topic modeling as well as many other problems with latent groups. It is both simple and effective. When the number of topics (or latent groups) is unknown, the Hierarchical Dirichlet Process (HDP) provides an elegant non-parametric extension; however, it is a complex model and it is difficult to incorporate prior knowledge since the distribution over topics is implicit. We propose two new models that extend LDA in a simple and intuitive fashion by directly expressing a distribution over the number of topics. We also propose a new online Bayesian moment matching technique to learn the parameters and the number of topics of those models based on streaming data. The approach achieves higher log-likelihood than batch and online HDP with fixed hyperparameters on several corpora. The code is publicly available at https://github.com/whsu/bmm. 1 Introduction Latent Dirichlet Allocation (LDA) [3] recently emerged as the dominant framework for topic modeling as well as many other applications with latent groups. The Hierarchical Dirichlet Process (HDP) [18] provides an elegant extension to LDA when the number of topics (latent groups) is unknown. The non-parametric nature of HDPs is quite attractive since HDPs effectively allow an unbounded number of topics to be inferred from the data. There is also a rich mathematical theory underlying HDPs as well as attractive metaphors (e.g., stick breaking process, Chinese restaurant franchise) to ease the understanding by those less comfortable with non-parametric statistics [18]. That being said, HDPs are not perfect. They do not expose an explicit distribution over the topics that could allow practitioners to incorporate prior knowledge and to inspect the model’s posterior confidence in different number of topics. Furthermore, the implicit distribution over the number of topics is restricted to a regime where the number of topics grows logarithmically with the amount of data in expectation [18]. For instance, this growth rate is insufficient for applications that exhibit a power law distribution [6] – a generalization of the HDP known as the hierarchical Pitman-Yor process [21] is often used instead. Existing inference algorithms for HDPs (e.g., Gibbs sampling [18], variational inference [19, 24, 23, 4, 17]) are also fairly complex. As a result, practitioners often stick with LDA and estimate the number of topics by repeatedly evaluating different number of topics by cross-validation; however, this is an expensive procedure. We propose two new models that extend LDA in a simple and intuitive fashion by directly expressing a distribution over the number of topics under the assumption that an upper bound on the number of topics is available. When the amount of data is finite, this assumption is perfectly fine since there cannot be more topics than the amount of data. Otherwise, domain experts can often define a suitable range for the number of topics and if they plan to inspect the resulting topics, they cannot inspect 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. an unbounded number of topics. We also propose a novel Bayesian moment matching algorithm to compute a posterior distribution over the model parameters and the number of topics. Bayesian learning naturally lends itself to online learning for streaming data since the posterior is updated sequentially after each data point and there is no need to go over the data more than once. The main issue is that the posterior becomes intractable. We approximate the posterior after each observed word by a tractable distribution that matches some moments of the exact posterior (hence the name Bayesian Moment Matching). The approach compares favorably to online HDP on several topic modeling tasks. 2 Related work Setting the number of topics to use can be treated as a model selection problem. One solution is to train a topic model multiple times, each time with a different number of topics, and choose the number of topics that minimizes some cost function on a heldout test set. More recently nonparametric Bayesian methods have been used to bypass the model selection problem. Hierarchical Dirichlet process (HDP) [18] is the natural extension of LDA in this direction. With HDP, the number of topics is learned from data as part of the inference procedure. Gibbs sampling [7, 15] and Variational Bayes [3, 20] are by far the most popular inference techniques for LDA. They have been extended to HDP [18, 19, 17]. With the rise of streaming data, online variants of Variational Bayes have also been developed for LDA [8] and HDP [24, 23, 4]. The first online variational technique [24] used a truncation that effectively bounds the number of topics while subsequent techniques [23, 4] avoid any fixed truncation to fully exploit the non-parametric nature of HDP. These online variational techniques perform stochastic gradient ascent on mini-batches, which reduces their data efficiency, but improves computational efficiency. We propose two new models that are simpler than HDP and express a distribution directly on the number of topics. We extend online Bayesian moment matching (originally designed for LDA with a fixed number of topics [14]) to learn the number of topics. This technique avoids mini-batches. It approximates Bayesian learning by Assumed Density Filtering [13], which can be thought as a single forward iteration of Expectation Propagation [12]. Note that Bayesian moment matching is different from frequentist moment matching techniques such as spectral learning [1, 2, 9, 11]. In BMM, we compute a posterior over the parameters of the model and approximate the posterior with a simpler distribution that matches some moments of the exact posterior. In spectral learning, moments of the empirical distribution of the data are used to find parameters that yield the same moments in the model. This is usually achieved by a spectral (or tensor) decomposition of the empirical moments, hence the name spectral learning. Although both BMM and spectral learning use the method of moments, they match different moments in different distributions resulting in completely different algorithms. While stochastic gradient descent can be used to compute tensor decompositions in an online fashion [5, 10], no online variant of spectral learning has been developed to infer the number of topics in LDA. 3 Models We investigate the problem of online clustering of grouped discrete observations. Using terminology from text processing, we will call each observation a word and each group a document. The observed data set is then a corpus of N words, {wn}N n=1, along with the IDs, {dn}N n=1, of the documents to which these words belong. We will let D denote the number of documents and V the number of distinct words in the vocabulary. Figure 1 shows the generative models we are considering. The basic model is LDA, in which the number of the topics T is fixed. We propose two extensions to the basic model where the parameter T is unknown and inferred from data, with the assumption that T ranges from 1 to K. Each ⃗θ specifies the topic distribution of a document, while each ⃗φ specifies the word distribution of a topic. In the rest of the paper, we will use Θ to denote the collection of all ⃗θ’s and Φ the collection of all ⃗φ’s in the model. 2 ⃗αd ⃗βt ⃗θd ⃗φt dn tn wn D T N ⃗γ ⃗αd ⃗βt T ⃗θd ⃗φt dn tn wn D K N ⃗γ ⃗αk,d ⃗βt T ⃗θk,d ⃗φt dn tn wn D K K N Figure 1: Graphical representations of basic model with fixed number of topics (left), degenerate Dirichlet model (middle), and triangular Dirichlet model (right) 3.1 Degenerate Dirichlet model The generative process of the degenerate Dirichlet model (DDM), as shown in the middle in Figure 1, works by first sampling the hyperparameters ⃗γ, {⃗αd}D d=1, and {⃗βt}K t=1. The parameters T, {⃗θd}D d=1, and {⃗φt}K t=1 are then sampled from the following conditional distributions: P(T|⃗γ) = Discrete(T;⃗γ) P(⃗θd|⃗αd, T) = Dir(⃗θd; ⃗αd, T) P(⃗φt|⃗βt) = Dir(⃗φt; ⃗βt) where Dir(⃗θd; ⃗αd, T) denotes a degenerate Dirichlet distribution Dir(⃗θd; ⃗α′ d) with α′ d,t = αd,t for t ≤T 0 for t > T and Discrete(T;⃗γ) is the general discrete distribution with probability P(T = k) = γk for k = 1, . . . , K. Finally, the N observations are generated by first sampling the topic indicators tn according to the distribution P(tn|dn, Θ) = θdn,tn. Note that since ⃗θdn is sampled from a degenerate Dirichlet, we have θdn,tn = 0 for tn > T. Given tn, the words are then sampled according to the categorical distribution P(wn|tn, Φ) = φtn,wn. 3.2 Triangular Dirichlet model The triangular Dirichlet model (TDM), shown on the right in Figure 1, works in a similar way except the document-topic distribution Θ is represented by a three-dimensional array that is also indexed by the number of topics T in addition to the document ID d and the topic ID t. Given T and d, the topic t is drawn according to the probability P(t|d, Θ, T) = θT,d,t for 1 ≤t ≤T. The array Θ therefore has a triangular shape in the first and third dimension. Again, we place a Dirichlet prior on each ⃗θk,d: P(⃗θk,d|⃗αk,d) = Dir(⃗θk,d; ⃗αk,d). In this case, however, ⃗θk,d has no dependence on T. 4 Bayesian update by moment matching Let Pn(Θ, Φ, T) denote the joint posterior probability of Θ, Φ, and T after seeing the first n observations. Then1 Pn(Θ, Φ, T) = P(Θ, Φ, T|w1:n) = 1 cn K X tn=1 P(tn|Θ, T)P(wn|Φ, tn)Pn−1(Θ, Φ, T) (1) where cn = P(wn|w1:n−1). From (1) we can see that after seeing each new observation wn, the number of terms in the posterior is increased by a factor of K, resulting in an exponential complexity for exact Bayesian update. Therefore, we will instead approximate Pn by a different distribution, whose parameters will be estimated by moment matching. 1In the derivations that follow, the dependence on the document IDs {dn}D n=1 and the hyperparameters ⃗γ, α, and β is implicit and not shown. 3 4.1 Approximating distribution To make the inference tractable, we approximate Pn using a factorized distribution: Pn(Θ, Φ, T) = fΘ(Θ)fΦ(Φ)fT (T). For TDM, we choose the factorized distribution to have the exact same form as the prior distribution, i.e., fΘ(Θ) = K Y k=1 D Y d=1 Dir(⃗θk,d; ⃗αk,d) (2) fΦ(Φ) = K Y t=1 Dir(⃗φt; ⃗βt) (3) fT (T) = Discrete(T;⃗γ) (4) For DDM, we use the same fΦ and fT , but rather than choosing fΘ as degenerate Dirichlets again, we instead approximate the posterior over Θ using proper Dirichlet distributions to decouple Θ from T: fΘ(Θ) = D Y d=1 Dir(⃗θd; ⃗αd) (5) 4.2 Moment matching Let x be a random variable with distribution p(x). The i-th moment of x about zero is defined as the expectation of xi over p, and we denote it by Mxi(p): Mxi(p) = Ep xi (6) For a K-dimensional Dirichlet distribution Dir(x1, . . . , xK; τ1, . . . , τK), we can uniquely solve for the parameters τ1, . . . , τK if we have K −1 first moments, Mx1, . . . , MxK−1, and one second moment, Mx2 1. Given the moments, we can determine the Dirichlet parameters as τk = Mxk Mx1 −Mx2 1 Mx2 1 −M 2x1 (7) for k = 1, . . . , K. Therefore, we can compute the parameters for fΘ and fΦ using (7): for αd, replace τk with αd,k and xk with θd,k; and for βt, replace τk with βt,k and xk with φt,k. The parameters for Discrete(T;⃗γ) are estimated directly as γk = E[δT,k] (8) where δ denotes the the Kronecker delta δi,j = 1 if i = j 0 if i ̸= j . (9) 4.3 Moment computation From (7) and (8), we see that to approximate Pn by moment matching, we need to compute the first and second moments of Θ and Φ as well as the expectation E[δT,k] with respect to Pn. They can be calculated using the Bayesian update equation (1). To keep the notation uncluttered, let S⃗x,:m denote the sum of the first m elements in a vector ⃗x and S⃗x the sum of all elements in ⃗x. We can then compute the moments of DDM as follows: cn = K X T =1 γT T X tn=1 αdn,tn S⃗αdn,:T βtn,wn S⃗βtn (10) EPn [δT,k] = 1 cn γk k X tn=1 αdn,tn S⃗αdn,:k βtn,wn S⃗βtn (11) 4 Mθd,t (Pn) = 1 cn K X T =t γT T X tn=1 αdn,tn S⃗αdn,:T βtn,wn S⃗βtn αd,t + δd,dnδt,tn S⃗αd,:T + δd,dn (12) Mθ2 d,t (Pn) = 1 cn K X T =t γT T X tn=1 αdn,tn S⃗αdn,:T βtn,wn S⃗βtn αd,t + δd,dnδt,tn S⃗αd,:T + δd,dn αd,t + 1 + δd,dnδt,tn S⃗αd,:T + 1 + δd,dn (13) Mφt,w (Pn) = 1 cn K X T =1 γT T X tn=1 αdn,tn S⃗αdn,:T βtn,wn S⃗βtn βt,w + δt,tnδw,wn S⃗βt + δt,tn (14) Mφ2 t,w (Pn) = 1 cn K X T =1 γT T X tn=1 αdn,tn S⃗αdn,:T βtn,wn S⃗βtn βt,w + δt,tnδw,wn S⃗βt + δt,tn βt,w + 1 + δt,tnδw,wn S⃗βt + 1 + δt,tn (15) For TDM, the moments are computed similarly except that T is used to index into α rather than to take partial sums. The equations are included in the supplement. 4.4 Parameter update For TDM, the approximating distribution for the posterior has the exact same form as the prior; therefore, the parameters we compute for Pn in the n-th update can be used directly as the parameters for the prior in the (n + 1)-th update. However, for DDM, the prior for Θ consists of degenerate Dirichlet distributions conditionally dependent on T, whereas the approximating distribution for the posterior is a fully factorized distribution with proper Dirichlets. Therefore, we have to make a further approximation to match the parameters of the two distributions. When Pn is being used as the prior in the (n + 1)-th update, we use the same α that was obtained by moment matching during the n-th update, but it now has a different meaning. During the n-th update, α is computed as parameters of proper Dirichlet distributions, but in the next update, it is used as parameters of a weighted sum of degenerate Dirichlet distributions. As a result, the DDM has a natural bias towards smaller number of topics. 4.5 Algorithm summary In summary, starting from a prior distribution, the algorithm successively updates the posterior by first computing the exact moments according to the Bayesian update equation (1), and then updating the parameters by matching the moments with those of an approximating distribution. In the case of TDM, the approximating distribution has the same form as the prior, whereas a simplified distribution is used for DDM. Algorithm 1 summarizes the procedure for the two models. Algorithm 1 Online Bayesian moment matching algorithm 1: Initialize α, β, and ⃗γ. 2: for n = 1, . . . , N do 3: Read the n-th observation (dn, wn). 4: Compute moments according to (10)–(15) for DDM or equations in supplement for TDM. 5: Update α, β, and ⃗γ according to (7) and (8) with appropriate substitutions. 6: end for 5 Experiments In this section, we discuss our experiments on a synthetic dataset and three real text corpora. The TDM and DDM implementations are available at https://github.com/whsu/bmm. For both models we initialized the hyperparameters to be αd,t = 1 and βt,w = 1 √ V for all d, t, and w. The reason that βt,w was not initialized to 1 was to encourage the algorithm to find topics with more concentrated word distributions. 5 0 2 4 6 8 10 10 20 Actual T Predicted T DDM TDM (a) 0 2 4 6 8 10 10 20 Actual T Predicted T DDM TDM (b) Figure 2: Number of topics discovered by the DDM and TDM on synthetic datasets using (a) uniform prior and (b) exponentially decreasing prior on T. The results are averaged over 100 randomly generated datasets for each actual T. Error bars show plus/minus one standard deviation. Gray line indicates the true number of topics that generated the datasets. 5.1 Synthetic data We first ran some tests on synthetic data to see how well the models estimate the number of topics. For this experiment, the actual number of topics T was varied from 1 to 10, and for each value of T, we generated 100 random datasets with D = 100, V = 200, and N =100,000. Each random dataset was created by first sampling Θ from Dir(⃗αd|0.05) and Φ from Dir(⃗βt|0.1). The observations were then sampled from Θ and Φ. We set K = 20 and used the uniform prior P(T) = 1 K for T = 1, . . . , K. The estimated number of topics is shown in Figure 2(a). Both models were able to discover more topics as the actual number of topics increases. They tend to overestimate the number of topics because the initial value βt,w = 1 √ V encourages topics with smaller number of words. However, in both models, the modeler has direct control over the number of topics. If there is reason to believe the data come from a smaller number of topics, the modeler can change the prior distribution on T accordingly as is typical in a Bayesian framework. For this example, we also tested on an exponentially decreasing prior P(T) ∝e−T for T = 1, . . . , K. The results are shown in Figure 2(b). In this case, TDM shows a slight decrease than with a uniform prior, whereas DDM produces an estimate that is close to the true number of topics. 5.2 Text modeling We compare the two proposed models by using them to model the distributions of three real text corpora containing Reuters news articles, NIPS conference proceedings, and Yelp reviews. We also include online HDP (oHDP) in the comparisons, as well as the basic moment matching (basic MM) algorithm with different values of T. For online HDP, we used the gensim 0.10.3 [16] implementation with the default parameters except for the top-level truncation, which we set equal to the maximum number of topics we used for DDM and TDM. Because DDM and TDM do not estimate a global alpha as oHDP, for oHDP we include the results with both uniform alpha (oHDP unif) and alpha that is learned (oHDP alpha). We followed a similar experimental setup as in [22, 4]. Each dataset was divided into a training set Dtrain and a test set Dtest based on document IDs. The words in the test set were further split into two subsets W1 and W2, where W1 contains the words in the first half of each document in the test set, and W2 contains the second half. The evaluation metric used is the per-word log likelihood L = log p(W2|W1,Dtrain) |W2| where |W2| denotes the total number of tokens in W2. For each experiment we also report the number of topics inferred by DDM, TDM. We do not report this number for online HDP because it is not returned by the implementation. 6 0 20 40 60 80 100 -7.3 -7.1 -6.9 -6.7 -6.5 T Per-word log likelihood Basic MM DDM TDM oHDP alpha oHDP unif (a) 0 500 1000 0 10 20 30 40 50 n T DDM TDM (×1000) (b) Figure 3: Text modeling on Reuters-21578: (a) Per-word test log likelihood and (b) Number of topics found as a function of number of observations. 5.2.1 Reuters-21578 The Reuters-21578 corpus contains 21,578 Reuters news articles in 1987. For this dataset, we divided the data into training and test sets according to the LEWISSPLIT attribute that is available as part of the distribution at http://www.daviddlewis.com/resources/ testcollections/reuters21578/. The text was passed through a stemmer, and stopwords and words appearing in five or fewer documents were removed. This resulted in a total of 1,307,468 tokens and a vocabulary of 7,720 distinct words. We chose K to be 100 for both models with uniform prior P(T) = 1 K . Figure 3(a) shows the experimental results. DDM discovered 39 topics while TDM found 36, and they both achieved similar per-word log likelihood as the best models with fixed T showing that they were able to automatically determine the number of topics necessary to model the data. While both models found the a similar number of topics in the end, they progressed to the final values in different ways. Fig. 3(b) shows the number of topics found by the two models as a function of number of observations. DDM shows a logarithmically increasing trend as more words are observed, whereas TDM follows a more irregular progression. 5.2.2 NIPS We also tested the two models on 2,742 articles from the NIPS conference for the years 1988–2004. We used the raw text versions available at http://cs.nyu.edu/˜roweis/data.html (1988–1999) and http://ai.stanford.edu/˜gal/data.html (2000–2004). The first set was used as the training set and the second as the test set. The corpus was again passed through a stemmer, and stopwords and words appearing no more than 50 times were removed. After preprocessing we are left with 2,207,106 total words and a vocabulary of 4,383 unique words. For this dataset we used K = 400 with the exponentially decreasing prior. DDM discovered 54 topics, and TDM found 89 topics. Figure 4(a) shows the per-word log likelihood on the test set. In this experiment, both DDM and TDM obtained closed to the optimal likelihood compared to basic MM. 5.2.3 Yelp In our third experiment, we tested the models on a subset of the Yelp Academic Dataset (http: //www.yelp.com/dataset_challenge). We took the 129,524 reviews in the dataset that were given to businesses in the Food category. The reviews were randomly split so that 70% were used for training and 30% for testing. Similar preprocessing was performed. The corpus was passed through a stemmer, and stopwords and words appearing no more than 50 times were removed. After preprocessing the corpus contains a total of 5,317,041 words and a vocabulary of 5,640 distinct words. 7 0 100 200 300 400 -7.7 -7.5 -7.3 -7.1 -6.9 -6.7 T Per-word log likelihood Basic MM DDM TDM oHDP alpha oHDP unif (a) 0 20 40 60 80 100 -7.7 -7.5 -7.3 -7.1 -6.9 -6.7 T Per-word log likelihood Basic MM DDM TDM oHDP alpha oHDP unif (b) Figure 4: Per-word test log likelihood of (a) NIPS and (b) Yelp. For this dataset, we tested with K=100 using the exponentially decreasing prior on T. Figure 4(b) shows the per-word log likelihood on the test set. DDM found the optimal number of topics while both models achieved close to best likelihood on the test set compared to basic MM. 5.2.4 Comparison with online HDP Because DDM and TDM do not estimate the global alpha, in the experiments we compute the test likelihood using a uniform alpha. If we also use a uniform alpha for online HDP, DDM and TDM achieve higher test likelihood. However, online HDP is able to learn the global alpha, which results in higher likelihood. This is a shortcoming of our models, and we are exploring ways to estimate the global alpha. 5.3 Additional experimental results Additional experimental results may be found in the supplement, including running time of the experiments and samples of topics discovered in the Reuters and NIPS corpora, as well as experiments on using the models as dimensionality reduction preprocessors in text classification. 6 Conclusions In this paper we proposed two topic models that can be used when the number of topics is not known. Unlike nonparametric Bayesian models, the proposed models provide explicit control over the prior for the number of topics. We then presented an online learning algorithm based on Bayesian moment matching, and experiments showed that reasonable topics could be recovered using the proposed models. Additional experiments on text classification and visual inspection of the inferred topics show that the clusters discovered were indeed semantically meaningful. One unsolved problem is that the proposed models do not estimate the global alpha, resulting in lower test likelihood compared to online HDP, which is able to estimate alpha. Developing a robust way to estimate alpha will be the next step to improve the models. References [1] Anima Anandkumar, Dean P Foster, Daniel Hsu, Sham Kakade, and Yi-Kai Liu. A spectral algorithm for latent Dirichlet allocation. In NIPS, pages 926–934, 2012. [2] Sanjeev Arora, Rong Ge, and Ankur Moitra. Learning topic models–going beyond SVD. In Foundations of Computer Science, pages 1–10. IEEE, 2012. [3] D. M. Blei, A. Y. Ng, and M. I. Jordan. Latent Dirichlet allocation. Journal of Machine Learning Research, 3:993–1022, 2003. [4] Michael Bryant and Erik B Sudderth. Truly nonparametric online variational inference for hierarchical Dirichlet processes. In NIPS, pages 2699–2707, 2012. 8 [5] Rong Ge, Furong Huang, Chi Jin, and Yang Yuan. Escaping from saddle points online stochastic gradient for tensor decomposition. In Conference on Learning Theory, page 797842, 2015. [6] Sharon Goldwater, Mark Johnson, and Thomas L Griffiths. Interpolating between types and tokens by estimating power-law generators. In NIPS, pages 459–466, 2005. [7] Tom Griffiths. Gibbs sampling in the generative model of latent Dirichlet allocation. 2002. [8] Matthew Hoffman, Francis R Bach, and David M Blei. Online learning for latent Dirichlet allocation. In NIPS, pages 856–864, 2010. [9] Daniel Hsu and Sham M Kakade. Learning mixtures of spherical Gaussians: moment methods and spectral decompositions. In Conference on Innovations in Theoretical Computer Science, pages 11–20. ACM, 2013. [10] Furong Huang, U. N. Niranjan, Mohammad Umar Hakeem, and Animashree Anandkumar. Online tensor methods for learning latent variable models. Journal of Machine Learning Research, 16:2797–2835, 2015. [11] Furong Huang, UN Niranjan, Mohammad Umar Hakeem, and Animashree Anandkumar. Fast detection of overlapping communities via online tensor methods. arXiv preprint arXiv:1309.0787, 2013. [12] Thomas Minka and John Lafferty. Expectation-propagation for the generative aspect model. In UAI, pages 352–359, 2002. [13] Thomas P Minka. Expectation propagation for approximate Bayesian inference. In UAI, pages 362–369, 2001. [14] Farheen Omar. Online Bayesian Learning in Probabilistic Graphical Models using Moment Matching with Applications. PhD thesis, David R. Cheriton School of Computer Science, University of Waterloo, 2016. [15] Ian Porteous, David Newman, Alexander Ihler, Arthur Asuncion, Padhraic Smyth, and Max Welling. Fast collapsed Gibbs sampling for latent Dirichlet allocation. In ACM SIGKDD, pages 569–577, 2008. [16] R. ˇReh˚uˇrek and P. Sojka. Software Framework for Topic Modelling with Large Corpora. In Proceedings of the LREC 2010 Workshop on New Challenges for NLP Frameworks, pages 45–50, Valletta, Malta, May 2010. ELRA. [17] Issei Sato, Kenichi Kurihara, and Hiroshi Nakagawa. Practical collapsed variational Bayes inference for hierarchical Dirichlet process. In ACM SIGKDD, pages 105–113. ACM, 2012. [18] Y. W. Teh, M. I. Jordan, M. J. Beal, and D. M. Blei. Hierarchical Dirichlet processes. Journal of the American Statistical Association, 101:pp. 1566–1581, 2006. [19] Yee W Teh, Kenichi Kurihara, and Max Welling. Collapsed variational inference for HDP. In NIPS, pages 1481–1488, 2007. [20] Yee W Teh, David Newman, and Max Welling. A collapsed variational Bayesian inference algorithm for latent Dirichlet allocation. In NIPS, pages 1353–1360, 2006. [21] Yee Whye Teh. A hierarchical Bayesian language model based on Pitman-Yor processes. In Proceedings of the 21st International Conference on Computational Linguistics and the 44th annual meeting of the Association for Computational Linguistics, pages 985–992. Association for Computational Linguistics, 2006. [22] C. Wang, J. Paisley, and D. Blei. Online variational inference for the hierarchical Dirichlet process. In G. Gordon, D Dunson, and M. Dud´ık, editors, AISTATS, volume 15. JMLR W&CP, 2011. [23] Chong Wang and David M Blei. Truncation-free online variational inference for Bayesian nonparametric models. In NIPS, pages 413–421, 2012. [24] Chong Wang, John W Paisley, and David M Blei. Online variational inference for the hierarchical Dirichlet process. In AISTATS, pages 752–760, 2011. 9 | 2016 | 4 |
6,327 | Multi-view Anomaly Detection via Robust Probabilistic Latent Variable Models Tomoharu Iwata NTT Communication Science Laboratories iwata.tomoharu@lab.ntt.co.jp Makoto Yamada Kyoto University makoto.m.yamada@ieee.org Abstract We propose probabilistic latent variable models for multi-view anomaly detection, which is the task of finding instances that have inconsistent views given multi-view data. With the proposed model, all views of a non-anomalous instance are assumed to be generated from a single latent vector. On the other hand, an anomalous instance is assumed to have multiple latent vectors, and its different views are generated from different latent vectors. By inferring the number of latent vectors used for each instance with Dirichlet process priors, we obtain multiview anomaly scores. The proposed model can be seen as a robust extension of probabilistic canonical correlation analysis for noisy multi-view data. We present Bayesian inference procedures for the proposed model based on a stochastic EM algorithm. The effectiveness of the proposed model is demonstrated in terms of performance when detecting multi-view anomalies. 1 Introduction There has been great interest in multi-view learning, in which data are obtained from various information sources. In a wide variety of applications, data are naturally comprised of multiple views. For example, an image can be represented by color, texture and shape information; a web page can be represented by words, images and URLs occurring on in the page; and a video can be represented by audio and visual features. In this paper, we consider the task of finding anomalies in multi-view data. The task is called horizontal anomaly detection [13], or multi-view anomaly detection [16]. Anomalies in multi-view data are instances that have inconsistent features across multiple views. Multi-view anomaly detection can be used for many applications, such as information disparity management [9], purchase behavior analysis [13], malicious insider detection [16], and user aggregation from multiple databases. In information disparity management, multiple views can be obtained from documents written in different languages such as Wikipedia. Multi-view anomaly detection tries to find documents that contain different information across different languages, which would be helpful for editors to select documents to be updated, or beneficial for cultural anthropologists to analyze social difference across different languages. In purchase behavior analysis, multiple views for each item can be defined as its genre and its purchase history, i.e. a set of users who purchased the item. Multi-view anomaly detection can find movies inconsistently purchased by users based on the movie genre, which would assist creating marketing strategies. Multi-view anomaly detection is different from standard (single-view) anomaly detection. Singleview anomaly detection finds instances that do not conform to expected behavior [6]. Figure 1 (a) shows the difference between a multi-view anomaly and a single-view anomaly in a two-view data set. ‘M’ is a multi-view anomaly since ‘M’ belongs to different clusters in different views (‘A–D’ cluster in View 1 and ‘E–J’ cluster in View 2) and views of ‘M’ are not consistent. ‘S’ is a singleview anomaly since ‘S’ is located far from other instances in each view. However, both views of ‘S’ have the same relationship with the others (they are far from the other instances), and then ‘S’ 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Latent space B M C D F A G S I J E H M W1 ւ ց W2 B M C A F D G S I J E H B M C D F A G S I J E H Observed view 1 Observed view 2 s x z r θ γ w a b α D ∞N (a) (b) Figure 1: (a) A multi-view anomaly ‘M’ and a single-view anomaly ‘S’ in a two-view data set. Each letter represents an instance, and the same letter indicates the same instance. Wd is a projection matrix for view d. (b) Graphical model representation of the proposed model. is not a multi-view anomaly. Single-view anomaly detection methods, such as one-class support vector machines [18] or tensor-based anomaly detection [11], consider that ‘S’ is anomalous. On the other hand, we would like to develop a multi-view anomaly detection method that detects ‘M’ as anomaly, but not ‘S’. Note that although single-view anomalies are uncommon instances, multi-view anomalies can be majority if they are inconsistent across multiple views. We propose a probabilistic latent variable model for multi-view anomaly detection. With the proposed model, there is a latent space that is shared across all views. We assume that all views of a non-anomalous (normal) instance are generated using a single latent vector. On the other hand, an anomalous instance is assumed to have multiple latent vectors, and its different views are generated using different latent vectors, which indicates inconsistency across different views of the instance. Figure 1 (a) shows an example of a latent space shared by the two-view data. Two views of every non multi-view anomaly can be generated from a latent vector using view-dependent projection matrices. On the other hand, since two views of multi-view anomaly ‘M’ are not consistent, two latent vectors are required to generate the two views using the projection matrices. Since the number of latent vectors for each instance is unknown, we automatically infer it from the given data by using Dirichlet process priors. The inference of the proposed model is based on a stochastic EM algorithm. In the E-step, a latent vector is assigned for each view of each instance using collapsed Gibbs sampling while analytically integrating out latent vectors. In the M-step, projection matrices for mapping latent vectors into observations are estimated by maximizing the joint likelihood. By alternately iterating E- and M-steps, we infer the number of latent vectors used in each instance and calculate its anomaly score from the probability of using more than one latent vector. 2 Proposed Model Suppose that we are given N instances with D views X = {Xn}N n=1, where Xn = {xnd}D d=1 is a set of multi-view observation vectors for the nth instance, and xnd ∈RMd is the observation vector of the dth view. The task is to find anomalous instances that have inconsistent observation features across multiple views. We propose a probabilistic latent variable model for this task. The proposed model assumes that each instance has potentially a countably infinite number of latent vectors Zn = {znj}∞ j=1, where znj ∈RK. Each view of an instance xnd is generated depending on a view-specific projection matrix Wd ∈RMd×K and a latent vector znsndthat is selected from a set of latent vectors Zn. Here, snd ∈{1, · · · , ∞} is the latent vector assignment of xnd. When the instance is non-anomalous and all its views are consistent, all of the views are generated from a single latent vector. In other words, the latent vector assignments for all views are the same, sn1 = sn2 = · · · = snD. When it is an anomaly and some views are inconsistent, different views 2 are generated from different latent vectors, and some latent vector assignments are different, i.e. snd ̸= snd′ for some d ̸= d′. Specifically, the proposed model is an infinite mixture model, where the probability for the dth view of the nth instance is given by p(xnd|Zn, Wd, θn, α) = ∞ X j=1 θnjN(xnd|Wdznj, α−1I), (1) where θn = {θnj}∞ j=1 are the mixture weights, θnj represents the probability of choosing the jth latent vector, α is a precision parameter, N(µ, Σ) denotes the Gaussian distribution with mean µ and covariance matrix Σ, and I is the identity matrix. Information of non-anomalous instances that cannot be handled by a single latent vector is modeled in Gaussian noise which is controlled by α. Since we assume the same observation noise α across different views, the observations need to be normalized. We use a Dirichlet process for the prior of mixture weight θn. Its use enables us to automatically infer the number of latent vectors for each instance from the given data. The complete generative process of the proposed model for multi-view instances X is as follows, 1. Draw a precision parameter α ∼Gamma(a, b) 2. For each instance: n = 1, . . . , N (a) Draw mixture weights θn ∼Stick(γ) (b) For each latent vector: j = 1, . . . , ∞ i. Draw a latent vector znj ∼N(0, (αr)−1I) (c) For each view: d = 1, . . . , D i. Draw a latent vector assignment snd ∼Discrete(θn) ii. Draw an observation vector xnd ∼N(Wdznsnd, α−1I) Here, Stick(γ) is the stick-breaking process [19] that generates mixture weights for a Dirichlet process with concentration parameter γ, and r is the relative precision for latent vectors. α is shared for observation and latent vector precision because it makes it possible to analytically integrate out α as shown in (4). Figure 1 (b) shows a graphical model representation of the proposed model, where the shaded and unshaded nodes indicate observed and latent variables, respectively. The joint probability of the data X and the latent vector assignments S = {{snd}D d=1}N n=1 is given by p(X, S|W , a, b, r, γ) = p(S|γ)p(X|S, W , a, b, r), (2) where W = {Wd}D d=1. Because we use conjugate priors, we can analytically integrate out mixture weights Θ = {θn}N n=1, latent vectors Z, and precision parameter α. Here, we use a Dirichlet process prior for multinomial parameter θn, and a Gaussian-Gamma prior for latent vector znj. By integrating out mixture weights Θ, the first factor is calculated by p(S|γ) = N Y n=1 γJn QJn j=1(Nnj −1)! γ(γ + 1) · · · (γ + D −1), (3) where Nnj represents the number of views assigned to the jth latent vector in the nth instance, and Jn is the number of latent vectors of the nth instance for which Nnj > 0. By integrating out latent vectors Z and precision parameter α, the second factor of (2) is calculated by p(X|S, W , a, b, r) = (2π)−N P d Md 2 r K P n Jn 2 ba b′a′ Γ(a′) Γ(a) N Y n=1 Jn Y j=1 |Cnj| 1 2 , (4) where a′ = a + N PD d=1 Md 2 , b′ = b + 1 2 N X n=1 D X d=1 x⊤ ndxnd −1 2 N X n=1 Jn X j=1 µ⊤ njC−1 nj µnj, (5) 3 µnj = Cnj X d:snd=j W ⊤ d xnd, C−1 nj = X d:snd=j W ⊤ d Wd + rI. (6) The posterior for the precision parameter α and that for the latent vector znj are given by p(α|X, S, W , a, b) = Gamma(a′, b′), p(znj|X, S, W , r) = N(µnj, α−1Cnj), (7) respectively. 3 Inference We describe inference procedures for the proposed model based on a stochastic EM algorithm, in which collapsed Gibbs sampling of latent vector assignments S and the maximum joint likelihood estimation of projection matrices W are alternately iterated while analytically integrating out the latent vectors Z, mixture weights Θ and precision parameter α. By integrating out latent vectors, we do not need to explicitly infer the latent vectors, leading to a robust and fast-mixing inference. Let ℓ= (n, d) be the index of the dth view of the nth instance for notational convenience. In the E-step, given the current state of all but one latent assignment sℓ, a new value for sℓis sampled from {1, · · · , Jn\ℓ+ 1} according to the following probability, p(sℓ= j|X, S\ℓ, W , a, b, r, γ) ∝p(sℓ= j, S\ℓ|γ) p(S\ℓ|γ) · p(X|sℓ= j, S\ℓ, W , a, b, r) p(X\ℓ|S\ℓ, W , a, b, r) , (8) where \ℓrepresents a value or set excluding the dth view of the nth instance. The first factor is given by p(sℓ= j, S\ℓ|γ) p(S\ℓ|γ) = ( Nnj\ℓ D−1+γ if j ≤Jn\ℓ γ D−1+γ if j = Jn\ℓ+ 1, (9) using (3), where j ≤Jn\ℓis for existing latent vectors, and j = Jn\ℓ+ 1 is for a new latent vector. By using (4), the second factor is given by p(X|sℓ= j, S\ℓ, W , a, b, r) p(X\ℓ|S\ℓ, W , a, b, r) = (2π)−Md 2 rI(j=Jn\ℓ+1) K 2 b ′a′ \ℓ \ℓ b ′a′ sℓ=j sℓ=j Γ(a′ sℓ=j) Γ(a′ \ℓ) |Cj,sℓ=j| 1 2 |Cj\ℓ| 1 2 , (10) where I(·) represents the indicator function, i.e. I(A) = 1 if A is true and 0 otherwise, and subscript sℓ= j indicates the value when xℓis assigned to the jth latent vector as follows, b′ sℓ=j = b′ \ℓ+ 1 2x⊤ ℓxℓ+ 1 2µ⊤ nj\ℓC−1 nj\ℓµnj\ℓ−1 2µ⊤ nj,sℓ=jC−1 nj,sℓ=jµnj,sℓ=j, (11) a′ sℓ=j = a′, µnj,sℓ=j = Cnj,sℓ=j(W ⊤ d xℓ+ C−1 nj\ℓµnj\ℓ), (12) C−1 nj,sℓ=j = W ⊤ d Wd + C−1 nj\ℓ. (13) Intuitively, if the current view cannot be modeled well by existing latent vectors, a new latent vector is used, which indicates that the view is inconsistent with the other views. In the M-step, the projection matrices W are estimated by maximizing the logarithm of the joint likelihood (2) while fixing cluster assignment variables S. By setting the gradient of the joint log likelihood with respect to W equal to zero, an estimate of W is obtained as follows, Wd = a′ b′ N X n=1 xndµ⊤ nsnd N X n=1 Jn X j=1 Cnj + a′ b′ N X n=1 µnsndµ⊤ nsnd −1 . (14) When we iterate the E-step that samples the latent vector assignment snd by employing (8) for each view d = 1, . . . , D in each instance n = 1, . . . , N, and the M-step that maximizes the joint likelihood using (14) with respect to the projection matrix Wd for each view d = 1, . . . , D, we obtain an estimate of the latent vector assignments and projection matrices. 4 In Section 2, we defined that an instance is an anomaly when its different views are generated from different latent vectors. Therefore, for an anomaly score, we use the probability that the instance uses more than one latent vector. It is estimated by using the samples obtained in the inference as follows, vn = 1 H PH h=1 I(J(h) n > 1), where J(h) n is the number of latent vectors used by the nth instance in the hth iteration of the Gibbs sampling after the burn-in period, and H is the number of the iterations. The output of the proposed method is a ranked list of anomalies based on their anomaly scores. An analyst would investigate top few anomalies, or use a threshold to select the anomalies [6]. The threshold can be determined based on a targeted false alarm and detection rate. We can use cross-validation to select an appropriate dimensionality for the latent space K. With cross-validation, we assume that some features are missing from the given data, and infer the model with a different K. Then, we select the smallest K value that has performed the best at predicting missing values. 4 Related Work Anomaly detection has had a wide variety of applications, such as credit card fraud detection [1], intrusion detection for network security [17], and analysis for healthcare data [3]. However, most existing anomaly detection techniques assume data with a single view, i.e. a single observation feature set. A number of anomaly detection methods for two-view data have been proposed [12, 20–22, 24]. However, they cannot be used for data with more than two views. Gao et al. [13] proposed a HOrizontal Anomaly Detection algorithm (HOAD) for finding anomalies from multi-view data. In HOAD, there are hyperparameters including a weight for the constraint that require the data to be labeled as anomalous or not for tuning, and the performance is sensitive to the hyperparameters. On the other hand, the parameters with the proposed model can be estimated from the given multi-view data without label information by maximizing the likelihood. In addition, because the proposed model is a probabilistic generative model, we can extend it in a probabilistically principled manner, for example, for handling missing data and combining with other probabilistic models. Liu and Lam [16] proposed multi-view anomaly detection methods using consensus clustering. They found anomalies based on the inconsistency of clustering results across multiple views. Therefore, they cannot find inconsistency within a cluster. Christoudias et al. [8] proposed a method for filtering instances that are corrupted by background noise from multi-view data. The multi-view anomalies considered in this paper include not only instances corrupted by background noise but also instances categorized into different foreground classes across views, and instances with inconsistent views even if they belong to the same cluster. Recently, Alvarez et al. [2] proposed a multi-view anomaly detection method. However, since the method is based on clustering, it cannot find anomalies when there are no clusters in the given data. The proposed model is a generalization of either probabilistic principal component analysis (PPCA) [23] or probabilistic canonical correlation analysis (PCCA) [5]. When all views are generated from different latent vectors for every instance, the proposed model corresponds to PPCA that is performed independently for each view. When all views are generated from a single latent vector for every instance, the proposed model corresponds to PCCA with spherical noise. PCCA, or canonical correlation analysis (CCA), can be used for multi-view anomaly detection. With PCCA, a latent vector that is shared by all views for each instance and a linear projection matrix for each view are estimated by maximizing the likelihood, or minimizing the reconstruction error of the given data. The reconstruction error for each instance can be used as an anomaly score. However, the reconstruction errors are not reliable because they are calculated from parameters that are estimated using data with anomalies by assuming that all of the instances are non-anomalous. On the other hand, because the proposed model simultaneously estimates the parameters and infers anomalies, the estimated parameters are not contaminated by the anomalies. With PPCA and PCCA, Gaussian distributions are used for observation noise, which are sensitive to atypical observations. Robust PPCA and PCCA [4] use Student-t distributions instead of Gaussian distributions, which are stable to data containing single-view anomalies. The proposed model assumes Gaussian observation noise, and its precision is parameterized by a Gamma distributed variable α. Since we marginalize out α in the inference as written in (4), the observation noise becomes a Student-t distribution. Therefore, the proposed model is robust to single-view anomalies. 5 With some CCA-related methods, each latent vector is factorized into shared and private components across different views [10]. They assume that every instance has shared and private parts that are the same dimensionality for all instances. In contrast, the proposed model assumes that non-anomalous instances have only shared latent vectors, and anomalies have private latent vectors. The proposed model can be seen as CCA with private latent vectors, where latent vectors across views are clustered for each instance. When CCA with private latent vectors are inferred without clustering, the inferred private latent vectors do not become the same even if it is generated from a single latent vector, because switching latent dimension or rotating the latent space does not change the likelihood. Therefore, difference of the latent vectors cannot be used for multi-view anomaly detection. 5 Experiments Data We evaluated the proposed model quantitatively by using 11 data sets, which we obtained from the LIBSVM data sets [7]. We generated two views by randomly splitting the features, where each feature can belong to only a single view, and anomalies were added by swapping views of two randomly selected instances regardless of their class labels for each view. Splitting data does not generate anomalies. Therefore, we can evaluate methods while controlling the anomaly rate properly. By swapping, although single-view anomalies cannot be created since the distribution for each view does not change, multi-view anomalies are created. Comparing methods We compared the proposed model with probabilistic canonical correlation analysis (PCCA), horizontal anomaly detection (HOAD) [13], consensus clustering based anomaly detection (CC) [16], and one-class support vector machine (OCSVM) [18]. For PCCA, we used the proposed model in which the number of latent vectors was fixed at one for every instance. The anomaly scores obtained with PCCA were calculated based on the reconstruction errors. HOAD requires to select an appropriate hyperparametervalue for controlling the constraints whereby different views of the same instance are embedded close together. We ran HOAD with different hyperparameter settings {0.1, 1, 10, 100}, and show the results that achieved the highest performance for each data set. For CC, first we clustered instances for each view using spectral clustering. We set the number of clusters at 20, which achieved a good performance in preliminary experiments. Then, we calculated anomaly scores by the likelihood of consensus clustering when an instance was removed since it indicates inconsistency of the instance across different views. OCSVM is a representative method for single-view anomaly detection. To investigate the performance of a single-view method for multi-view anomaly detection, we included OCSVM as a comparison method. For OCSVM, multiple views are concatenated in a single vector, then use it for the input. We used Gaussian kernel. In the proposed model, we used γ = 1, a = 1, and b = 1 for all experiments. The number of iterations for the Gibbs sampling was 500, and the anomaly score was calculated by averaging over the multiple samples. Multi-view anomaly detection For the evaluation measurement, we used the area under the ROC curve (AUC). A higher AUC indicates a higher anomaly detection performance. Figure 2 shows AUCs with different rates of anomalies using 11 two-view data sets, which are averaged over 50 experiments. For the dimensionality of the latent space, we used K = 5 for the proposed model, PCCA, and HOAD. In general, as the anomaly rate increases, the performance decreases. The proposed model achieved the best performance with eight of the 11 data sets. This result indicates that the proposed model can find anomalies effectively by inferring a number of latent vectors for each instance. The performance of CC was low because it assumes that there are clusters for each view, and it cannot find anomalies within clusters. The AUC of OCSVM was low, because it is a single-view anomaly detection method, which considers instances anomalous that are different from others within a single view. Multi-view anomaly detection is the task to find instances that have inconsistent features across views, but not inconsistent features within a view. The computational time needed for PCCA was 2 sec, and that needed for the proposed model was 35 sec with wine data. Figure 3 shows AUCs with different dimensionalities of latent vectors using data sets whose anomaly rate is 0.4. When the dimensionality was very low (K = 1 or 2), the AUC was low in most of the data sets, because low-dimensional latent vectors cannot represent the observation vectors well. With all the methods, the AUCs were relatively stable when the latent dimensionality was higher than four. 6 (a) breast-cancer (b) diabetes (c) glass 0.2 0.4 0.6 0.8 0.55 0.6 0.65 0.7 AUC anomaly rate 0.2 0.4 0.6 0.8 0.5 0.52 0.54 0.56 0.58 0.6 AUC anomaly rate 0.2 0.4 0.6 0.8 0.5 0.55 0.6 0.65 AUC anomaly rate Proposed PCCA HOAD CC OCSVM (d) heart (e) ionosphere (f) sonar (g) svmguide2 0.2 0.4 0.6 0.8 0.52 0.54 0.56 0.58 0.6 0.62 AUC anomaly rate 0.2 0.4 0.6 0.8 0.55 0.6 0.65 0.7 0.75 0.8 0.85 AUC anomaly rate 0.2 0.4 0.6 0.8 0.6 0.7 0.8 0.9 AUC anomaly rate 0.2 0.4 0.6 0.8 0.48 0.5 0.52 0.54 0.56 AUC anomaly rate (h) svmguide4 (i) vehicle (j) vowel (k) wine 0.2 0.4 0.6 0.8 0.6 0.7 0.8 0.9 AUC anomaly rate 0.2 0.4 0.6 0.8 0.55 0.6 0.65 0.7 0.75 0.8 0.85 AUC anomaly rate 0.2 0.4 0.6 0.8 0.5 0.55 0.6 0.65 0.7 0.75 AUC anomaly rate 0.2 0.4 0.6 0.8 0.55 0.6 0.65 0.7 0.75 0.8 AUC anomaly rate Figure 2: Average AUCs with different anomaly rates, and their standard errors. A higher AUC is better. (a) breast-cancer (b) diabetes (c) glass 2 4 6 8 10 0.55 0.6 0.65 latent dimensionality AUC 2 4 6 8 10 0.5 0.52 0.54 0.56 0.58 latent dimensionality AUC 2 4 6 8 10 0.5 0.52 0.54 0.56 0.58 0.6 0.62 latent dimensionality AUC Proposed PCCA HOAD (d) heart (e) ionosphere (f) sonar (g) svmguide2 2 4 6 8 10 0.5 0.52 0.54 0.56 0.58 0.6 latent dimensionality AUC 2 4 6 8 10 0.5 0.6 0.7 0.8 latent dimensionality AUC 2 4 6 8 10 0.5 0.6 0.7 0.8 0.9 latent dimensionality AUC 2 4 6 8 10 0.45 0.5 0.55 latent dimensionality AUC (h) svmguide4 (i) vehicle (j) vowel (k) wine 2 4 6 8 10 0.5 0.6 0.7 0.8 0.9 latent dimensionality AUC 2 4 6 8 10 0.55 0.6 0.65 0.7 0.75 0.8 0.85 latent dimensionality AUC 2 4 6 8 10 0.55 0.6 0.65 0.7 0.75 latent dimensionality AUC 2 4 6 8 10 0.55 0.6 0.65 0.7 0.75 latent dimensionality AUC Figure 3: Average AUCs with different dimensionalities of latent vectors, and their standard errors. Single-view anomaly detection We would like to find multi-view anomalies, but woul not like to detect single-view anomalies. We illustrated that the proposed model does not detect single-view anomalies using synthetic single-view anomaly data. With the synthetic data, latent vectors for 7 Table 1: Average AUCs for single-view anomaly detection. Proposed PCCA OCSVM 0.117 ± 0.098 0.174 ± 0.095 0.860 ± 0.232 Table 2: High and low anomaly score movies calculated by the proposed model. Title Score Title Score The Full Monty 0.98 Star Trek VI 0.04 Liar Liar 0.93 Star Trek III 0.04 The Professional 0.91 The Saint 0.04 Mr. Holland’s Opus 0.88 Heat 0.03 Contact 0.87 Conspiracy Theory 0.03 single-view anomalies were generated from N(0, √ 10I), and those for non-anomalous instances were generated from N(0, I). Since each of the anomalies has only one single latent vector, it is not a multi-view anomaly. The numbers of anomalous and non-anomalous instances were 5 and 95, respectively. The dimensionalities of the observed and latent spaces were five and three, respectively. Table 1 shows the average AUCs with the single-view anomaly data, which are averaged over 50 different data sets. The low AUC of the proposed model indicates that it does not consider singleview anomalies as anomalies. On the other hand, the AUC of the one-class SVM (OCSVM) was high because OCSVM is a single-view anomaly detection method, and it leads to low multi-view anomaly detection performance. Application to movie data For an application of multi-view anomaly detection, we analyzed inconsistency between movie rating behavior and genre in MovieLens data [14]. An instance corresponds to a movie, where the first view represents whether the movie is rated or not by users, and the second view represents the movie genre. Both views consist of binary features, where some movies are categorized in multiple genres. We used 338 movies, 943 users and 19 genres. Table 2 shows high and low anomaly score movies when we analyzed the movie data by the proposed method with K = 5. ‘The Full Monty’ and ‘Liar Liar’ were categorized in ‘Comedy’ genre. They are rated by not only users who likes ‘Comedy’, but also who likes ‘Romance’ and ‘Action-Thriller’. ‘The Professional’ was anomaly because it was rated by two different user groups, where a group prefers ‘Romance’ and the other prefers ‘Action’. Since ‘Star Trek’ series are typical Sci-Fi and liked by specific users, its anomaly score was low. 6 Conclusion We proposed a generative model approach for multi-view anomaly detection, which finds instances that have inconsistent views. In the experiments, we confirmed that the proposed model could perform much better than existing methods for detecting multi-view anomalies. There are several avenues that can be pursued for future work. Since the proposed model assumes the linearity of observations with respect to their latent vectors, it cannot find anomalies when different views are in a nonlinear relationship. We can relax this assumption by using Gaussian processes [15]. We can also relax the assumption that non-anomalous instances have the same latent vector across all views by introducing private latent vectors [10]. The proposed model assumes Gaussian observation noise. Our framework can be extended for binary or count data by using Bernoulli or Poisson distributions instead of Gaussian. Acknowledgments MY was supported by KAKENHI 16K16114. References [1] E. Aleskerov, B. Freisleben, and B. Rao. Cardwatch: A neural network based database mining system for credit card fraud detection. In Proceedings of the IEEE/IAFE Computational Intelligence for Financial Engineering, pages 220–226, 1997. 8 [2] A. M. Alvarez, M. Yamada, A. Kimura, and T. Iwata. Clustering-based anomaly detection in multi-view data. In Proceedings of ACM International Conference on Information and Knowledge Management, CIKM, 2013. [3] M.-L. Antonie, O. R. Zaiane, and A. Coman. Application of data mining techniques for medical image classification. MDM/KDD, pages 94–101, 2001. [4] C. Archambeau, N. Delannay, and M. Verleysen. Robust probabilistic projections. In Proceedings of the 23rd International Conference on Machine Learning, pages 33–40, 2006. [5] F. R. Bach and M. I. Jordan. A probabilistic interpretation of canonical correlation analysis. Technical Report 688, Department of Statistics, University of California, Berkeley, 2005. [6] V. Chandola, A. Banerjee, and V. Kumar. Anomaly detection: A survey. ACM Computing Surveys (CSUR), 41(3):15, 2009. [7] C. Chang and C. Lin. LIBSVM: a library for support vector machines. ACM Transactions on Intelligent Systems and Technology (TIST), 2(3):27, 2011. [8] C. M. Christoudias, R. Urtasun, and T. Darrell. Multi-view learning in the presence of view disagreement. In Proceedings of the 24th Conference on Unvertainty in Artificial Intelligence, UAI, 2008. [9] K. Duh, C.-M. A. Yeung, T. Iwata, and M. Nagata. Managing information disparity in multilingual document collections. ACM Transactions on Speech and Language Processing (TSLP), 10(1):1, 2013. [10] C. H. Ek, J. Rihan, P. H. Torr, G. Rogez, and N. D. Lawrence. Ambiguity modeling in latent spaces. In Machine Learning for Multimodal Interaction, pages 62–73. Springer, 2008. [11] H. Fanaee-T and J. a. Gama. Tensor-based anomaly detection. Know.-Based Syst., 98(C):130–147, 2016. [12] J. Gao, F. Liang, W. Fan, C. Wang, Y. Sun, and J. Han. On community outliers and their efficient detection in information networks. In Proceedings of the 16th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 813–822. ACM, 2010. [13] J. Gao, W. Fan, D. Turaga, S. Parthasarathy, and J. Han. A spectral framework for detecting inconsistency across multi-source object relationships. In IEEE 11th International Conference on Data Mining (ICDM), pages 1050–1055. IEEE, 2011. [14] J. L. Herlocker, J. A. Konstan, A. Borchers, and J. Riedl. An algorithmic framework for performing collaborative filtering. In Proceedings of the 22nd Annual International ACM SIGIR Conference on Research and Development in Information Retrieval, pages 230–237. ACM, 1999. [15] N. D. Lawrence. Gaussian process latent variable models for visualisation of high dimensional data. Advances in Neural Information Processing Systems, 16(3):329–336, 2004. [16] A. Y. Liu and D. N. Lam. Using consensus clustering for multi-view anomaly detection. In 2012 IEEE Symposium on Security and Privacy Workshops (SPW), pages 117–124. IEEE, 2012. [17] L. Portnoy, E. Eskin, and S. Stolfo. Intrusion detection with unlabeled data using clustering. In Proceedings of ACM CSS Workshop on Data Mining Applied to Security, 2001. [18] B. Schölkopf, J. C. Platt, J. Shawe-Taylor, A. J. Smola, and R. C. Williamson. Estimating the support of a high-dimensional distribution. Neural computation, 13(7):1443–1471, 2001. [19] J. Sethuraman. A constructive definition of Dirichlet priors. Statistica Sinica, 4:639–650, 1994. [20] S. Shekhar, C.-T. Lu, and P. Zhang. Detecting graph-based spatial outliers. Intelligent Data Analysis, 6 (5):451–468, 2002. [21] X. Song, M. Wu, C. Jermaine, and S. Ranka. Conditional anomaly detection. IEEE Transactions on Knowledge and Data Engineering, 19(5):631–645, 2007. [22] J. Sun, H. Qu, D. Chakrabarti, and C. Faloutsos. Neighborhood formation and anomaly detection in bipartite graphs. In Proceedings of the 5th IEEE International Conference on Data Mining, pages 418– 425. IEEE, 2005. [23] M. Tipping and C. Bishop. Probabilistic principal component analysis. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 61(3):611–622, 1999. [24] X. Wang and I. Davidson. Discovering contexts and contextual outliers using random walks in graphs. In Proceedings of the 9th IEEE International Conference on Data Mining, pages 1034–1039. IEEE, 2009. 9 | 2016 | 40 |
6,328 | Efficient Nonparametric Smoothness Estimation Shashank Singh Carnegie Mellon University sss1@andrew.cmu.edu Simon S. Du Carnegie Mellon University ssdu@cs.cmu.edu Barnabás Póczos Carnegie Mellon University bapoczos@cs.cmu.edu Abstract Sobolev quantities (norms, inner products, and distances) of probability density functions are important in the theory of nonparametric statistics, but have rarely been used in practice, due to a lack of practical estimators. They also include, as special cases, L2 quantities which are used in many applications. We propose and analyze a family of estimators for Sobolev quantities of unknown probability density functions. We bound the finite-sample bias and variance of our estimators, finding that they are generally minimax rate-optimal. Our estimators are significantly more computationally tractable than previous estimators, and exhibit a statistical/computational trade-off allowing them to adapt to computational constraints. We also draw theoretical connections to recent work on fast two-sample testing and empirically validate our estimators on synthetic data. 1 Introduction L2 quantities (i.e., inner products, norms, and distances) of continuous probability density functions are important information theoretic quantities with many applications in machine learning and signal processing. For example, L2 norm estimates can be used for goodness-of-fit testing [7], image registration and texture classification [12], and parameter estimation in semi-parametric models [36]. L2 inner products estimates can generalize linear or polynomial kernel methods to inputs which are distributions rather than numerical vectors. [28] L2 distance estimators are used for two-sample testing [1, 25], transduction learning [30], and machine learning on distributional inputs [27]. [29] gives applications of L2 quantities to adaptive information filtering, classification, and clustering. L2 quantities are a special case of less-well-known Sobolev quantities. Sobolev norms measure global smoothness of a function in terms of integrals of squared derivatives. For example, for a non-negative integer s and a function f : R →R with an sth derivative f (s), the s-order Sobolev norm ∥· ∥Hs is given by ∥f∥Hs = R R f (s)(x) 2 dx (when this quantity is finite). See Section 2 for more general definitions, and see [21] for an introduction to Sobolev spaces. Estimation of general Sobolev norms has a long history in nonparametric statistics (e.g., [32, 13, 10, 2]) This line of work was motivated by the role of Sobolev norms in many semi- and non-parametric problems, including density estimation, density functional estimation, and regression, (see [35], Section 1.7.1) where they dictate the convergence rates of estimators. Despite this, to our knowledge, these quantities have never been studied in real data, leaving an important gap between the theory and practice of nonparametric statistics. We suggest this is in part due a lack of practical estimators for these quantities. For example, the only one of the above estimators that is statistically minimaxoptimal [2] is extremely difficult to compute in practice, requiring numerical integration over each of O(n2) different kernel density estimates, where n denotes the sample size. We know of no estimators previously proposed for Sobolev inner products and distances. The main goal of this paper is to propose and analyze a family of computationally and statistically efficient estimators for Sobolev inner products, norms, and distances. Our specific contributions are: 1. We propose families of nonparametric estimators for all Sobolev quantities (Section 4). 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. 2. We analyze the estimators’ bias and variance. Assuming the underlying density functions lie in a Sobolev class of smoothness parametrized by s′, we show the estimator for Sobolev quantities of order s < s′ converges to the true value at the “parametric” rate of O(n−1) in mean squared error when s′ ≥2s + D/4, and at a slower rate of O n 8(s−s′) 4s′+D otherwise. (Section 5). 3. We validate our theoretical results on simulated data. (Section 8). 4. We derive asymptotic distributions for our estimators, and we use these to derive tests for the general statistical problem of two-sample testing. We also draw theoretical connections between our test and the recent work on nonparametric two-sample testing. (Section 9). In terms of mean squared error, minimax lower bounds matching our convergence rates over Sobolev or Hölder smoothness classes have been shown by [16] for s = 0 (i.e., L2 quantities), and [3] for Sobolev norms with integer s. Since these lower bounds intuitively “span” the space of relevant quantities, it is a small step to conjecture that our estimators are minimax rate-optimal for all Sobolev quantities and s ∈[0, ∞). As described in Section 7, our estimators are computable in O(n1+ε) time using only basic matrix operations, where n is the sample size and ε ∈(0, 1) is a tunable parameter trading statistical and computational efficiency; the smallest value of ε at which the estimator continues to be minimax rate-optimal approaches 0 as we assume more smoothness of the true density. 2 Problem setup and notation Let X = [−π, π]D and let µ denote the Lebesgue measure on X. For D-tuples z ∈ZD of integers, let ψz ∈L2 = L2(X) 1 defined by ψz(x) = e−i⟨z,x⟩for all x ∈X denote the zth element of the L2orthonormal Fourier basis, and, for f ∈L2, let ef(z) := ⟨ψz, f⟩L2 = R X ψz(x)f(x) dµ(x) denote the zth Fourier coefficient of f. 2 For any s ∈[0, ∞), define the Sobolev space Hs = Hs(X) ⊆L2 of order s on X by 3 Hs = ( f ∈L2 : X z∈ZD z2s ef(z) 2 < ∞ ) . (1) Fix a known s ∈[0, ∞) and a unknown probability density functions p, q ∈Hs, and suppose we have n IID samples X1, ..., Xn ∼p and Y1, . . . , Yn ∼q from each of p and q. We are interested in estimating the inner product ⟨p, q⟩Hs := X z∈ZD z2sep(z)eq(z) defined for all p, q ∈Hs. (2) Estimating the inner product gives an estimate for the (squared) induced norm and distance, since 4 ∥p∥2 Hs := X z∈ZD z2s |ep(z)|2 = ⟨p, p⟩Hs and ∥p −q∥2 Hs = ∥p∥2 Hs −2⟨p, q⟩Hs + ∥q∥2 Hs. (3) Since our theoretical results assume the samples from p and q are independent, when estimating ∥p∥2 Hs, we split the sample from p in half to compute two independent estimates of ep, although this may not be optimal in practice. For a more classical intuition, we note that, in the case D = 1 and s ∈{0, 1, 2, . . . }, (via Parseval’s identity and the identity g f (s)(z) = (iz)s ef(z)), that one can show the following: Hs includes the 1We suppress dependence on X; all function spaces are over X except as discussed in Section 2.1. 2Here, ⟨·, ·⟩denotes the dot product on RD. For a complex number c = a + bi, c = a −bi denotes the complex conjugate of c, and |c| = √ cc = √ a2 + b2 denotes the modulus of c. 3When D > 1, z2s = QD j=1 z2s j . For z < 0, z2s should be read as (z2)s, so that z2s ∈R even when 2s /∈Z. In the L2 case, we use the convention that 00 = 1. 4∥p∥Hs is pseudonorm on Hs because it fails to distinguish functions identical almost everywhere up to additive constants; a combination of ∥p∥L2 and ∥p∥Hs is used when a proper norm is needed. However, since probability densities integrate to 1, ∥·−·∥Hs is a proper metric on the subset of (almost-everywhere equivalence classes of) probability density functions in Hs, which is important for two-sample testing (see Section 9). For simplicity, we use the terms “norm”, “inner product”, and “distance” for the remainder of the paper. 2 Functional Name Functional Form References L2 norms ∥p∥2 L2 = R (p(x))2 dx [32, 6] (Integer) Sobolev norms ∥p∥2 Hk = R p(k)(x) 2 dx [2] Density functionals R ϕ(x, p(x)) dx [18, 19] Derivative functionals R ϕ(x, p(x), p′(x), . . . , p(k)(x)) dx [3] L2 inner products ⟨p1, p2⟩L2 = R p1(x)p2(x) dx [16, 17] Multivariate functionals R ϕ(x, p1(x), . . . , pk(x)) dx [34, 14] Table 1: Some related functional forms for which estimators for which nonparametric estimators have been developed and analyzed. p, p1, ..., pk are unknown probability densities, from each of which we draw n IID samples, ϕ is a known real-valued measurable function, and k is a non-negative integer. subspace of L2 functions with at least s derivatives in L2 and, if f (s) denotes the sth derivative of f ∥f∥2 Hs = 2π Z X f (s)(x) 2 dx = 2π
f (s)
2 L2 , ∀f ∈Hs. (4) In particular, when s = 0, Hs = L2, ∥· ∥Hs = ∥· ∥L2, and ⟨·, ·⟩Hs = ⟨·, ·⟩L2. As we describe in the supplement, equation (4) and our results generalizes trivially to weak derivatives, as well as to non-integer s ∈[0, ∞) via a notion of fractional derivative. 2.1 Unbounded domains A notable restriction above is that p and q are supported in X := [−π, π]D. In fact, our estimators and tests are well-defined and valid for densities supported on arbitrary subsets of RD. In this case, they act on the 2π-periodic summation p2π : [−π, π]D →[0, ∞] defined for x ∈X by p2π(x) := P z∈ZD p(x + 2πz), which is itself a probability density function on X. For example, the estimator for ∥p∥Hs will instead estimate ∥p2π∥Hs, and the two-sample test for distributions p and q will attempt to distinguish p2π from q2π. Typically, this is not problematic; for example, for most realistic probability densities, p and p2π have similar orders of smoothness, and p2π = q2π if and only if p = q. However, there are (meagre) sets of exceptions; for example, if q is a translation of p by exactly 2π, then p2π = q2π, and one can craft a highly discontinuous function p such that p2π is uniform on X. [39] These exceptions make it difficult to extend theoretical results to densities with arbitrary support, but they are fixed, in practice, by randomly rescaling the data (as in [4]). If the densities have (known) bounded support, they can simply be shifted and scaled to be supported on X. 3 Related work There is a large body of work on estimating nonlinear functionals of probability densities, with various generalizations in terms of the class of functionals considered. Table 1 gives a subset of such work, for functionals related to Sobolev quantities. As shown in Section 2, the functional form we consider is a strict generalization of L2 norms, Sobolev norms, and L2 inner products. It overlaps with, but is neither a special case nor a generalization of the remaining functional forms in the table. Nearly all of the above approaches compute an optimally smoothed kernel density estimate and then perform bias corrections based on Taylor series expansions of the functional of interest. They typically consider distributions with densities that are β-Hölder continuous and satisfy periodicity assumptions of order β on the boundary of their support, for some constant β > 0 (see, for example, Section 4 of [16] for details of these assumptions). The Sobolev class we consider is a strict superset of this Hölder class, permitting, for example, certain “small” discontinuities. In this regard, our results are slightly more general than most of these prior works. Finally, there is much recent work on estimating entropies, divergences, and mutual informations, using methods based on kernel density estimates [14, 17, 16, 24, 33, 34] or k-nearest neighbor statistics [20, 23, 22, 26]. In contrast, our estimators are more similar to orthogonal series density estimators, which are computationally attractive because they require no pairwise operations between samples. However, they require quite different theoretical analysis; unlike prior work, our estimator 3 is constructed and analyzed entirely in the frequency domain, and then related to the data domain via Parseval’s identity. We hope our analysis can be adapted to analyze new, computationally efficient information theoretic estimators. 4 Motivation and construction of our estimator For a non-negative integer parameter Zn (to be specified later), let pn := X ∥z∥∞≤Zn ep(z)ψz and qn := X ∥z∥∞≤Zn eq(z)ψz where ∥z∥∞:= max j∈{1,...,D} zj (5) denote the L2 projections of p and q, respectively, onto the linear subspace spanned by the L2orthonormal family Fn := {ψz : z ∈ZD, |z| ≤Zn}. Note that, since f ψz(y) = 0 whenever y ̸= z, the Fourier basis has the special property that it is orthogonal in ⟨·, ·⟩Hs as well. Hence, since pn and qn lie in the span of Fn while p −pn and q −qn lie in the span of {ψz : z ∈Z}\Fn, ⟨p −pn, qn⟩Hs = ⟨pn, q −qn⟩Hs = 0. Therefore, ⟨p, q⟩Hs = ⟨pn, qn⟩Hs + ⟨p −pn, qn⟩Hs + ⟨pn, q −qn⟩Hs + ⟨p −pn, q −qn⟩Hs = ⟨pn, qn⟩Hs + ⟨p −pn, q −qn⟩Hs. (6) We propose an unbiased estimate of Sn := ⟨pn, qn⟩Hs = P ∥z∥∞≤Zn z2sepn(z)eqn(z). Notice that Fourier coefficients of p are the expectations ep(z) = EX∼p [ψz(X)]. Thus, ˆp(z) := 1 n Pn j=1 ψz(Xj) and ˆq(z) := 1 n Pn j=1 ψz(Yj) are independent unbiased estimates of ep and eq, respectively. Since Sn is bilinear in ep and eq, the plug-in estimator for Sn is unbiased. That is, our estimator for ⟨p, q⟩Hs is ˆSn := X ∥z∥∞≤Zn z2sˆp(z)ˆq(z). (7) 5 Finite sample bounds Here, we present our main theoretical results, bounding the bias, variance, and mean squared error of our estimator for finite n. By construction, our estimator satisfies E h ˆSn i = X ∥z∥∞≤Zn z2s E [ˆp(z)] E [ˆq(z)] = X ∥z∥∞≤Zn z2sepn(z)eqn(z) = Sn. Thus, via (6) and Cauchy-Schwarz, the bias of the estimator ˆSn satisfies E h ˆSn i −⟨p, q⟩Hs = |⟨p −pn, q −qn⟩Hs| ≤ q ∥p −pn∥2 Hs ∥q −qn∥2 Hs. (8) ∥p −pn∥Hs is the error of approximating p by an order-Zn trigonometric polynomial, a classic problem in approximation theory, for which Theorem 2.2 of [15] shows: if p ∈Hs′ for some s′ > s, then ∥p −pn∥Hs ≤∥p∥Hs′ Zs−s′ n . (9) In combination with (8), this implies the following bound on the bias of our estimator: Theorem 1. (Bias bound) If p, q ∈Hs′ for some s′ > s, then, for CB := ∥p∥Hs′ ∥q∥Hs′ , E h ˆSn i −⟨p, q⟩Hs ≤CBZ2(s−s′) n (10) Hence, the bias of ˆSn decays polynomially in Zn, with a power depending on the “extra” s′ −s orders of smoothness available. On the other hand, as we increase Zn, the number of frequencies at which we estimate ˆp increases, suggesting that the variance of the estimator will increase with Zn. Indeed, this is expressed in the following bound on the variance of the estimator. 4 Theorem 2. (Variance bound) If p, q ∈Hs′ for some s′ ≥s, then V h ˆSn i ≤2C1 Z4s+D n n2 + C2 n , where C1 := 2DΓ(4s + 1) Γ(4s + D + 1)∥p∥L2∥q∥L2 (11) and C2 := (∥p∥Hs + ∥q∥Hs) ∥p∥W 2s,4∥q∥W 2s,4 + ∥p∥4 Hs∥q∥4 Hs are the constants (in n) The proof of Theorem 2 is perhaps the most significant theoretical contribution of this work. Due to space constraints, the proof is given in the supplement. Combining Theorems 1 and 2 gives a bound on the mean squared error (MSE) of ˆSn via the usual decomposition into squared bias and variance: Corollary 3. (Mean squared error bound) If p, q ∈Hs′ for some s′ > s, then E ˆSn −⟨p, q⟩Hs 2 ≤C2 BZ4(s−s′) n + 2C1 Z4s+D n n2 + C2 n . (12) If, furthermore, we choose Zn ≍n 2 4s′+D (optimizing the rate in inequality 12), then E ˆSn −⟨p, q⟩H2 2 ≍n max n 8(s−s′) 4s′+D ,−1 o . (13) Corollary 3 recovers the phenomenon discovered by [2]: when s′ ≥2s + D 4 , the minimax optimal MSE decays at the “semi-parametric” n−1 rate, whereas, when s′ ∈ s, 2s + D 4 , the MSE decays at a slower rate. Also, the estimator is L2-consistent if Zn →∞and Znn− 2 4s+D →0 as n →∞. This is useful in practice, since s is known but s′ is not. Finally, it is worth reiterating that, by (3), these finite sample rates extend, with additional constant factors, to estimating Sobolev norms and distances. 6 Asymptotic distributions In this section, we derive the asymptotic distributions of our estimator in two cases: (1) the inner product estimator and (2) the distance estimator in the case p = q. These results provide confidence intervals and two-sample tests without computationally intensive resampling. While (1) is more general in that it can be used with (3) to bound the asymptotic distributions of the norm and distance estimators, (2) provides a more precise result leading to a more computationally and statistically efficient two-sample test. Proofs are given in the supplementary material. Theorem 4 shows that our estimator has a normal asymptotic distribution, assuming Zn →∞slowly enough as n →∞, and also gives a consistent estimator for its asymptotic variance. From this, one can easily estimate asymptotic confidence intervals for inner products, and hence also for norms. Theorem 4. (Asymptotic normality) Suppose that, for some s′ > 2s + D 4 , p, q ∈Hs′, and suppose Znn 1 4(s−s′) →∞and Znn− 1 4s+D →0 as n →∞. Then, ˆSn is asymptotically normal with mean ⟨p, q⟩Hs. In particular, for j ∈{1, . . . , n} and z ∈ZD with ∥z∥∞≤Zn, define Wj,z := zseizXj and Vj,z := zseizYj, so that Wj and Vj are column vectors in R(2Zn)D. Let W := 1 n Pn j=1 Wj, V := 1 n Pn j=1 Vj ∈R(2Zn)D, ΣW := 1 n n X j=1 (Wj−W)(Wj−W)T , and ΣV := 1 n n X j=1 (Vj−V )(Vj−V )T ∈R(2Zn)D×(2Zn)D denote the empirical means and covariances of W and V , respectively. Then, for ˆσ2 n := V W T ΣW 0 0 ΣV V W , we have √n ˆSn −⟨p, q⟩Hs ˆσn ! D →N(0, 1), where D →denotes convergence in distribution. Since distances can be written as a sum of three inner products (Eq. (3)), Theorem 4 might suggest an asymptotic normal distribution for Sobolev distances. However, extending asymptotic normality 5 from inner products to their sum requires that the three estimates be independent, and hence that we split data between the three estimates. This is inefficient in practice and somewhat unnatural, as we know, for example, that distances should be non-negative. For the particular case p = q (as in the null hypothesis of two-sample testing), the following theorem 5 provides a more precise asymptotic (χ2) distribution of our Sobolev distance estimator, after an extra decorrelation step. This gives, for example, a more powerful two-sample test statistic (see Section 9 for details). Theorem 5. (Asymptotic null distribution) Suppose that, for some s′ > 2s + D 4 , p, q ∈Hs′, and suppose Znn 1 4(s−s′) →∞and Znn− 1 4s+D →0 as n →∞. For j ∈{1, . . . , n} and z ∈ZD with ∥z∥∞≤Zn, define Wj,z := zs e−izXj −e−izYj , so that Wj is a column vector in R(2Zn)D. Let W := 1 n n X j=1 Wj ∈R(2Zn)D and Σ := 1 n n X j=1 Wj −W Wj −W T ∈R(2Zn)D×(2Zn)D denote the empirical mean and covariance of W, and define T := nW T Σ−1W. Then, if p = q, then Qχ2((2Zn)D)(T) D →Uniform([0, 1]) as n →∞, where Qχ2(d) : [0, ∞) →[0, 1] denotes the quantile function (inverse CDF) of the χ2 distribution χ2(d) with d degrees of freedom. Let ˆ M denote our estimator for ∥p−q∥Hs (i.e., plugging ˆSn into (3)). While Theorem 5 immediately provides a valid two-sample test of desired level, it is not immediately clear how this relates to ˆ M, nor is there any suggestion of why the test statistic ought to be a good (i.e., consistent) one. Some intuition is as follows. Notice that ˆ M = W T W. Since, by the central limit theorem, W has a normal asymptotic distribution, if the components of W were uncorrelated (and Zn were fixed), we would expect n ˆ M to have an asymptotic χ2 distribution with (2Zn)D degrees of freedom. However, because we use the same data to compute each component of ˆ M, they are not typically uncorrelated, and so the asymptotic distribution of ˆ M is difficult to derive. This motivates the statistic T = q Σ−1 W W T q Σ−1 W W, since the components of q Σ−1 W W are (asymptotically) uncorrelated. 7 Parameter selection and statistical/computational trade-off Here, we give statistical and computational considerations for choosing the smoothing parameter Zn. Statistical perspective: In practice, of course, we do not typically know s′, so we cannot simply set Zn ≍n 2 4s′+D , as suggested by the mean squared error bound (13). Fortunately (at least for ease of parameter selection), when s′ ≥2s + D 4 , the dominant term of (13) is C2/n for Zn ≍n− 1 4s+D . Hence if we are willing to assume that the density has at least 2s + D 4 orders of smoothness (which may be a mild assumption in practice), then we achieve statistical optimality (in rate) by setting Zn ≍n− 1 4s+D , which depends only on known parameters. On the other hand, the estimator can continue to benefit from additional smoothness computationally. Computational perspective An attractive property of the estimator discussed is its computational simplicity and efficiency, in low dimensions. Most competing nonparametric estimators, such as kernel-based or nearest-neighbor methods, either take O(n2) time or rely on complex data structures such as k-d trees or cover trees [31] for O(2Dn log n) time performance. Since computing the estimator takes O(nZD n ) time and O(ZD n ) memory (that is, the cost of estimating each of (2Zn)D Fourier coefficients by an average), a statistically optimal choice of Zn gives a runtime of O n 4s′+2D 4s′+D . Since the estimate requires only a vector outer product, exponentiation, and averaging, constants involved are small and computations parallelize trivially over frequencies and data. Under severe computational constraints, for very large data sets, or if D is large relative to s′, we can reduce Zn to trade off statistical for computational efficiency. For example, if we want an estimator 5This result is closely related to Proposition 4 of [4]. However, in their situation, s = 0 and the set of test frequencies is fixed as n →∞, whereas our set is increasing. 6 10 1 10 2 10 3 10 4 10 5 0.05 0.1 0.15 0.2 0.25 0.3 number of samples L2 2 Estimated Distance True Distance (a) 1D Gaussians with different means. 10 1 10 2 10 3 10 4 10 5 0.05 0.1 0.15 0.2 0.25 number of samples L2 2 Estimated Distance True Distance (b) 1D Gaussians with different variance. 10 1 10 2 10 3 10 4 10 5 0.2 0.4 0.6 0.8 1 number of samples L2 2 Estimated Distance True Distance (c) Uniform distributions with different range. 10 1 10 2 10 3 10 4 10 5 0 0.1 0.2 0.3 0.4 number of samples L2 2 Estimated Distance True Distance (d) One uniform and one triangular distribution. 10 5 0.02 0.025 0.03 0.035 0.04 0.045 number of samples L2 2 Estimated Distance True Distance (a) 3D Gaussians with different means. 10 5 0.01 0.015 0.02 0.025 0.03 0.035 0.04 number of samples L2 2 Estimated Distance True Distance (b) 3D Gaussians with different variance. 10 1 10 2 10 3 10 4 10 5 0.1 0.2 0.3 0.4 0.5 number of samples ||⋅||2 H0 Estimated Distance True Distance (c) Estimation of H0 norm of N (0, 1). 10 1 10 2 10 3 10 4 10 5 −0.4 −0.2 0 0.2 0.4 0.6 number of samples ||⋅||H1 2 Estimated Distance True Distance (d) Estimation of H1 norm of N (0, 1). with runtime O(n1+θ) and space requirement O(nθ) for some θ ∈ 0, 2D 4s′+D , setting Zn ≍nθ/D still gives a consistent estimator, with mean squared error of the order O nmax{ 4θ(s−s′) D ,−1} . Kernel- or nearest-neighbor-based methods, including nearly all of the methods described in Section 3, tend to require storing previously observed data, resulting in O(n) space requirements. In contrast, orthogonal basis estimation requires storing only O(ZD n ) estimated Fourier coefficients. The estimated coefficients can be incrementally updated with each new data point, which may make the estimator or close approximations feasible in streaming settings. 8 Experimental results In this section, we use synthetic data to demonstrate effectiveness of our methods. 6 All experiments use 10, 102, . . . , 105 samples for estimation. We first test our estimators on 1D L2 distances. Figure 1a shows estimated distance between N (0, 1) and N (1, 1); Figure 1b shows estimated distance between N (0, 1) and N (0, 4); Figure 1c shows estimated distance between Unif [0, 1] and Unif[0.5, 1.5]; Figure 1d shows estimated distance between [0, 1] and a triangular distribution whose density is highest at x = 0.5. Error bars indicate asymptotic 95% confidence intervals based on Theorem 4. These experiments suggest 105 samples is sufficient to estimate L2 distances with high confidence. Note that we need fewer samples to estimate Sobolev quantities of Gaussians than, say, of uniform distributions, consistent with our theory, since (infinitely differentiable) Gaussians are smoothier than (discontinuous) uniform distributions. Next, we test our estimators on L2 distances of multivariate distributions. Figure 2a shows estimated distance between N ([0, 0, 0] , I) and N ([1, 1, 1] , I); Figure 2b shows estimated distance between N ([0, 0, 0] , I) and N ([0, 0, 0] , 4I). These experiments show that our estimators can also handle multivariate distributions. Lastly, we test our estimators for Hs norms. Figure 2c shows estimated H0 norm of N (0, 1) and Figure 2d shows H1 norm of N (0, 1). Additional experiments with other distributions and larger values of s are given in the supplement. 9 Connections to two-sample testing We now discuss the use of our estimator in two-sample testing. From the large literature on nonparametric two-sample testing, we discuss only some recent approaches closely related to ours. Let ˆ M denote our estimate of the Sobolev distance, consisting of plugging ˆS into equation (3). Since ∥· −· ∥Hs is a metric on the space of probability density functions in Hs, computing ˆ M leads naturally to a two-sample test on this space. Theorem 5 suggests an asymptotic test, which is computationally preferable to a permutation test. In particular, for a desired Type I error rate α ∈(0, 1) our test rejects the null hypothesis p = q if and only if Qχ2(2ZD n )(T) < α. 6MATLAB code for these experiments is available at https://github.com/sss1/SobolevEstimation. 7 When s = 0, this approach is closely related to several two-sample tests in the literature based on comparing empirical characteristic functions (CFs). Originally, these tests [11, 5] computed the same statistic T with a fixed number of random RD-valued frequencies instead of deterministic ZD-valued frequencies. This test runs in linear time, but is not generally consistent, since the two CFs need not differ almost everywhere. Recently, [4] suggested using smoothed CFs, i.e., the convolution of the CF with a universal smoothing kernel k. This is computationally easy (due to the convolution theorem) and, when p ̸= q, (ep ∗k)(z) ̸= (eq ∗k)(z) for almost all z ∈RD, reducing the need for carefully choosing test frequencies. Furthermore, this test is almost-surely consistent under very general alternatives. However, it is not clear what sort of assumptions would allow finite sample analysis of the power of their test. Indeed, the convergence as n →∞can be arbitrarily slow, depending on the random test frequencies used. Our analysis instead uses the assumption p, q ∈Hs′ to ensure that small, ZD-valued frequencies contain most of the power of ep. 7 These fixed-frequency approaches can be thought of as the extreme point θ = 0 of the computational/statistical trade-off described in section 7: they are computable in linear time and (with smoothing) are strongly consistent, but do not satisfy finite-sample bounds under general conditions. At the other extreme (θ = 1) are MMD-based tests of [8, 9], which use the entire spectrum ep. These tests are statistically powerful and have strong guarantees for densities in an RKHS, but have O(n2) computational complexity. 8 The computational/statistical trade-off discussed in Section 7 can be thought of as an interpolation (controlled by θ) of these approaches, with runtime in the case θ = 1 approaching quadratic for large D and small s′. 10 Conclusions and future work In this paper, we proposed nonparametric estimators for Sobolev inner products, norms and distances of probability densities, for which we derived finite-sample bounds and asymptotic distributions. A natural follow-up question to our work is whether estimating smoothness of a density can guide the choice of smoothing parameters in nonparametric estimation. When analyzing many nonparametric estimators, Sobolev norms appear as the key unknown term in error bounds. While theoretically optimal smoothing parameter values are often suggested based on optimizing these error bounds, our work may suggest a practical way of mimicking this procedure by plugging estimated Sobolev norms into these bounds. For some problems, such as estimating functionals of a density, this may be especially useful, since no error metric is typically available for cross-validation. Even when cross-validation is an option, as in density estimation or regression, estimating smoothness may be faster, or may suggest an appropriate range of parameter values. Acknowledgments This material is based upon work supported by a National Science Foundation Graduate Research Fellowship to the first author under Grant No. DGE-1252522. References [1] N. H. Anderson, P. Hall, and D. M. Titterington. Two-sample test statistics for measuring discrepancies between two multivariate probability density functions using kernel-based density estimates. Journal of Multivariate Analysis, 50(1):41–54, 1994. [2] P. J. Bickel and Y. Ritov. Estimating integrated squared density derivatives: sharp best order of convergence estimates. Sankhy¯a: The Indian Journal of Statistics, Series A, pages 381–393, 1988. [3] L. Birgé and P. Massart. Estimation of integral functionals of a density. The Annals of Statistics, pages 11–29, 1995. [4] K. P. Chwialkowski, A. Ramdas, D. Sejdinovic, and A. Gretton. Fast two-sample testing with analytic representations of probability measures. In NIPS, pages 1972–1980, 2015. [5] T. Epps and K. J. Singleton. An omnibus test for the two-sample problem using the empirical characteristic function. Journal of Statistical Computation and Simulation, 26(3-4):177–203, 1986. [6] E. Giné and R. Nickl. A simple adaptive estimator of the integrated square of a density. Bernoulli, pages 47–61, 2008. 7Note that smooth CFs can be used in our test by replacing ˆp(z) with 1 n Pn j=1 e−izXjk(x), where k is the inverse Fourier transform of a characteristic kernel. However, smoothing seems less desirable under Sobolev assumptions, as it spreads the power of the CF away from small ZD-valued frequencies where our test focuses. 8Fast MMD approximations have been proposed, including the Block MMD, [37] FastMMD, [38] and √n sub-sampled MMD, but these lack the statistical guarantees of MMD. 8 [7] M. N. Goria, N. N. Leonenko, V. V. Mergel, and P. L. N. Inverardi. A new class of random vector entropy estimators and its applications in testing statistical hypotheses. J. Nonparametric Stat., 17:277–297, 2005. [8] A. Gretton, K. M. Borgwardt, M. Rasch, B. Schölkopf, and A. J. Smola. A kernel method for the two-sample-problem. In Advances in neural information processing systems, pages 513–520, 2006. [9] A. Gretton, K. M. Borgwardt, M. J. Rasch, B. Schölkopf, and A. Smola. A kernel two-sample test. The Journal of Machine Learning Research, 13(1):723–773, 2012. [10] P. Hall and J. S. Marron. Estimation of integrated squared density derivatives. Statistics & Probability Letters, 6(2):109–115, 1987. [11] C. Heathcote. A test of goodness of fit for symmetric random variables. Australian Journal of Statistics, 14(2):172–181, 1972. [12] A. O. Hero, B. Ma, O. J. J. Michel, and J. Gorman. Applications of entropic spanning graphs. IEEE Signal Processing Magazine, 19(5):85–95, 2002. [13] I. Ibragimov and R. Khasminskii. On the nonparametric estimation of functionals. In Symposium in Asymptotic Statistics, pages 41–52, 1978. [14] K. Kandasamy, A. Krishnamurthy, B. Poczos, L. Wasserman, et al. Nonparametric von Mises estimators for entropies, divergences and mutual informations. In NIPS, pages 397–405, 2015. [15] H.-O. Kreiss and J. Oliger. Stability of the Fourier method. SIAM Journal on Numerical Analysis, 16(3): 421–433, 1979. [16] A. Krishnamurthy, K. Kandasamy, B. Poczos, and L. A. Wasserman. Nonparametric estimation of renyi divergence and friends. In ICML, pages 919–927, 2014. [17] A. Krishnamurthy, K. Kandasamy, B. Poczos, and L. A. Wasserman. On estimating L2 2 divergence. In AISTATS, 2015. [18] B. Laurent. Efficient estimation of integral functionals of a density. Université de Paris-sud, Département de mathématiques, 1992. [19] B. Laurent et al. Efficient estimation of integral functionals of a density. The Annals of Statistics, 24(2): 659–681, 1996. [20] N. Leonenko, L. Pronzato, V. Savani, et al. A class of rényi information estimators for multidimensional densities. The Annals of Statistics, 36(5):2153–2182, 2008. [21] G. Leoni. A first course in Sobolev spaces, volume 105. American Math. Society, Providence, RI, 2009. [22] K. Moon and A. Hero. Multivariate f-divergence estimation with confidence. In Advances in Neural Information Processing Systems, pages 2420–2428, 2014. [23] K. R. Moon and A. O. Hero. Ensemble estimation of multivariate f-divergence. In Information Theory (ISIT), 2014 IEEE International Symposium on, pages 356–360. IEEE, 2014. [24] K. R. Moon, K. Sricharan, K. Greenewald, and A. O. Hero III. Improving convergence of divergence functional ensemble estimators. arXiv preprint arXiv:1601.06884, 2016. [25] L. Pardo. Statistical inference based on divergence measures. CRC Press, 2005. [26] B. Póczos and J. G. Schneider. On the estimation of alpha-divergences. In International Conference on Artificial Intelligence and Statistics, pages 609–617, 2011. [27] B. Póczos, L. Xiong, and J. Schneider. Nonparametric divergence estimation with applications to machine learning on distributions. arXiv preprint arXiv:1202.3758, 2012. [28] B. Póczos, L. Xiong, D. J. Sutherland, and J. Schneider. Nonparametric kernel estimators for image classification. In Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference on, pages 2989–2996. IEEE, 2012. [29] J. C. Principe. Information theoretic learning: Renyi’s entropy and kernel perspectives. Springer Science & Business Media, 2010. [30] N. Quadrianto, J. Petterson, and A. J. Smola. Distribution matching for transduction. In Advances in Neural Information Processing Systems, pages 1500–1508, 2009. [31] P. Ram, D. Lee, W. March, and A. G. Gray. Linear-time algorithms for pairwise statistical problems. In Advances in Neural Information Processing Systems, pages 1527–1535, 2009. [32] T. Schweder. Window estimation of the asymptotic variance of rank estimators of location. Scandinavian Journal of Statistics, pages 113–126, 1975. [33] S. Singh and B. Póczos. Generalized exponential concentration inequality for renyi divergence estimation. In Proceedings of The 31st International Conference on Machine Learning, pages 333–341, 2014. [34] S. Singh and B. Póczos. Exponential concentration of a density functional estimator. In Advances in Neural Information Processing Systems, pages 3032–3040, 2014. [35] A. Tsybakov. Introduction to Nonparametric Estimation. Springer Publishing Company, Incorporated, 1st edition, 2008. ISBN 0387790519, 9780387790510. [36] E. Wolsztynski, E. Thierry, and L. Pronzato. Minimum-entropy estimation in semi-parametric models. Signal Processing, 85(5):937–949, 2005. [37] W. Zaremba, A. Gretton, and M. Blaschko. B-test: A non-parametric, low variance kernel two-sample test. In Advances in neural information processing systems, pages 755–763, 2013. [38] J. Zhao and D. Meng. Fastmmd: Ensemble of circular discrepancy for efficient two-sample test. Neural computation, 27(6):1345–1372, 2015. [39] A. Zygmund. Trigonometric series, volume 1. Cambridge university press, 2002. 9 | 2016 | 400 |
6,329 | Adversarial Multiclass Classification: A Risk Minimization Perspective Rizal Fathony Anqi Liu Kaiser Asif Brian D. Ziebart Department of Computer Science University of Illinois at Chicago Chicago, IL 60607 {rfatho2, aliu33, kasif2, bziebart}@uic.edu Abstract Recently proposed adversarial classification methods have shown promising results for cost sensitive and multivariate losses. In contrast with empirical risk minimization (ERM) methods, which use convex surrogate losses to approximate the desired non-convex target loss function, adversarial methods minimize non-convex losses by treating the properties of the training data as being uncertain and worst case within a minimax game. Despite this difference in formulation, we recast adversarial classification under zero-one loss as an ERM method with a novel prescribed loss function. We demonstrate a number of theoretical and practical advantages over the very closely related hinge loss ERM methods. This establishes adversarial classification under the zero-one loss as a method that fills the long standing gap in multiclass hinge loss classification, simultaneously guaranteeing Fisher consistency and universal consistency, while also providing dual parameter sparsity and high accuracy predictions in practice. 1 Introduction A common goal for standard classification problems in machine learning is to find a classifier that minimizes the zero-one loss. Since directly minimizing this loss over training data via empirical risk minimization (ERM) [1] is generally NP-hard [2], convex surrogate losses are employed to approximate the zero-one loss. For example, the logarithmic loss is minimized by the logistic regression classifier [3] and the hinge loss is minimized by the support vector machine (SVM) [4, 5]. Both are Fisher consistent [6, 7] and universally consistent [8, 9] for binary classification, meaning they minimize the zero-one loss and are Bayes-optimal classifiers when they learn from any true distribution of data using a rich feature representation. SVMs provide the additional advantage of dual parameter sparsity so that when combined with kernel methods, extremely rich feature representations can be efficiently considered. Unfortunately, generalizing the hinge loss to classification tasks with more than two labels is challenging and existing multiclass convex surrogates [10–12] tend to lose their consistency guarantees [13–15] or produce low accuracy predictions in practice [15]. Adversarial classification [16, 17] uses a different approach to tackle non-convex losses like the zero-one loss. Instead of approximating the desired loss function and evaluating over the training data, it adversarially approximates the available training data within a minimax game formulation with game payoffs defined by the desired (zero-one) loss function [18, 19]. This provides promising empirical results for cost-sensitive losses [16] and multivariate losses such as the F-measure and the precision-at-k [17]. Conceptually, parameter optimization for the adversarial method forces the adversary to “behave like” certain properties of the training data sample, making labels easier to predict within the minimax prediction game. However, a key bottleneck for these methods has been 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. their reliance on zero-sum game solvers for inference, which are computationally expensive relative to inference in other prediction methods, such as SVMs. In this paper, we recast adversarial prediction from an empirical risk minimization perspective by analyzing the Nash equilibrium value of adversarial zero-one classification games to define a new multiclass loss1. This enables us to demonstrate that zero-one adversarial classification fills the long standing gap in ERM-based multiclass classification by simultaneously: (1) guaranteeing Fisher consistency and universal consistency; (2) enabling computational efficiency via the kernel trick and dual parameter sparsity; and (3) providing competitive performance in practice. This reformulation also provides significant computational efficiency improvements compared to previous adversarial classification training methods [16]. 2 Background and Related Work 2.1 Multiclass SVM generalizations The multiclass support vector machine (SVM) seeks class-based potentials fy(xi) for each input vector x ∈X and class y ∈Y so that the discriminant function, ˆyf(xi) = argmaxy fy(xi), minimizes misclassification errors, lossf(xi, yi) = I(yi ̸= ˆyf(xi)). Unfortunately, empirical risk minimization (ERM), minf E ˜ P (x,y) [lossf(X, Y )], for the zero-one loss is NP-hard once the set of potentials is (parametrically) restricted (e.g., as a linear function of input features) [2]. Instead, a hinge loss approximation is employed by the SVM. In the binary setting, yi ∈{−1, +1}, where the potential of one class can be set to zero (f−1 = 0) with no loss in generality, the hinge loss is defined as [1 −yif+1(xi)]+, with the compact definition [g(.)]+ ≜max(0, g(.)). Binary SVM, which is an empirical risk minimizer using the hinge loss with L2 regularization, min fθ E ˜ P (x,y) [lossfθ(X, Y )] + λ 2 ||θ||2 2, (1) provides strong theoretical guarantees (Fisher consistency and universal consistency) [8, 21] and computational efficiency [1]. Many methods have been proposed to generalize SVM to the multiclass setting. Apart from the one-vs-all and one-vs-one decomposed formulations [22], there are three main joint formulations: the WW model by Weston et al. [11], which incorporates the sum of hinge losses for all alternative labels, lossWW(xi, yi) = P j̸=yi [1 −(fyi(xi) −fj(xi))]+; the CS model by Crammer and Singer [10], which uses the hinge loss of only the largest alternative label, lossCS(xi, yi) = maxj̸=yi [1 −(fyi(xi) −fj(xi))]+; and the LLW model by Lee et al. [12], which employs an absolute hinge loss, lossLLW(xi, yi) = P j̸=yi [1 + fj(xi)]+, and a constraint that P j fj(xi) = 0. The former two models (CS and WW) both utilize the pairwise class-based potential differences fyi(xi) −fj(xi) and are therefore categorized as relative margin methods. LLW, on the other hand, is an absolute margin method that only relates to fj(xi)[15]. Fisher consistency, or Bayes consistency [7, 13] guarantees that minimization of a surrogate loss for the true distribution provides the Bayes-optimal classifier, i.e., minimizes the zero-one loss. If given any possible distribution of data, a classifier is Bayes-optimal, it is called universally consistent. Of these, only the LLW method is Fisher consistent and universally consistent [12–14]. However, as pointed out by Do˘gan et al. [15], LLW’s use of an absolute margin in the loss (rather than the relative margin of WW and CS) often causes it to perform poorly for datasets with low dimensional feature spaces. From the opposite direction, the requirements for Fisher consistency have been well-characterized [13], yet this has not led to a multiclass classifier that is both Fisher consistent and performs well in practice. 2.2 Adversarial prediction games Building on a variety of diverse formulations for adversarial prediction [23–26], Asif et al. [16] proposed an adversarial game formulation for multiclass classification with cost-sensitive loss functions. Under this formulation, the empirical training data is replaced by an adversarially chosen conditional label distribution ˇP(ˇy|x) that must closely approximate the training data, but otherwise 1Farnia & Tse independently and concurrently discovered this same loss function [20]. They provide an analysis focused on generalization bounds and experiments for binary classification. 2 seeks to maximize expected loss, while an estimator player ˆP(ˆy|x) seeks to minimize expected loss. For the zero-one loss, the prediction game is: min ˆ P max ˇ P :EP (x) ˇ P (ˇy|x)[φ(X, ˇY )]= ˜φ E ˜ P (x) ˆ P (ˆy|x) ˇ P (ˇy|x) h I( ˆY ̸= ˇY ) i . (2) The vector of feature moments, ˜φ = E ˜ P (x,y)[φ(X, Y )], is measured from sample training data. Using minimax and strong Lagrangian duality, the optimization of Eq. (2) reduces to minimizing the equilibrium game values of a new set of zero-sum games characterized by matrix L′ xi,θ: min θ X i max ˇp min ˆp ˆpT xiL′ xi,θˇpxi; L′ xi,θ = ψ1,yi(xi) · · · ψ|Y|,yi(xi) + 1 ... ... ... ψ1,yi(xi) + 1 · · · ψ|Y|,yi(xi) ; (3) where θ is a vector of Lagrangian model parameters, ˆpxi is a vector representation of the conditional label distribution, ˆP( ˆY = k|xi), i.e. ˆpxi = [ ˆP( ˆY = 1|xi) ˆP( ˆY = 2|xi) . . .]T, and similarly for ˇpxi. The matrix L′ xi,θ is a zero-sum game matrix for each example, with ψj,yi(xi) = fj(xi) − fyi(xi) = θT (φ(xi, j) −φ(xi, yi)). This optimization problem (Eq. (3)) is convex in θ and the inner zero-sum game can be solved using linear programming [16]. 3 Risk Minimization Perspective of Adversarial Multiclass Classification 3.1 Nash equilibrium game value Despite the differences in formulation between adversarial loss minimization and empirical risk minimization, we now recast the zero-one loss adversarial game as the solution to an empirical risk minimization problem. Theorem 1 defines the loss function that provides this equivalence by considering all possible combinations of the adversary’s label assignments with non-zero probability in the Nash equilibrium of the game.2 Theorem 1. The model parameters θ for multiclass zero-one adversarial classification are equivalently obtained from empirical risk minimization under the adversarial zero-one loss function: AL0-1 f (xi, yi) = max S⊆{1,...,|Y|}, S̸=∅ P j∈S ψj,yi(xi) + |S| −1 |S| , (4) where S is any non-empty member of the powerset of classes {1, 2, . . . , |Y|}. Figure 1: AL0-1 evaluated over the space of potential differences (ψj,y(x) = fj(x) −fy(x); and ψj,j(x) = 0) for binary prediction tasks when the true label is y = 1. Thus, AL0-1 is the maximum value over 2|Y| −1 linear hyperplanes. For binary prediction tasks, there are three linear hyperplanes: ψ1,y(x), ψ2,y(x) and ψ1,y(x)+ψ2,y(x)+1 2 . Figure 1 shows the loss function in potential difference spaces ψ when the true label is y = 1. Note that AL0-1 combines two hinge functions at ψ2,y(x) = −1 and ψ2,y(x) = 1, rather than SVM’s single hinge at ψ1,y(x) = −1. This difference from the hinge loss corresponds to the loss that is realized by randomizing label predictions.3 For three classes, the loss function has seven facets as shown in Figure 2a. Figures 2a, 2b, and 2c show the similarities and differences between AL0-1 and the multiclass SVM surrogate losses based on class potential differences. Note that AL0-1 is also a relative margin loss function that utilizes the pairwise potential difference ψj,y(x). 3.2 Consistency properties Fisher consistency is a desirable property for a surrogate loss function that guarantees its minimizer, given the true distribution, P(x, y), will yield the Bayes optimal decision boundary [13, 14]. For 2The proof of this theorem and others in the paper are contained in the Supplementary Materials. 3We refer the reader to Appendix H for a comparison of the binary adversarial method and the binary SVM. 3 (a) (b) (c) Figure 2: Loss function contour plots over the space of potential differences for the prediction task with three classes when the true label is y = 1 under AL0-1 (a), the WW loss (b), and the CS loss (c). (Note that ψi in the plots refers to ψj,y(x) = fj(x) −fy(x); and ψj,j(x) = 0.) multiclass zero-one loss, given that we know Pj(x) ≜P(Y = j|x), Fisher consistency requires that argmaxj f ∗ j (x) ⊆argmaxj Pj(x), where f ∗(x) = [f ∗ 1 (x), . . . , f ∗ |Y|(x)]T is the minimizer of E [lossf(X, Y )|X = x]. Since any constant can be added to all f ∗ j (x) while keeping argmaxj f ∗ j (x) the same, we employ a sum-to-zero constraint, P|Y| j=1 fj(x) = 0, to remove redundant solutions. We establish an important property of the minimizer for AL0-1 in the following theorem. Theorem 2. The loss for the minimizer f ∗of E AL0-1 f (X, Y )|X = x resides on the hyperplane defined (in Eq. 4) by the complete set of labels, S = {1, . . . , |Y|}. As an illustration for the case of three classes (Figure 2a), the area described in the theorem above corresponds to the region in the middle where the hyperplane that supports AL0-1 is ψ1,y(x)+ψ2,y(x)+ψ3,y(x)+2 3 , and, equivalently, where −1 |Y| ≤fj(x) ≤ |Y|−1 |Y| , ∀j ∈{1, . . . , |Y|} with a constraint that P j fj(x) = 0. Based on this restriction, we focus on the minimization of E AL0-1 f (X, Y )|X = x subject to −1 |Y| ≤fj(x) ≤ |Y|−1 |Y| , ∀j ∈{1, . . . , |Y|} and the sum of potentials equal to zero. This minimization reduces to the following optimization: max f |Y| X y=1 Py(x)fy(x) subject to: −1 |Y| ≤fj(x) ≤|Y| −1 |Y| j ∈{1, . . . , |Y|}; |Y| X j=1 fj(x) = 0. The solution for this maximization (a linear program) satisfies f ∗ j (x) = |Y|−1 |Y| if j = argmaxj Pj(x), and −1 |Y| otherwise, which therefore implies the Fisher consistency theorem. Theorem 3. The adversarial zero-one loss, AL0-1, from Eq. (4) is Fisher consistent. Theorem 3 implies that AL0-1 (Eq. (4)) is classification calibrated, which indicates minimization of that loss for all distributions on X × Y also minimizes the zero-one loss [21, 13]. As proven in general by Steinwart and Christmann [2], Micchelli et al. [27], since AL0-1 (Eq.(4)) is a Lipschitz loss with constant 1, the adversarial multiclass classifier is universally consistent under the conditions specified in Corollary 1. Corollary 1. Given a universal kernel and regularization parameter λ in Eq. (1) tending to zero slower than 1 n, the adversarial multiclass classifier is also universally consistent. 3.3 Optimization In the learning process for adversarial classification, Asif et al. [16] requires a linear program to be solved that finds the Nash equilibrium game value and strategy for every training data point in each gradient update. This requirement is computationally burdensome compared to multiclass SVMs, which must simply find potential-maximizing labels. We propose two approaches with improved 4 efficiency by leveraging an oracle for finding the maximization inside AL0-1 and Lagrange duality in the quadratic programming formulation. 3.3.1 Primal optimization using stochastic sub-gradient descent The sub-gradient in the empirical risk minimization of AL0-1 includes the mean of feature differences, 1 |R| P j∈R [φ(xi, j) −φ(xi, yi)] , where R is the set that maximizes AL0-1. The set R is computed by the oracle using a greedy algorithm. Given θ and a sample (xi, yi), the algorithm calculates all potentials ψj,yi(xi) for each label j ∈{1, . . . , |Y|} and sorts them in non-increasing order. Starting with the empty set R = ∅, it then adds labels to R in sorted order until adding a label would decrease the value of P j∈R ψj,yi(xi)+|R|−1 |R| . Theorem 4. The proposed greedy algorithm used by the oracle is optimal. 3.3.2 Dual optimization In the next subsections, we focus on the dual optimization technique as it enables us to establish convergence guarantees. We re-formulate the learning algorithm (with L2 regularization) as a constrained quadratic program (QP) with ξi specifying the amount of AL0-1 incurred by each of the n training examples: min θ 1 2∥θ∥2 + C n X i=1 ξi subject to: ξi ≥∆i,k ∀i ∈{1, . . . n}k ∈{1, . . . , 2|Y| −1}, (5) where we denote each of the 2|Y|−1 possible constraints for example i corresponding to non-empty elements of the label powerset as ∆i,k (e.g., ∆i,1 = ψ1,yi(xi), and ∆i,2|Y|−1 = P j∈Y ψj,yi(xi)+|Y|−1 |Y| ). Note also that non-negativity for ξi is enforced since ∆i,yi = ψyi,yi(xi) = 0. Theorem 5. Let Λi,k be the partial derivative of ∆i,k with respect to θ, i.e., Λi,k = d∆i,k dθ and νi,k is the constant part of ∆i,k (for example if ∆i,k = ψ1,yi(xi)+ψ3,yi(xi)+ψ4,yi(xi)+2 3 , then νi,k = 2 3), then the corresponding dual optimization for the primal minimization (Eq. 5) is: max α n X i=1 2|Y|−1 X k=1 νi,k αi,k −1 2 m X i,j=1 2|Y|−1 X k,l=1 αi,kαj,l [Λi,k · Λj,l] (6) subject to: αi,k ≥0, 2|Y|−1 X k=1 αi,k = C, i ∈{1, . . . , n}, k ∈{1, . . . , 2|Y| −1}, where αi,k is the dual variable for the k-th constraint of the i-th sample. Note that the dual formulation above only depends on the dot product of two constraints’ partial derivatives (with respect to θ) and the constant part of the constraints. The original primal variable θ can be recovered from the dual variables using the formula: θ = −Pn i=1 P2|Y|−1 k=1 αi,k Λi,k. Given a new datapoint x, de-randomized predictions are obtained from argmaxj fj(x) = argmaxj θTφ(x, j). 3.3.3 Efficiently incorporating rich feature spaces using kernelization Considering large feature spaces is important for developing an expressive classifier that can learn from large amounts of training data. Indeed, Fisher consistency requires such feature spaces for its guarantees to be meaningful. However, naïvely projecting from the original input space, xi, to richer (or possibly infinite) feature spaces ω(xi), can be computationally burdensome. Kernel methods enable this feature expansion by allowing the dot products of certain feature functions to be computed implicitly, i.e., K(xi, xj) = ω(xi) · ω(xj). Since our dual formulation only depends on dot products, we employ kernel methods to incorporate rich feature spaces into our formulation as stated in the following theorem. Theorem 6. Let X be the input space and K be a positive definite real valued kernel on X × X with a mapping function ω(x) : X →H that maps the input space X to a reproducing kernel Hilbert 5 space H. Then all the values in the dual optimization of Eq. (6) needed to operate in the Hilbert space H can be computed in terms of the kernel function K(xi, xj) as: Λi,k · Λj,l = c(i,k),(j,l) K(xi, xj), ∆i,k = − n X j=1 2|Y|−1 X l=1 αj,l c(j,l),(i,k) K(xj, xi) + νi,k, (7) fm(xi) = − n X j=1 2|Y|−1 X l=1 αj,l 1(m ∈Rj,l) |Rj,l| −1(m = yj) K(xj, xi) , (8) where c(i,k),(j,l) = |Y| X m=1 1(m ∈Ri,k) |Ri,k| −1(m = yi) 1(m ∈Rj,l) |Rj,l| −1(m = yj) , and Ri,k is the set of labels included in the constraint ∆i,k (for example if ∆i,k = ψ1,yi(xi)+ψ3,yi(xi)+ψ4,yi(xi)+2 3 , then Ri,k = {1, 3, 4}), the function 1(j = yi) returns 1 if j = yi or 0 otherwise, and the function 1(j ∈Ri,k) returns 1 if j is a member of set Ri,k or 0 otherwise. 3.3.4 Efficient optimization using constraint generation The number of constraints in the QP formulation above grows exponentially with the number of classes: O(2|Y|). This prevents the naïve formulation from being efficient for large multiclass problems. We employ a constraint generation method to efficiently solve the dual quadratic programming formulation that is similar to those used for extending the SVM to multivariate loss functions [28] and structured prediction settings [29]. Algorithm 1 Constraint generation method Require: Training data (x1, y1), . . . (xn, yn), C, ϵ 1: θ ←0 2: A∗ i ←{∆i,k|∆i,k = ψyi,yi(xi)} ∀i = 1, . . . , n ▷Actual label enforces non-negativity 3: repeat 4: for i ←1, n do 5: a ←arg maxk|∆i,k∈Ai ∆i,k ▷Find the most violated constraint 6: ξi ←maxk|∆i,k∈A∗ i ∆i,k ▷Compute the example’s current loss estimate 7: if ∆i,a > ξi + ϵ then 8: A∗ i ←A∗ i ∪{∆i,a} ▷Add it to the enforced constraints set 9: α ←Optimize dual over A∗= ∪iA∗ i 10: Compute θ from α: θ = −Pn i=1 P k|∆i,k∈A∗ i αi,k Λi,k 11: end if 12: end for 13: until no A∗ i has changed in the iteration Algorithm 1 incrementally expands the set of enforced constraints, A∗ i , until no remaining constraint from the set of all 2|Y| −1 constraints (in Ai) is violated by more than ϵ. To obtain the most violated constraint, we use the greedy algorithm described in the primal optimization. The constraint generation algorithm’s stopping criterion ensures that a solution close to the optimal is returned (violating no constraint by more than ϵ). Theorem 7 provides a polynomial run time convergence bounds for the Algorithm 1. Theorem 7. For any ϵ > 0 and training dataset {(x1, y1), . . . , (xn, yn)} with U = maxi[xi · xi], Algorithm 1 terminates after incrementally adding at most max 2n ϵ , 4nCU ϵ2 constraints to the constraint set A∗. The proof of Theorem 7 follows the procedures developed by Tsochantaridis et al. [28] for bounding the running time of structured support vector machines. We observe that this bound is quite loose in practice and the algorithm tends to converge much faster in our experiments. 6 4 Experiments We evaluate the performance of the AL0-1 classifier and compare with the three most popular multiclass SVM formulations: WW [11], CS [10], and LLW [12]. We use 12 datasets from the UCI Machine Learning repository [30] with various sizes and numbers of classes (details in Table 1). For each dataset, we consider the methods using the original feature space (linear kernel) and a kernelized feature space using the Gaussian radial basis function kernel. Table 1: Properties of the datasets, the number of constraints considered by SVM models (WW/CS/LLW), the average number of constraints added to the constraint set for AL0-1 and the average number of active constraints at the optima under both linear and Gausssian kernels. Dataset Properties SVM AL0-1 constraints added and active # class # train # test # feature constraints Linear kernel Gauss. kernel (1) iris 3 105 45 4 210 213 13 223 38 (2) glass 6 149 65 9 745 578 125 490 252 (3) redwine 10 1119 480 11 10071 5995 1681 3811 1783 (4) ecoli 8 235 101 7 1645 614 117 821 130 (5) vehicle 4 592 254 18 1776 1310 311 1201 248 (6) segment 7 1617 693 19 9702 4410 244 4312 469 (7) sat 7 4435 2000 36 26610 11721 1524 11860 6269 (8) optdigits 10 3823 1797 64 34407 7932 597 10072 2315 (9) pageblocks 5 3831 1642 10 15324 9459 427 9155 551 (10) libras 15 252 108 90 3528 1592 389 1165 353 (11) vertebral 3 217 93 6 434 344 78 342 86 (12) breasttissue 6 74 32 9 370 258 65 271 145 For our experimental methodology, we first make 20 random splits of each dataset into training and testing sets. We then perform two stage, five-fold cross validation on the training set of the first split to tune each model’s parameter C and the kernel parameter γ under the kernelized formulation. In the first stage, the values for C are 2i, i = {0, 3, 6, 9, 12} and the values for γ are 2i, i = {−12, −9, −6, −3, 0}. We select final values for C from 2iC0, i = {−2, −1, 0, 1, 2} and values for γ from 2iγ0, i = {−2, −1, 0, 1, 2} in the second stage, where C0 and γ0 are the best parameters obtained in the first stage. Using the selected parameters, we train each model on the 20 training sets and evaluate the performance on the corresponding testing set. We use the Shark machine learning library [31] for the implementation of the three multiclass SVM formulations. Despite having an exponential number of possible constraints (i.e., n(2|Y| −1) for n examples versus n(|Y| −1) for SVMs), a much smaller number of constraints need to be considered by the AL0-1 algorithm in practice to realize a better approximation (ϵ = 0) than Theorem 7 provides. Table 1 shows how the total number of constraints for multiclass SVM compares to the number considered in practice by our AL0-1 algorithm for linear and Gaussian kernel feature spaces. These range from a small fraction (0.23) of the SVM constraints for optdigits to a slightly greater number (with a fraction of 1.06) for iris. More specifically, of the over 3.9 million (= 210·3823) possible constraints for optdigits when training the classifier, fewer than 0.3% (7932 or 10072 depending on the feature representation) are added to the constraint set during the constraint generation process. Fewer still (597 or 2315 constraints—less than 0.06%) are constraints that are active in the final classifier with non-zero dual parameters. The sparsity of the dual parameters provides a key computational benefit for support vector machines over logistic regression, which has essentially all non-zero dual parameters. The small number of active constraints shown in Table 1 demonstrate that AL0-1 induces similar sparsity, providing efficiency when employed with kernel methods. We report the accuracy of each method averaged over the 20 dataset splits for both linear feature representations and Gaussian kernel feature representations in Table 2. We denote the results that are either the best of all four methods or not worse than the best with statistical significance (under paired t-test with α = 0.05) using bold font. We also show the accuracy averaged over all of the datasets for each method and the number of dataset for which each method is “indistinguishably best” (bold numbers) in the last row. As we can see from the table, the only alternative model that is Fisher 7 Table 2: The mean and (in parentheses) standard deviation of the accuracy for each model with linear kernel and Gaussian kernel feature representations. Bold numbers in each case indicate that the result is the best or not significantly worse than the best (paired t-test with α = 0.05). D Linear Kernel Gaussian Kernel AL0-1 WW CS LLW AL0-1 WW CS LLW (1) 96.3 (3.1) 96.0 (2.6) 96.3 (2.4) 79.7 (5.5) 96.7 (2.4) 96.4 (2.4) 96.2 (2.3) 95.4 (2.1) (2) 62.5 (6.0) 62.2 (3.6) 62.5 (3.9) 52.8 (4.6) 69.5 (4.2) 66.8 (4.3) 69.4 (4.8) 69.2 (4.4) (3) 58.8 (2.0) 59.1 (1.9) 56.6 (2.0) 57.7 (1.7) 63.3 (1.8) 64.2 (2.0) 64.2 (1.9) 64.7 (2.1) (4) 86.2 (2.2) 85.7 (2.5) 85.8 (2.3) 74.1 (3.3) 86.0 (2.7) 84.9 (2.4) 85.6 (2.4) 86.0 (2.5) (5) 78.8 (2.2) 78.8 (1.7) 78.4 (2.3) 69.8 (3.7) 84.3 (2.5) 84.4 (2.6) 83.8 (2.3) 84.4 (2.6) (6) 94.9 (0.7) 94.9 (0.8) 95.2 (0.8) 75.8 (1.5) 96.5 (0.6) 96.6 (0.5) 96.3 (0.6) 96.4 (0.5) (7) 84.9 (0.7) 85.4 (0.7) 84.7 (0.7) 74.9 (0.9) 91.9 (0.5) 92.0 (0.6) 91.9 (0.5) 91.9 (0.4) (8) 96.6 (0.6) 96.5 (0.7) 96.3 (0.6) 76.2 (2.2) 98.7 (0.4) 98.8 (0.4) 98.8 (0.3) 98.9 (0.3) (9) 96.0 (0.5) 96.1 (0.5) 96.3 (0.5) 92.5 (0.8) 96.8 (0.5) 96.6 (0.4) 96.7 (0.4) 96.6 (0.4) (10) 74.1 (3.3) 72.0 (3.8) 71.3 (4.3) 34.0 (6.4) 83.6 (3.8) 83.8 (3.4) 85.0 (3.9) 83.2 (4.2) (11) 85.5 (2.9) 85.9 (2.7) 85.4 (3.3) 79.8 (5.6) 86.0 (3.1) 85.3 (2.9) 85.5 (3.3) 84.4 (2.7) (12) 64.4 (7.1) 59.7 (7.8) 66.3 (6.9) 58.3 (8.1) 68.4 (8.6) 68.1 (6.5) 66.6 (8.9) 68.0 (7.2) avg 81.59 81.02 81.25 68.80 85.14 84.82 85.00 84.93 #bold 9 6 8 0 9 6 6 7 consistent—the LLW model—performs poorly on all datasets when only linear features are employed. This matches with previous experimental results conducted by Do˘gan et al. [15] and demonstrates a weakness of using an absolute margin for the loss function (rather than the relative margins of all other methods). The AL0-1 classifier performs competitively with the WW and CS models with a slight advantages on overall average accuracy and a larger number of “indistinguishably best” performances on datasets—or, equivalently, fewer statistically significant losses to any other method. The kernel trick in the Gaussian kernel case provides access to much richer feature spaces, improving the performance of all models, and the LLW model especially. In general, all models provide competitive results in the Gaussian kernel case. The AL0-1 classifier maintains a similarly slight advantage and only provides performance that is sub-optimal (with statistical significance) in three of the twelve datasets versus six of twelve and five of twelve for the other methods. We conclude that the multiclass adversarial method performs well in both low and high dimensional feature spaces. Recalling the theoretical analysis of the adversarial method, it is a well-motivated (from the adversarial zero-one loss minimization) multiclass classifier that enjoys both strong theoretical properties (Fisher consistency and universal consistency) and empirical performance. 5 Conclusion Generalizing support vector machines to multiclass settings in a theoretically sound manner remains a long-standing open problem. Though the loss function requirements guaranteeing Fisher-consistency are well-understood [13], the few Fisher-consistent classifiers that have been developed (e.g., LLW) often are not competitive with inconsistent multiclass classifiers in practice. In this paper, we have sought to fill this gap between theory and practice. We have demonstrated that multiclass adversarial classification under zero-one loss can be recast from an empirical risk minimization perspective and its surrogate loss, AL0-1, shown to satisfy the Fisher consistency property, leading to a universally consistent classifier that also performs well in practice. We believe that this is an important contribution in understanding both adversarial methods and the generalized hinge loss. Our future work includes investigating the adversarial methods under the different losses and exploring other theoretical properties of the adversarial framework, including generalization bounds. Acknowledgments This research was supported as part of the Future of Life Institute (futureoflife.org) FLI-RFP-AI1 program, grant#2016-158710 and by NSF grant RI-#1526379. 8 References [1] Vladimir Vapnik. Principles of risk minimization for learning theory. In Advances in Neural Information Processing Systems, pages 831–838, 1992. [2] Ingo Steinwart and Andreas Christmann. Support Vector Machines. Springer Publishing Company, Incorporated, 1st edition, 2008. ISBN 0387772413. [3] Peter McCullagh and John A Nelder. Generalized linear models, volume 37. CRC press, 1989. [4] Bernhard E Boser, Isabelle M Guyon, and Vladimir N Vapnik. A training algorithm for optimal margin classifiers. In Proceedings of the Workshop on Computational Learning Theory, pages 144–152, 1992. [5] Corinna Cortes and Vladimir Vapnik. Support-vector networks. Machine Learning, 20(3):273–297, 1995. [6] Yi Lin. Support vector machines and the bayes rule in classification. Data Mining and Knowledge Discovery, 6(3):259–275, 2002. [7] Peter L. Bartlett, Michael I. Jordan, and Jon D. McAuliffe. Convexity, classification, and risk bounds. Journal of the American Statistical Association, 101(473):138–156, 2006. [8] Ingo Steinwart. Support vector machines are universally consistent. J. Complexity, 18(3):768–791, 2002. [9] Ingo Steinwart. Consistency of support vector machines and other regularized kernel classifiers. IEEE Trans. Information Theory, 51(1):128–142, 2005. [10] Koby Crammer and Yoram Singer. On the algorithmic implementation of multiclass kernel-based vector machines. The Journal of Machine Learning Research, 2:265–292, 2002. [11] Jason Weston, Chris Watkins, et al. Support vector machines for multi-class pattern recognition. In ESANN, volume 99, pages 219–224, 1999. [12] Yoonkyung Lee, Yi Lin, and Grace Wahba. Multicategory support vector machines: Theory and application to the classification of microarray data and satellite radiance data. Journal of the American Statistical Association, 99(465):67–81, 2004. [13] Ambuj Tewari and Peter L Bartlett. On the consistency of multiclass classification methods. The Journal of Machine Learning Research, 8:1007–1025, 2007. [14] Yufeng Liu. Fisher consistency of multicategory support vector machines. In International Conference on Artificial Intelligence and Statistics, pages 291–298, 2007. [15] Ürün Do˘gan, Tobias Glasmachers, and Christian Igel. A unified view on multi-class support vector classification. Journal of Machine Learning Research, 17(45):1–32, 2016. [16] 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. [17] Hong Wang, Wei Xing, Kaiser Asif, and Brian Ziebart. Adversarial prediction games for multivariate losses. In Advances in Neural Information Processing Systems, pages 2710–2718, 2015. [18] Flemming Topsøe. Information theoretical optimization techniques. Kybernetika, 15(1):8–27, 1979. [19] Peter D. Grünwald and A. Phillip Dawid. Game theory, maximum entropy, minimum discrepancy, and robust Bayesian decision theory. Annals of Statistics, 32:1367–1433, 2004. [20] Farzan Farnia and David Tse. A minimax approach to supervised learning. In Advances in Neural Information Processing Systems, pages 4233–4241. 2016. [21] Peter L Bartlett, Michael I Jordan, and Jon D McAuliffe. Large margin classifiers: Convex loss, low noise, and convergence rates. In Advances in Neural Information Processing Systems, pages 1173–1180, 2003. [22] Naiyang Deng, Yingjie Tian, and Chunhua Zhang. Support vector machines: optimization based theory, algorithms, and extensions. CRC press, 2012. [23] Nilesh Dalvi, Pedro Domingos, Sumit Sanghai, Deepak Verma, et al. Adversarial classification. In Proceedings of the International Conference on Knowledge Discovery and Data Mining, pages 99–108. ACM, 2004. [24] Anqi Liu and Brian Ziebart. Robust classification under sample selection bias. In Advances in Neural Information Processing Systems, pages 37–45, 2014. [25] Gert RG Lanckriet, Laurent El Ghaoui, Chiranjib Bhattacharyya, and Michael I Jordan. A robust minimax approach to classification. The Journal of Machine Learning Research, 3:555–582, 2003. [26] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in Neural Information Processing Systems, pages 2672–2680, 2014. [27] Charles A. Micchelli, Yuesheng Xu, and Haizhang Zhang. Universal kernels. Journal of Machine Learning Research, 6:2651–2667, 2006. [28] Ioannis Tsochantaridis, Thorsten Joachims, Thomas Hofmann, and Yasemin Altun. Large margin methods for structured and interdependent output variables. In JMLR, pages 1453–1484, 2005. [29] Thorsten Joachims. A support vector method for multivariate performance measures. In Proceedings of the International Conference on Machine Learning, pages 377–384, 2005. [30] M. Lichman. UCI machine learning repository, 2013. URL http://archive.ics.uci.edu/ml. [31] Christian Igel, Verena Heidrich-Meisner, and Tobias Glasmachers. Shark. Journal of Machine Learning Research, 9:993–996, 2008. 9 | 2016 | 401 |
6,330 | Long-term causal effects via behavioral game theory Panagiotis (Panos) Toulis Econometrics & Statistics, Booth School University of Chicago Chicago, IL, 60637 panos.toulis@chicagobooth.edu David C. Parkes Department of Computer Science Harvard University Cambridge, MA, 02138 parkes@eecs.harvard.edu Abstract Planned experiments are the gold standard in reliably comparing the causal effect of switching from a baseline policy to a new policy. One critical shortcoming of classical experimental methods, however, is that they typically do not take into account the dynamic nature of response to policy changes. For instance, in an experiment where we seek to understand the effects of a new ad pricing policy on auction revenue, agents may adapt their bidding in response to the experimental pricing changes. Thus, causal effects of the new pricing policy after such adaptation period, the long-term causal effects, are not captured by the classical methodology even though they clearly are more indicative of the value of the new policy. Here, we formalize a framework to define and estimate long-term causal effects of policy changes in multiagent economies. Central to our approach is behavioral game theory, which we leverage to formulate the ignorability assumptions that are necessary for causal inference. Under such assumptions we estimate long-term causal effects through a latent space approach, where a behavioral model of how agents act conditional on their latent behaviors is combined with a temporal model of how behaviors evolve over time. 1 Introduction A multiagent economy is comprised of agents interacting under specific economic rules. A common problem of interest is to experimentally evaluate changes to such rules, also known as treatments, on an objective of interest. For example, an online ad auction platform is a multiagent economy, where one problem is to estimate the effect of raising the reserve price on the platform’s revenue. Assessing causality of such effects is a challenging problem because there is a conceptual discrepancy between what needs to be estimated and what is available in the data, as illustrated in Figure 1. What needs to be estimated is the causal effect of a policy change, which is defined as the difference between the objective value when the economy is treated, i.e., when all agents interact under the new rules, relative to when the same economy is in control, i.e., when all agents interact under the baseline rules. Such definition of causal effects is logically necessitated from the designer’s task, which is to select either the treatment or the control policy based on their estimated revenues, and then apply such policy to all agents in the economy. The long-term causal effect is the causal effect defined after the system has stabilized, and is more representative of the value of policy changes in dynamical systems. Thus, in Figure 1 the long-term causal effect is the difference between the objective values at the top and bottom endpoints, marked as the “targets of inference”. What is available in the experimental data, however, typically comes from designs such as the socalled A/B test, where we randomly assign some agents to the treated economy (new rules B) and the others to the control economy (baseline rules A), and then compare the outcomes. In Figure 1 the experimental data are depicted as the solid time-series in the middle of the plot, marked as the “observed data”. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Figure 1: The two inferential tasks for causal inference in multiagent economies. First, infer agent actions across treatment assignments (y-axis), particularly, the assignment where all agents are in the treated economy (top assignment, Z = 1), and the assignment where all agents are in the control economy (bottom assignment, Z = 0). Second, infer across time, from t0 (last observation time) to long-term T. What we seek in order to evaluate the causal effect of the new treatment is the difference between the objectives (e.g., revenue) at the two inferential target endpoints. Therefore the challenge in estimating long-term causal effects is that we generally need to perform two inferential tasks simultaneously, namely, (i) infer outcomes across possible experimental policy assignments (y-axis in Figure 1), and (ii) infer long-term outcomes from short-term experimental data (x-axis in Figure 1). The first task is commonly known as the “fundamental problem of causal inference” [14, 19] because it underscores the impossibility of observing in the same experiment the outcomes for both policy assignments that define the causal effect; i.e., that we cannot observe in the same experiment both the outcomes when all agents are treated and the outcomes when all agents are in control, the assignments of which are denoted by Z = 1 and Z = 0, respectively, in Figure 1. In fact the role of experimental design, as conceived by R.A. Fisher [8], is exactly to quantify the uncertainty about such causal effects that cannot be observed due to the aforementioned fundamental problem, by using standard errors that can be observed in a carefully designed experiment. The second task, however, is unique to causal inference in dynamical systems, such as the multiagent economies that we study in this paper, and has received limited attention so far. Here, we argue that it is crucial to study long-term causal effects, i.e., effects measured after the system has stabilized, because such effects are more representative of the value of policy changes. If our analysis focused only on the observed data part depicted in Figure 1, then policy evaluation would reflect transient effects that might differ substantially from the long-term effects. For instance, raising the reserve price in an auction might increase revenue in the short-term but as agents adapt their bids, or switch to another platform altogether, the long-term effect could be a net decrease in revenue [13]. 1.1 Related work and our contributions There have been several important projects related to causal inference in multiagent economies. For instance, Ostrovsky and Schwartz [16] evaluated the effects of an increase in the reserve price of Yahoo! ad auctions on revenue. Auctions were randomly assigned to an increased reserve price treatment, and the effect was estimated using difference-in-differences (DID), which is a popular econometric method [6, 7, 16]. In relation to Figure 1, DID extrapolates across assignments (y-axis) and across time (x-axis) by making a strong additivity assumption [1, 3, Section 5.2], specifically, by assuming that the dependence of revenue on reserve price and time is additive. In a structural approach, Athey et.al. [4] studied the effects of auction format (ascending versus sealed bid) on competition for timber tracts. In relation to Figure 1, their approach extrapolates 2 across assignments by assuming that agent individual valuations for tracts are independent of the treatment assignment, and extrapolates across time by assuming that the observed agent bids are already in equilibrium. Similar approaches are followed in econometrics for estimation of general equilibrium effects [11, 12]. In a causal graph approach [17] Bottou et.al. [5] studied effects of changes in the algorithm that scores Bing ads on the ad platform’s revenue. In relation to Figure 1, their approach is nonexperimental and extrapolates across assignments and across time by assuming a directed acyclic graph (DAG) as the correct data model, which is also assumed to be stable with respect to treatment assignment, and by estimating counterfactuals through the fitted model. Our work is different from prior work because it takes into account the short-term aspect of experimental data to evaluate long-term causal effects, which is the key conceptual and practical challenge that arises in empirical applications. In contrast, classical econometric methods, such as DID, assume strong linear trends from short-term to long-term, whereas structural approaches typically assume that the experimental data are already long-term as they are observed in equilibrium. We refer the reader to Sections 2 and 3 of the supplement for more detailed comparisons. In summary, our key contribution is that we develop a formal framework that (i) articulates the distinction between short-term and long-term causal effects, (ii) leverages behavioral game-theoretic models for causal analysis of multiagent economies, and (iiii) explicates theory that enables valid inference of long-term causal effects. 2 Definitions Consider a set of agents I and a set of actions A, indexed by i and a, respectively. The experiment designer wants to run an experiment to evaluate a new policy against the baseline policy relative to an objective. In the experiment each agent is assigned to one policy, and the experimenter observes how agents act over time. Formally, let Z = (Zi) be the |I| × 1 assignment vector where Zi = 1 denotes that agent i is assigned to the new policy, and Zi = 0 denotes that i is assigned to the baseline policy; as a shorthand, Z = 1 denotes that all agents are assigned to the new policy, and Z = 0 denotes that all agents are assigned to the baseline policy, where 1, 0 generally denote an appropriately-sized vector of ones and zeroes, respectively. In the simplest case, the experiment is an A/B test, where Z is uniformly random on {0, 1}|I| subject to P i Zi = |I|/2. After the initial assignment Z agents play actions at discrete time points from t = 0 to t = t0. Let Ai(t; Z) ∈A be the random variable that denotes the action of agent i at time t under assignment Z. The population action αj(t; Z) ∈∆|A|, where ∆p denotes the p-dimensional simplex, is the frequency of actions at time t under assignment Z of agents that were assigned to game j; for example, assuming two actions A = {a1, a2}, then α1(0; Z) = [0.2, 0.8] denotes that, under assignment Z, 20% of agents assigned to the new policy play action a1 at t = 0, while the rest play a2. We assume that the objective value for the experimenter depends on the population action, in a similar way that, say, auction revenue depends on agents’ aggregate bidding. The objective value in policy j at time t under assignment Z is denoted by R(αj(t; Z)), where R : ∆|A| →R. For instance, suppose in the previous example that a1 and a2 produce revenue $10 and −$2, respectively, each time they are played, then R is linear and R([.2, .8]) = 0.2 · $10 −0.8 · $2 = $0.4. Definition 1 The average causal effect on objective R at time t of the new policy relative to the baseline is denoted by CE(t) and is defined as CE(t) = E (R(α1(t; 1)) −R(α0(t; 0))) . (1) Suppose that (t0, T] is the time interval required for the economy to adapt to the experimental conditions. The exact definition of T is important but we defer this discussion for Section 3.1. The designer concludes that the new policy is better than the baseline if CE(T) > 0. Thus, CE(T) is the long-term average causal effect and is a function of two objective values, R(α1(T; 1)) and R(α0(T; 0)), which correspond to the two inferential target endpoints in Figure 1. Neither value is observed in the experiment because agents are randomly split between policies, and their actions are observed only for the short-term period [0, t0]. Thus we need to (i) extrapolate across assignments by pivoting from the observed assignment to the counterfactuals Z = 1 and Z = 0; (ii) extrapolate across time from the short-term data [0, t0] to the long-term t = T. We perform these two extrapolations based on a latent space approach, which is described next. 3 2.1 Behavioral and temporal models We assume a latent behavioral model of how agents select actions, inspired by models from behavioral game theory. The behavioral model is used to predict agent actions conditional on agent behaviors, and is combined with a temporal model to predict behaviors in the long-term. The two models are ultimately used to estimate agent actions in the long-term, and thus estimate long-term causal effects. As the choice of the latent space is not unique, in Section 3.1 we discuss why we chose to use behavioral models from game theory. Let Bi(t; Z) denote the behavior that agent i adopts at time t under experimental assignment Z. The following assumption puts a constraints on the space of possible behaviors that agents can adopt, which will simplify the subsequent analysis. Assumption 1 (Finite set of possible behaviors) There is a fixed and finite set of behaviors B such that for every time t, assignment Z and agent i, it holds that Bi(t; Z) ∈B; i.e., every agent can only adopt a behavior from B. Definition 2 (Behavioral model) The behavioral model for policy j defined by set B of behaviors is the collection of probabilities P(Ai(t; Z) = a|Bi(t; Z) = b, Gj), (2) for every action a ∈A and every behavior b ∈B, where Gj denotes the characteristics of policy j. As an example, a non-sophisticated behavior b0 could imply that P(Ai(t; Z) = a|b0, Gj) = 1/|A|, i.e., that the agent adopting b0 simply plays actions at random. Conditioning on policy j in Definition 2 allows an agent to choose its actions based on expected payoffs, which depend on the policy characteristics. For instance, in the application of Section 4 we consider a behavioral model where an agent picks actions in a two-person game according to expected payoffs calculated from the game-specific payoff matrix—in that case Gj is simply the payoff matrix of game j. The population behavior βj(t; Z) ∈∆|B| denotes the frequency at time t under assignment Z of the adopted behaviors of agents assigned to policy j. Let Ft denote the entire history of population behaviors in the experiment up to time t. A temporal model of behaviors is defined as follows. Definition 3 (Temporal model) For an experimental assignment Z a temporal model for policy j is a collection of parameters φj(Z), ψj(Z), and densities (π, f), such that for all t, βj(0; Z) ∼π(·; φj(Z)), βj(t; Z)| Ft−1, Gj ∼f(·|ψj(Z), Ft−1). (3) A temporal model defines the distribution of population behavior as a time-series with a Markovian structure. As defined, the temporal model imposes the restriction that the prior π of population behavior at t = 0 and the density f of behavioral evolution are both independent of treatment assignment Z. In other words, regardless of how agents are assigned to games, the population behavior in the game will evolve according to a fixed model described by f and π. The model parameters φ, ψ may still depend on the treatment assignment Z. 3 Estimation of long-term causal effects Here we develop the assumptions that are necessary for inference of long-term causal effects. Assumption 2 (Stability of initial behaviors) Let ρZ = P i∈I Zi/|I| be the proportion of agents assigned to the new policy under assignment Z. Then, for every possible assignment Z, ρZβ1(0; Z) + (1 −ρZ)β0(0; Z) = β(0), (4) where β(0) is a fixed population behavior invariant to Z. Assumption 3 (Behavioral ignorability) The assignment is independent of population behavior at time t, conditional on policy and behavioral history up to t; i.e., for every t > 0 and policy j, Z |= βj(t; Z) | Ft−1, Gj. 4 Remarks. Assumption 2 implies that the agents do not anticipate the assignment Z as they “have made up their minds” to adopt a population behavior β(0) before the experiment. Quantities such as that in Eq. (4) are crucial in causal inference because they can be used as a pivot for extrapolation across assignments. Assumption 3 states that the treatment assignment does not add information about the population behavior at time t, if we already know the full behavioral history of up to t, and the policy which agents are assigned to; hence, the treatment assignment is conditionally ignorable. This ignorability assumption precludes, for instance, an agent adopting a different behavior depending on whether it was assigned with friends or foes in the experiment. Algorithm 1 is the main methodological contribution of this paper. It is a Bayesian procedure as it puts priors on parameters φ, ψ of the temporal model, and then marginalizes these parameters out. Algorithm 1 Estimation of long-term causal effects Input: Z, T, A, B, G1, G0, D1 = {a1(t; Z) : t = 0, . . . , t0}, D0 = {a0(t; Z) : t = 0, . . . , t0}. Output: Estimate of long-term causal effect CE(T) in Eq. (1). 1: By Assumption 3, define φj ≡φj(Z), ψj ≡ψj(Z). 2: Set µ1 ←0 and µ0 ←0, both of size |A|; set ν0 = ν1 = 0. 3: for iter = 1, 2, . . . do 4: For j = 0, 1, sample φj, ψj from prior, and sample βj(0; Z) conditional on φj. 5: Calculate β(0) = ρZβ1(0; Z) + (1 −ρZ)β0(0; Z). 6: for j = 0, 1 do 7: Set βj(0; j1) = β(0). 8: Sample Bj = {βj(t; j1) : t = 0, . . . , T} given ψj and βj(0, j1). # temporal model 9: Sample αj(T; j1) conditional on βj(T; j1). # behavioral model 10: Set µj ←µj + P (Dj|Bj, Gj) · R(αj(T; j1)). 11: Set νj ←νj + P (Dj|Bj, Gj). 12: end for 13: end for 14: Return estimate c CE(T) = µ1/ν1 −µ0/ν0. Theorem 1 (Estimation of long-term causal effects) Suppose that behaviors evolve according to a known temporal model, and actions are distributed conditionally on behaviors according to a known behavioral model. Suppose that Assumptions 1, 2 and 3 hold for such models. Then, for every policy j ∈{0, 1} as the iterations of Algorithm 1 increase, µj/νj →E (R(αj(T; j1))|Dj) . The output c CE(T) of Algorithm 1 asymptotically estimates the long-term causal effect, i.e., E( c CE(T)) = E (R(α1(T; 1)) −R(α0(T; 0))) ≡CE(T). Remarks. Theorem 1 shows that c CE(T) consistently estimates the long-term causal effect in Eq. (1). We note that it is also possible to derive the variance of this estimator with respect to the randomization distribution of assignment Z. To do so we first create a set of assignments Z by repeatedly sampling Z according to the experimental design. Then we adapt Algorithm 1 so that (i) Step 4 is removed; (ii) in Step 5, β(0) is sampled from its posterior distribution conditional on observed data, which can be obtained from the original Algorithm 1. The empirical variance of the outputs over Z from the adapted algorithm estimates the variance of the output c CE(T) of the original algorithm. We leave the full characterization of this variance estimation procedure for future work. 3.1 Discussion Methodologically, our approach is aligned with the idea that for long-term causal effects we need a model for outcomes that leverages structural information pertaining to how outcomes are generated and how they evolve. In our application such structural information is the microeconomic information that dictates what agent behaviors are successful in a given policy and how these behaviors evolve over time. In particular, Step 1 in the algorithm relies on Assumptions 2 and 3 to infer that model parameters, φj, ψj are stable with respect to treatment assignment. Step 5 of the algorithm is the key estimation pivot, which uses Assumption 2 to extrapolate from the experimental assignment Z to the counterfactual assignments Z = 1 and Z = 0, as required in our problem. Having pivoted to such 5 counterfactual assignment, it is then possible to use the temporal model parameters ψj, which are unaffected by the pivot under Assumption 3, to sample population behaviors up to long-term T, and subsequently sample agent actions at T (Steps 8 and 9). Thus, a lot of burden is placed on the behavioral game-theoretic model to predict agent actions, and the accuracy of such models is still not settled [10]. However, it does not seem necessary that such prediction is completely accurate, but rather that the behavioral models can pull relevant information from data that would otherwise be inaccessible without game theory, thereby improving over classical methods. A formal assessment of such improvement, e.g., using information theory, is open for future work. An empirical assessment can be supported by the extensive literature in behavioral game theory [20, 15], which has been successful in predicting human actions in realworld experiments [22]. Another limitation of our approach is Assumption 1, which posits that there is a finite set of predefined behaviors. A nonparametric approach where behaviors are estimated on-the-fly might do better. In addition, the long-term horizon, T, also needs to be defined a priori. We should be careful how T interferes with the temporal model since such a model implies a time T ′ at which population behavior reaches stationarity. Thus if T ′ ≤T we implicitly assume that the long-term causal effect of interest pertains to a stationary regime (e.g., Nash equilibrium), but if T ′ > T we assume that the effect pertains to a transient regime, and therefore the policy evaluation might be misguided. 4 Application: Long-term causal effects from a behavioral experiment In this section, we apply our methodology to experimental data from Rapoport and Boebel [18], as reported by McKelvey and Palfrey [15]. The experiment consisted of a series of zero-sum twoagent games, and aimed at examining the hypothesis that human players play according to minimax solutions of the game, the so-called minimax hypothesis initially suggested by von Neumann and Morgenstern [21]. Here we repurpose the data in a slightly artificial way, including how we construct the designer’s objective. This enables a suitable demonstration of our approach. Each game in the experiment was a simultaneous-move game with five discrete actions for the row player and five actions for the column player. The structure of the payoff matrix, given in the supplement in Table 1, is parametrized by two values, namely W and L; the experiment used two different versions of payoff matrices, corresponding to payments by the row agent to the column agent when the row agent won (W), or lost (L): modulo a scaling factor, Rapoport and Boebel [18] used (W, L) = ($10, −$6) for game 0 and (W, L) = ($15, −$1) for game 1. Forty agents, I = {1, 2, . . . , 40}, were randomized to one game design (20 agents per game), and each agent played once as row and once as column, matched against two different agents. Every match-up between a pair of agents lasted for two periods of 60 rounds, with each round consisting of a selection of an action from each agent and a payment. Thus, each agent played for four periods and 240 rounds in total. If Z is the entire assignment vector of length 40, Zi = 1 means that agent i was assigned to game 1 with payoff matrix (W, L) = ($15, −$1) and Zi = 0 means that i was assigned to game 0 with payoff matrix (W, L) = ($10, −$6). In adapting the data, we take advantage of the randomization in the experiment, and ask a question in regard to long-term causal effects. In particular, assuming that agents pay a fee for each action taken, which accounts for the revenue of the game, we ask the following question: ”What is the long-term causal effect on revenue if we switch from payoffs (W, L) = ($10, −$6) of game 0 to payoffs (W, L) = ($15, −$1) of game 1?”. The games induced by the two aforementioned payoff matrices represent the two different policies we wish to compare. To evaluate our method, we consider the last period as long-term, and hold out data from this period. We define the causal estimand in Eq. (1) as CE = c⊺(α1(T; 1) −α0(T; 0)), (5) where T = 3 and c is a vector of coefficients. The interpretation is that, given an element ca of c, the agent playing action a is assumed to pay a constant fee ca. To check the robustness of our method we test Algorithm 1 over multiple values of c. 6 4.1 Implementation of Algorithm 1 and results Here we demonstrate how Algorithm 1 can be applied to estimate the long-term causal effect in Eq. (5) on the Rapoport & Boebel dataset. To this end we clarify Algorithm 1 step by step, and give more details in the supplement. Step 1: Model parameters. For simplicity we assume that the models in the two games share common parameters, and thus (φ1, ψ1, λ1) = (φ0, ψ0, λ0) ≡(φ, ψ, λ), where λ are the parameters of the behavioral model to be described in Step 8. Having common parameters also acts as regularization and thus helps estimation. Step 4: Sampling parameters and initial behaviors As explained later we assume that there are 3 different behaviors and thus φ, ψ, λ are vectors with 3 components. Let x ∼U(m, M) denote that every component of x is uniform on (m, M), independently. We choose diffuse priors for our parameters, specifically, φ ∼U(0, 10), ψ ∼U(−5, 5), and λ ∼U(−10, 10). Given φ we sample the initial behaviors as Dirichlet, i.e., β1(0; Z) ∼Dir(φ) and β0(0; Z) ∼Dir(φ), independently. Steps 5 & 7: Pivot to counterfactuals. Since we have a completely randomized experiment (A/B test) it holds that ρZ = 0.5 and therefore β(0) = 0.5(β1(0; Z) + β0(0; Z)). Now we can pivot to the counterfactual population behaviors under Z = 1 and Z = 0 by setting β1(0; 1) = β0(0; 0) = β(0). Step 8: Sample counterfactual behavioral history. As the temporal model, we adopt the lag-one vector autoregressive model, also known as VAR(1). We transform1 the population behavior into a new variable wt = logit(β1(t; 1)) ∈R2 (also do so for β0(t; 0)). Such transformation with a unique inverse is necessary because population behaviors are constrained on the simplex, and thus form so-called compositional data [2, 9]. The VAR(1) model implies that wt = ψ[1]1 + ψ[2]wt−1 + ψ[3]ϵt, (6) where ψ[k] is the kth component of ψ and ϵt ∼N(0, I) is i.i.d. standard bivariate normal. Eq. (6) is used to sample the behavioral history, Bj, in Step 8 of Algorithm 1. Step 9: Behavioral model. For the behavioral model, we adopt the quantal p-response (QLp) model [20], which has been successful in predicting human actions in real-world experiments [22]. We choose p = 3 behaviors, namely B = {b0, b1, b2} of increased sophistication parametrized by λ = (λ[1], λ[2], λ[3]) ∈R3. Let Gj denote the 5 × 5 payoff matrix of game j and let the term strategy denote a distribution over all actions. An agent with behavior b0 plays the uniform strategy, P(Ai(t; Z) = a|Bi(t; Z) = b0, Gj) = 1/5. An agent of level-1 (row player) assumes to be playing only against level-0 agents and thus expects per-action profit u1 = (1/5)Gj1 (for column player we use the transpose of Gj). The level-1 agent will then play a strategy proportional to eλ[1]u1, where ex for vector x denotes the element-wise exponentiation, ex = (ex[k]). The precision parameter λ[1] determines how much an agent insists on maximizing expected utility; for example, if λ[1] = ∞, the agent plays the action with maximum expected payoff (best response); if λ[1] = 0, the agent acts as a level-0 agent. An agent of level2 (row player) assumes to be playing only against level-1 agents with precision λ[2] and therefore expects to face strategy proportional to eλ[2]u1. Thus its expected per-action profit is u2 ∝Gjeλ[2]u1, and plays strategy ∝eλ[3]u2. Given Gj and λ we calculate a 5 × 3 matrix Qj where the kth column is the strategy played by an agent with behavior bk−1. The expected population action is therefore ¯αj(t; Z) = Qjβj(t; Z). The population action αj(t; Z) is distributed as a normalized multinomial random variable with expectation ¯αj(t; Z), and so P(αj(t; 1)|βj(t; 1), Gj) = Multi(|I| · αj(t; 1); ¯αj(t; 1)), where Multi(n; p) is the multinomial density of observations n = (n1, . . . , nK) with probabilities p = (p1, . . . , pK). Hence, the full likelihood for observed actions in game j in Steps 10 and 11 of Algorithm 1 is given by the product P(Dj|Bj, Gj) = T −1 Y t=0 Multi(|I| · αj(t; j1); ¯αj(t; j1)). Running Algorithm 1 on the Rapoport and Boebel dataset yields the estimates shown in Figure 2, for 25 different fee vectors c, where each component ca is sampled uniformly at random from (0, 1). 1y = logit(x) is defined as the function ∆m →Rm−1, y[i] = log(x[i + 1]/x[1]), where x[1] ̸= 0 wlog. 7 Figure 2: Estimates of long-term effects of different methods corresponding to 25 random objective coefficients c in Eq. (5). For estimates of our method we ran Algorithm 1 for 100 iterations. We also test difference-in-differences (DID), which estimates the causal effect through ˆτ did = [R(α1(2; Z)) −R(α1(0; Z))] −[R(α0(2; Z)) −R(α0(0; Z))], and a naive method (“naive” in the plot), which ignores the dynamical aspect and estimates the longterm causal effect as ˆτ nai = [R(α1(2; Z)) −R(α0(2; Z))]. Our estimates (“LACE” in the plot) are closer to the truth (mse = 0.045) than the estimates from the naive method (mse = 0.185) and from DID (mse = 0.361). This illustrates that our method can pull game-theoretic information from the data for long-term causal inference, whereas the other methods cannot. 5 Conclusion One critical shortcoming of statistical methods of causal inference is that they typically do not assess the long-term effect of policy changes. Here we combined causal inference and game theory to build a framework for estimation of such long-term effects in multiagent economies. Central to our approach is behavioral game theory, which provides a natural latent space model of how agents act and how their actions evolve over time. Such models enable to predict how agents would act under various policy assignments and at various time points, which is key for valid causal inference. Working on a real-world dataset [18] we showed how our framework can be applied to estimate the long-term effect of changing the payoff structure of a normal-form game. Our framework could be extended in future work by incorporating learning (e.g., fictitious play, bandits, no-regret learning) to better model the dynamic response of multiagent systems to policy changes. Another interesting extension would be to use our framework for optimal design of experiments in such systems, which needs to account for heterogeneity in agent learning capabilities and for intrinsic dynamical properties of the systems’ responses to experimental treatments. Acknowledgements The authors wish to thank Leon Bottou, the organizers and participants of CODE@MIT’15, GAMES’16, the Workshop on Algorithmic Game Theory and Data Science (EC’15), and the anonymous NIPS reviewers for their valuable feedback. Panos Toulis has been supported in part by the 2012 Google US/Canada Fellowship in Statistics. David C. Parkes was supported in part by NSF grant CCF-1301976 and the SEAS TomKat fund. 8 References [1] Alberto Abadie. Semiparametric difference-in-differences estimators. The Review of Economic Studies, 72(1):1–19, 2005. [2] John Aitchison. The statistical analysis of compositional data. Springer, 1986. [3] Joshua D Angrist and J¨orn-Steffen Pischke. Mostly harmless econometrics: An empiricist’s companion. Princeton university press, 2008. [4] Susan Athey, Jonathan Levin, and Enrique Seira. Comparing open and sealed bid auctions: Evidence from timber auctions. The Quarterly Journal of Economics, 126(1):207–257, 2011. [5] L´eon Bottou, Jonas Peters, Joaquin Qui˜nonero-Candela, Denis X Charles, D Max Chickering, Elon Portugualy, Dipankar Ray, Patrice Simard, and Ed Snelson. Couterfactual reasoning and learning systems. J. Machine Learning Research, 14:3207–3260, 2013. [6] David Card and Alan B Krueger. Minimum wages and employment: A case study of the fast food industry in New Jersey and Pennsylvania. American Economic Review, 84(4):772–793, 1994. [7] Stephen G Donald and Kevin Lang. Inference with difference-in-differences and other panel data. The review of Economics and Statistics, 89(2):221–233, 2007. [8] Ronald Aylmer Fisher. The design of experiments. Oliver & Boyd, 1935. [9] Gary K Grunwald, Adrian E Raftery, and Peter Guttorp. Time series of continuous proportions. Journal of the Royal Statistical Society. Series B (Methodological), pages 103–116, 1993. [10] P Richard Hahn, Indranil Goswami, and Carl F Mela. A bayesian hierarchical model for inferring player strategy types in a number guessing game. The Annals of Applied Statistics, 9(3):1459–1483, 2015. [11] James J Heckman, Lance Lochner, and Christopher Taber. General equilibrium treatment effects: A study of tuition policy. American Economic Review, 88(2):3810386, 1998. [12] James J Heckman and Edward Vytlacil. Structural equations, treatment effects, and econometric policy evaluation1. Econometrica, 73(3):669–738, 2005. [13] John H Holland and John H Miller. Artificial adaptive agents in economic theory. The American Economic Review, pages 365–370, 1991. [14] Paul W Holland. Statistics and causal inference. Journal of the American statistical Association, 81(396):945–960, 1986. [15] Richard D McKelvey and Thomas R Palfrey. Quantal response equilibria for normal form games. Games and economic behavior, 10(1):6–38, 1995. [16] Michael Ostrovsky and Michael Schwarz. Reserve prices in internet advertising auctions: A field experiment. In Proceedings of the 12th ACM conference on Electronic commerce, pages 59–60. ACM, 2011. [17] Judea Pearl. Causality: models, reasoning and inference. Cambridge University Press, 2000. [18] Amnon Rapoport and Richard B Boebel. Mixed strategies in strictly competitive games: A further test of the minimax hypothesis. Games and Economic Behavior, 4(2):261–283, 1992. [19] Donald B Rubin. Causal inference using potential outcomes. Journal of the American Statistical Association, 2011. [20] Dale O Stahl and Paul W Wilson. Experimental evidence on players’ models of other players. Journal of Economic Behavior & Organization, 25(3):309–327, 1994. [21] J Von Neumann and O Morgenstern. Theory of games and economic behavior. Princeton University Press, 1944. [22] James R Wright and Kevin Leyton-Brown. Beyond equilibrium: Predicting human behavior in normal-form games. In Proc. 24th AAAI Conf. on Artificial Intelligence, 2010. 9 | 2016 | 402 |
6,331 | Sampling for Bayesian Program Learning Kevin Ellis Brain and Cognitive Sciences MIT ellisk@mit.edu Armando Solar-Lezama CSAIL MIT asolar@csail.mit.edu Joshua B. Tenenbaum Brain and Cognitive Sciences MIT jbt@mit.edu Abstract Towards learning programs from data, we introduce the problem of sampling programs from posterior distributions conditioned on that data. Within this setting, we propose an algorithm that uses a symbolic solver to efficiently sample programs. The proposal combines constraint-based program synthesis with sampling via random parity constraints. We give theoretical guarantees on how well the samples approximate the true posterior, and have empirical results showing the algorithm is efficient in practice, evaluating our approach on 22 program learning problems in the domains of text editing and computer-aided programming. 1 Introduction Learning programs from examples is a central problem in artificial intelligence, and many recent approaches draw on techniques from machine learning. Connectionist approaches, like the Neural Turing Machine [1, 2] and symbolic approaches, like Hierarchical Bayesian Program Learning [3, 4, 5], couple a probabilistic learning framework with either gradient- or sampling-based search procedures. In this work, we consider the problem of Bayesian inference over program spaces. We combine solver-based program synthesis [6] and sampling via random projections [7], showing how to sample from posterior distributions over programs where the samples come from a distribution provably arbitrarily close to the true posterior. The new approach is implemented in a system called PROGRAMSAMPLE and evaluated on a set of program induction problems that include list and string manipulation routines. 1.1 Motivation and problem statement Input Output “1/21/2001” “01” substr(pos(’0’,-1),-1) “last 0 til end” const(’01’) “output 01” substr(-2,-1) “take last two” Figure 1: Learning string manipulation programs by example (top input/output pair). Our system receives data like that shown above and then sampled the programs shown below. Consider the problem of learning string edit programs, a well studied domain for programming by example. Often end users provide these examples and are unwilling to give more than one instance, which leaves the target program highly ambiguous. We model this ambiguity by sampling string edit programs, allowing us to learn from very few examples (Figure 1) and offer different plausible solutions. Our sampler also incorporates a description-length prior to bias us towards simpler programs. Another program learning domain comes from computer-aided programming, where the goal is to synthesize algorithms from either examples or formal specifications. This problem can be ill posed because many programs may satisfy the specification or examples. When this ambiguity arises, PROGRAMSAMPLE proposes multiple implementations with a bias towards shorter or simpler ones. The samples can also be used to efficiently approximate the posterior predictive distribution, 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. effectively integrating out the program. We show PROGRAMSAMPLE learning routines for counting and recursively sorting/reversing lists while modeling the uncertainty over the correct algorithm. Because any model can be represented as a (probabilistic or deterministic) program, we need to carefully delimit the scope of this work. The programs we learn are a subset of those handled by constraint-based program synthesis tools. This means that the program is finite (bounded size, bounded runtime, bounded memory consumption), can be modeled in a constraint solver (like a SAT or SMT solver), and that the program’s high-level structure is already given as a sketch [6], which can take the form of a recursive grammar over expressions. The sketch defines the search space and imparts prior knowledge. For example, we use one sketch when learning string edit programs and a different sketch when learning recursive list manipulation programs. More formally, our sketch specifies a finite set of programs, S, as well as a measure of the programs’ description length, which we write as |x| for x ∈S. This defines a prior (∝2−|x|). For each program learning problem, we have a specification (such as consistency with input/output examples) and want to sample from S conditioned upon the specification holding, giving the posterior over programs ∝2−|x|1[specification holds for x]. Throughout the rest of the paper, we write p(·) to mean this posterior distribution, and write X to mean the set of all programs in S consistent with the specification. So the problem is to sample from p(x) = 2−|x| Z where Z = P x∈X 2−|x|. We can invoke a solver, which enumerates members of X, possibly subject to extra constraints, but without any guarantees on the order of enumeration. Throughout this work we use a SAT solver, and encode x ∈X in the values of n Boolean decision variables. With a slight abuse of notation we will use x to refer to both a member of X and an assignment to those n decision variables. An assignment to jth variable we write as xj for 1 ≤j ≤n. Section 1.2 briskly summarizes the constraint-solving program synthesis approach. 1.2 Program synthesis by constraint solving The constraint solving approach to program synthesis, pioneered in [6, 8], synthesizes programs by (1) modeling the space of programs as assignments to Boolean decision variables in a constraint satisfaction problem; (2) adding constraints to enforce consistency with a specification; (3) asking the solver to find any solution to the constraints; and (4) reinterpreting that solution as a program. Figure 2 illustrates this approach for the toy problem of synthesizing programs in a language consisting of single-bit operators. Each program has one input (i in Figure 2) which it transforms using nand gates. The grammar in Figure 2a is the sketch. If we inline the grammar, we can diagram the space of all programs as an AND/OR graph (Figure 2b), where xj are Boolean decision variables that control the program’s structure. For each of the input/output examples (Figure 2d) we have constraints that model the program execution (Figure 2c) and enforce the desired output (P1 taking value 1). After solving for a satisfying assignment to the xj’s, we can read these off as a program (Figure 2e). In this work we measure the description length of a program x as the number of bits required to specify its structure (so |x| is a natural number).1 PROGRAMSAMPLE further constrains unused bits to take a canonical form, such as all being zero. This causes the mapping between programs x ∈X and variable assignments {xj}N j=1 to be one-to-one. 1.3 Algorithmic contribution In the past decade different groups of researchers have concurrently developed solver-based techniques for (1) sampling of combinatorial spaces [9, 7, 10, 11] and (2) program synthesis [6, 8]. This work merges these two lines of research to attack the problem of program learning in a probabilistic setting. We use program synthesis tools to convert a program learning problem into a SAT formula. Then, rather than search for one program (formula solution), we augment the formula with random constraints that cause it to (approximately) sample the space of programs, effectively “upgrading” our SAT solver from a program synthesizer to a program sampler. The groundbreaking algorithms in [9] gave the first scheme (XORSample) for sampling discrete spaces by adding random constraints to a constraint satisfaction problem. While one could use a tool like Sketch to reduce a program learning problem to SAT and then use an algorithm like XORSample, 1This is equivalent to the assumption that x is drawn from a probabilistic grammar specified by the sketch 2 Program ::= i | nand(Program,Program) (a) Sketch P1 i x1 nand P2 i x2 nand x2 P3 x1 . . . . . . . . . . . . (b) Program space i ⇔0 ∧P1 ⇔1 x1 ⇒(P1 ⇔i) x1 ⇒(P1 ⇔P2 ∧P3) x2 ⇒(P2 ⇔i) x2 ⇒(P2 ⇔P4 ∧P5) x3 ⇒(P3 ⇔i) · · · · · · (c) Constraints for SAT solver Program(i = 0) = 1 (d) Specification x1 = 0, x2 = 1, x3 = 1 Program = nand(i, i) (e) A constraint solution; |x| = 3 bits Figure 2: Synthesizing a program via sketching and constraint solving. Typewriter font refers to pieces of programs or sketches, while math font refers to pieces of a constraint satisfaction problem. The variable i is the program input. PAWS, or WeightGen [9, 7, 10] to sample programs from a description length prior, doing so can be surprisingly inefficient2. The efficiency of these sampling algorithms depends critically on a quantity called the distribution’s tilt, introduced in [10] as maxx p(x) minx p(x) . When there are a few very likely (short) programs and many extremely unlikely (long) programs, the posterior over programs becomes extremely tilted. Recent work has relied on upper bounding the tilt, often to around 20 [10]. For program sampling problems, we usually face very high tilt upwards of 250. Our main algorithmic contribution is a new approach that extends these techniques to distributions with high tilt, such as those encountered in program induction. 2 The sampling algorithm Given the distribution p(·) on the program space X, it is always possible to define a higher dimensional space E (an embedding) and a mapping F : E →X such that sampling uniformly from E and applying F will give us approximately p-distributed samples [7]. But, when the tilt of p(·) becomes large, we found that such an approach is no longer practical.3 Our approach instead is to define an F ′ : E →X such that uniform samples on E map to a distribution q(·) that is guaranteed to have low tilt, but whose KL divergence from p(·) is low. The discrepancy between the distributions p(·) and q(·) can be corrected through rejection sampling. Sampling uniformly from E is itself not trivial, but a variety of techniques exist to approximate uniform sampling by adding random XOR constraints (random projections mod 2) to the set E, which is extensively studied in [9, 12, 10, 13, 11]. These techniques introduce approximation error that can be made arbitrarily small at the expense of lower efficiency. Figure 3 illustrates this process. 2.1 Getting high-quality samples Low-tilt approximation. We introduce a parameter into the sampling algorithm, d, that parameterizes q(·). The parameter d acts as a threshold, or cut-off, for the description length of a program; the distribution q(·) acts as though any program with description length exceeding d can be encoded using d bits. Concretely, q(x) ∝ 2−|x|, if |x| ≤d 2−d, otherwise (1) If we could sample exactly from q(·), we could reject a sample x with probability 1 −A(x) where A is A(x) ∝ 1, if |x| ≤d 2−|x|+d, otherwise (2) 2In many cases, slower than rejection sampling or enumerating all of the programs 3[10] take a qualitatively different approach from [7] not based on an embedding, but which still becomes prohibitively expensive in the high-tilt regime. 3 and get exact samples from p(·), where the acceptance rate would approach 1 exponentially quickly in d. We have the following result; see supplement for proofs. Proposition 1. Let x ∈X be a sample from q(·). The probability of accepting x is at least 1 1+|X|2|x∗|−d where x∗= arg minx|x|. Figure 3: PROGRAMSAMPLE twice distorts the posterior distribution p(·). First it introduces a parameter d that bounds the tilt; we correct for this by accepting samples w.p. A(x). Second it samples from q(·) by drawing instead from r(·), where KL(q||r) can be made arbitrarily small by appropriately setting another parameter, K. The distribution of samples is A(x)r(x). The distribution q(·) is useful because we can guarantee that it has tilt bounded by 2d−|x∗|. Introducing the proposal q(·) effectively reifies the tilt, making it a parameter of the sampling algorithm, not the distribution over programs. We now show how to approximately sample from q(·) using a variant of the Embed and Project framework [7]. The embedding. The idea is to define a new set of programs, which we call E, such that short programs are included in the set much more often than long programs. Each program x will be represented in E by an amount proportional to 2−min(|x|,d), thus proportional to q(x), such that sampling elements uniformly from E samples according to q(·). We embed X within the larger set E by introducing d auxiliary variables, written (y1, · · · , yd), such that every element of E is a tuple of an element of x = (x1, · · · , xn) and an assignment to y = (y1, · · · , yd): E = {(x, y) : x ∈X, ^ 1≤j≤d |x| ≥j ⇒yj = 1} (3) Suppose we sample (x, y) uniformly from E. Then the probability of getting a particular x ∈X is proportional to |{(x′, y) ∈E : x′ = x}| = |{y : |x| ≥j ⇒yj = 1}| = 2min(0,d−|x|) which is proportional to q(x). Notice that |E| grows exponentially with d, and thus with the tilt of the q(·). This is the crux of the inefficiency of sampling from high-tilt distributions in these frameworks: these auxiliary variables combine with the random constraints to entangle otherwise independent Boolean decision variables, while also increasing the number of variables and clauses. The random projections. We could sample exactly from E by invoking the solver |E| + 1 times to get every element of E, but in general it will have O(|X|2d) elements, which could be very large. Instead, we ask the solver for all the elements of E consistent with K random constraints such that (1) few elements of E are likely to satisfy (“survive”) the constraints, and (2) any element of E is approximately equally likely to satisfy the constraints. We can then sample a survivor uniformly to get an approximate sample from E, an idea introduced in the XORSample′ algorithm [9]. Although simple compared to recent approaches [10, 14, 15], it suffices for our theoretical and empirical results. Our random constraints take the form of XOR, or parity constraints, which are random projections mod 2. Each constraint fixes the parity of a random subset of SAT variables in x to either 1 or 0; thus any x survives a constraint with probability 1 2. A useful feature of random parity constraints is that whether an assignment to the SAT variables survives is independent of whether another, different assignment survives, which has been exploited to create a variety of approximate sampling algorithms [9, 12, 10, 13, 11]. Then the K constraints are of the form h ( x y ) 2≡b where h is a K × (d + n) binary matrix and b is a K-dimensional binary vector. If no solutions satisfy the K constraints then the sampling attempt is rejected. These samples are close to uniform in the following sense: Proposition 2. The probability of sampling (x, y) is at least 1 |E| × 1 1+2K/|E| and the probability of getting any sample at all is at least 1 −2K/|E|. So we get approximate samples from E as long as |E|2−K is not small. In reference to Figure 3, we call the distribution of these samples r(x) = P y r(x, y). Schemes more sophisticated than XORSample′, like [7], also guarantee upper bounds on sampling probability, but we found that these 4 Algorithm 1 PROGRAMSAMPLE Input: Program space X, number of samples N, failure probability δ, parameters ∆> 0, γ > 0 Output: N samples Set |x∗| = minx∈X|x| Set BX = ApproximateUpperBoundModelCount(X,δ/2) Set d = ⌈γ + log BX + |x∗|⌉ Define E = {(x, y) : x ∈X, V 1≤j≤d|x| ≥j =⇒yj = 1} Set BE = ApproximateLowerBoundModelCount(E,δ/2) Set K = ⌊log BE −∆⌋ Initialize samples = [] repeat Sample h uniformly from {0, 1}(d+n)×K Sample b uniformly from {0, 1}K Enumerate S = {(x, y) where h(x, y) = b ∧x ∈X} if |S| > 0 then Sample (x, y) uniformly from S if Uniform(0, 1) < 2d−|x| then samples = samples + [x] end if end if until |samples| = N return samples were unnecessary for our main result, which is that the KL between p(·) and A(x)r(x) goes to zero exponentially quickly in a new quantity we call ∆: Proposition 3. Write Ar(x) to mean the distribution proportional to A(x)r(x). Then D(p||Ar) < log 1 + 1+2−γ 1+2∆ where ∆= log |E| −K and γ = d −log |X| −|x∗|. So we can approximate the true distribution p(·) arbitrarily well, but at the expense of either more calls to the solver (increasing ∆) or a larger embedding (increasing γ; our main algorithmic contribution). See supplement for theoretical and empirical analyses of this accuracy/runtime trade-off. Proposition 3 requires knowing minx|x| to set K and d. We compute minx|x| using the iterative minimization routine in [16]; in practice this is very efficient for finite program spaces. We also need to calculate |X| and |E|, which are model counts that are in general difficult to compute exactly. However, many approximate model counting schemes exist, which provide upper and lower bounds that hold with arbitrarily high probability. We use Hybrid-MBound [13] to upper bound |X| and lower bound |E| that each individually hold with probability at least 1 −δ/2, thus giving lower bounds on both the γ and ∆parameters of Proposition 3 with probability at least 1 −δ and thus an upper bound on the KL divergence. Algorithm 1 puts these ideas together. 3 Experimental results We evaluated PROGRAMSAMPLE on program learning problems in a text editing domain and a list manipulation domain. For each domain, we wrote down a sketch and produced SAT formulas using the tool in [6], specifying a large but finite set of possible programs. This implicitly defined a description-length prior, where |x| is the number of bits required to specify x in the SAT encoding. We used CryptoMiniSAT [17], which can efficiently handle parity constraints. 3.1 Learning Text Edit Scripts We applied our program sampling algorithm to a suite of programming by demonstration problems within a text editing domain. Here, the challenge is to learn a small text editing program from very few examples and apply that program to held out inputs. This problem is timely, given the widespread use of the FlashFill program synthesis tool, which now ships by default in Microsoft Excel [18] and can learn sophisticated edit operations in real time from examples. We modeled a subset of 5 the FlashFill language; our goal here is not to compete with FlashFill, which is cleverly engineered for its specific domain, but to study the behavior of our more general-purpose program learner in a real-world task. To impart domain knowledge, we used a sketch equivalent to Figure 4. Program ::= Term | Program + Term Term ::= String | substr(Pos,Pos) Pos ::= Number | pos(String,String,Number) Number ::= 0 | 1 | 2 | ... | -1 | -2 | ... String ::= Character | Character + String Character ::= a | b | c | ... Figure 4: The sketch (program space) for learning text edit scripts Because FlashFill’s training set is not yet public, we drew text editing problems from [19] and adapted them to our subset of FlashFill, giving 19 problems, each with 5 training examples. The supplement contains these text edit problems. We are interested both in the ability of the learner to generalize and in PROGRAMSAMPLE’s ability to generate samples quickly. Table 1 shows the average time per sampling attempt using PROGRAMSAMPLE, which is on the order of a minute. These text edit problems come from distributions with extremely high tilt: often the smallest program is only tens of bits long, but the program space contains (implausible) solutions with over 100 bits. By putting d to |x∗| −n we eliminate the tilt correction and recover a variant of the approaches in [7]. This baseline does not produce any samples for any of our text edit problems in under an hour.4 Other baselines also failed to produce samples in a reasonable amount of time (see supplement). For example, pure rejection sampling (drawing from the prior) is also infeasible, with consistent programs having prior probability ≤2−50 in some cases. The learner generalizes to unseen examples, as Figure 5 shows. We evaluated the performance of the learner on held out test examples while varying training set size, and compare with baselines that either (1) enumerate programs in the arbitrary order provided by the underlying solver, or (2) takes the most likely program under p(x) (MDL learner). The posterior is sharply peaked, with most samples being from the MAP solution, and so our learner does about as well as the MDL learner. However, sampling offers an (approximate) predictive posterior over predictions on the held out examples; in a real world scenario, one would offer the top C predictions to the user and let them choose, much like how spelling correction works. This procedure allows us to offer the correct predictions more often than the MDL learner (Figure 6), because we correctly handle ambiguous problems like in Figure 1. We see this as a primary strength of the sampling approach to Bayesian program learning: when learning from one or a few examples, a point estimate of the posterior can often miss the mark. Figure 5: Generalization when learning text edit operations by example. Results averaged across 19 problems. Solid: 100 samples from PROGRAMSAMPLE . Dashed: enumerating 100 programs. Dotted: MDL learner. Test cases past 1 (respectively 2,3) examples are held out when trained on 1 (respectively 2,3) examples. Figure 6: Comparing the MDL learner (dashed black line) to program sampling when doing one-shot learning. We count a problem as “solved” if the correct joint prediction to the test cases is in the top C most frequent samples. 4Approximate model counting of E was also intractable in this regime, so we used the lower bound |E| ≥2d−|x∗| + |X| −1 6 Table 1: Average solver time to generate a sample measured in seconds. See Figure 9 and 5 for training set sizes. n ≈180, 65 for text edit, list manipulation domains, respectively. w/o tilt correction, sampling text edit & count takes > 1 hour. Large set Medium set Small set text edit 49±3 21 ±1 84 ±3 sort 1549±155 905 ±58 463 ±65 reverse 326±42 141 ±18 39 ±3 count ≤1 ≤1 ≤1 Figure 7: Sampling frequency vs. ground truth probability on a counting task with ∆= 3 and γ = 4. 3.2 Learning list manipulation algorithms One goal of program synthesis is computer-aided programming [6], which is the automatic generation of executable code from either declarative specifications or examples of desired behavior. Systems with this goal have been successfully applied to, for example, synthesizing intricate bitvector routines from specifications [18]. However, when learning from examples, there is often uncertainty over the correct program. While past approaches have handled this uncertainty within an optimization framework (see [20, 21, 16]), we show that PROGRAMSAMPLE can sample algorithms. Program ::= (if Bool List (append RecursiveList RecursiveList RecursiveList)) Bool ::= (<= Int) | (>= Int) Int ::= 0 | (1+ Int) | (1- Int) | (length List) | (head List) List ::= nil | (filter Bool List) | X | (tail List) | (list Int) RecursiveList ::= List | (recurse List) Figure 8: The sketch (program space) for learning list manipulation routines; X is program input Figure 9: Learning to manipulate lists. Trained on lists of length ≤3; tested on lists of length ≤14. We take as our goal to learn recursive routines for sorting, reversing, and counting list elements from input/output examples, particularly in the ambiguous, unconstrained regime of few examples. We used a sketch with a set of basis primitives capable of representing a range of list manipulation routines equivalent to Figure 8. A description-length prior that penalizes longer programs allowed learning of recursive list manipulation routines (from production Program) and a non-recursive count routine (from production Int); see Figure 9, which shows average accuracy on held out test data when trained on variable numbers of short randomly generated lists. With the large training set (5–11 examples) PROGRAMSAMPLE recovers a correct implementation, and with less data it recovers a distribution over programs that functions as a probabilistic algorithm despite being composed of only deterministic programs. For some of these tasks the number of consistent programs is small enough that we can enumerate all of them, allowing us to compare our sampler with ground-truth probabilities. Figure 7 shows this comparison for a counting problem with 80 consistent programs, showing empirically that the tilt correction and random constraints do not significantly perturb the distribution. Table 1 shows the average solver time per sample. Generating recursive routines like sorting and reversing is much more costly than generating the nonrecursive counting routine. The constraint-based approach propositionalizes higher-order constructs like recursion, and so reasoning about them is much more costly. Yet counting problems are highly tilted due to count’s short implementation, which makes them intractable without our tilt correction. 7 4 Discussion 4.1 Related work There is a vast literature on program learning in the AI and machine learning communities. Many employ a (possibly stochastic) heuristic search over structures using genetic programming [22] or MCMC [23]. These approaches often find good programs and can discover more high-level structure than our approach. However, they are prone to getting trapped in local minima and, when used as a sampler, lack theoretical guarantees. Other work has addressed learning priors over programs in a multitask setting [4, 5]. We see our work as particularly complementary to these methods: while they focus on learning the structure of the hypothesis space, we focus on efficiently sampling an already given hypothesis space (the sketch). Several recent proposals for recurrent deep networks can learn algorithms [2, 1]. We see our system working in a different regime, where we want to quickly learn an algorithm from a small number of examples or an ambiguous specification. The program synthesis community has several recently proposed learners that work in an optimization framework [20, 21, 16]. By computing a posterior over programs, we can more effectively represent uncertainty, particularly in the small data limit, but at the cost of more computation. PROGRAMSAMPLE borrows heavily from a line of work started in [9, 13] on sampling of combinatorial spaces using random XOR constraints. An exciting new approach is to use sparse XOR constraints [14, 15] , which might sample more efficiently from our embedding of the program space. 4.2 Limitations of the approach Constraint-based synthesis methods tend to excel in domains where the program structure is restricted by a sketch [6] and where much of the program’s description length can be easily computed from the program text. For example, PROGRAMSAMPLE can synthesize text editing programs that are almost 60 bits long in a couple seconds, but spends 10 minutes synthesizing a recursive sorting routine that is shorter but where the program structure is less restricted. Constraint-based methods also require the entire problem to be represented symbolically, so they have trouble when the function to be synthesized involves difficult to analyze building blocks such as numerical routines. For such problems, stochastic search methods [23, 22] can be more effective because they only need to run the functions under consideration. Finally, past work shows empirically that these methods scale poorly with data set size, although this can be mitigated by considering data incrementally [21, 20]. The requirement of producing representative samples imposes additional overhead on our approach, so scalability can more limited than for standard symbolic techniques on some problems. For example, our method requires 1 MAP inference query, and 2 queries to an approximate model counter. These serve to “calibrate” the sampler, and its cost can be amortized because they only has to be invoked once in order to generate an arbitrary number of iid samples. Approximate model counters like MBound [13] have complexity comparable with that of generating a sample, but the complexity can depend on the number of solutions. Thus, for good performance, PROGRAMSAMPLE requires that there not be too many programs consistent with the data—the largest spaces considered in our experiments had ≤107 programs. This limitation, together with the general performance characteristics of symbolic techniques, means that the approach will work best for “needle in a haystack” problems, where the space of possible programs is large but restricted in its structure, and where only a small fraction of the programs satisfy the constraints. 4.3 Future work This work could naturally extend to other domains that involve inducing latent symbolic structure from small amounts of data, such as semantic parsing to logical forms [24], synthesizing motor programs [3], or learning relational theories [25]. These applications have some component of transfer learning, and building efficient program learners that can transfer inductive biases across tasks is a prime target for future research. Acknowledgments We are grateful for feedback from Adam Smith, Kuldeep Meel, and our anonymous reviewers. Work supported by NSF-1161775 and AFOSR award FA9550-16-1-0012. 8 References [1] Alex Graves, Greg Wayne, and Ivo Danihelka. Neural turing machines. arXiv:1410.5401, 2014. [2] Scott Reed and Nando de Freitas. Neural programmer-interpreters. CoRR, abs/1511.06279, 2015. [3] Brenden M Lake, Ruslan Salakhutdinov, and Joshua B Tenenbaum. Human-level concept learning through probabilistic program induction. Science, 350(6266):1332–1338, 2015. [4] Percy Liang, Michael I. Jordan, and Dan Klein. Learning programs: A hierarchical bayesian approach. In Johannes Fürnkranz and Thorsten Joachims, editors, ICML, pages 639–646. Omnipress, 2010. [5] Aditya Menon, Omer Tamuz, Sumit Gulwani, Butler Lampson, and Adam Kalai. A machine learning framework for programming by example. In ICML, pages 187–195, 2013. [6] Armando Solar Lezama. Program Synthesis By Sketching. PhD thesis, EECS Department, University of California, Berkeley, Dec 2008. [7] Stefano Ermon, Carla P Gomes, Ashish Sabharwal, and Bart Selman. Embed and project: Discrete sampling with universal hashing. In Advances in Neural Information Processing Systems, pages 2085–2093, 2013. [8] Susmit Jha, Sumit Gulwani, Sanjit A Seshia, and Ashish Tiwari. Oracle-guided component-based program synthesis. In ICSE, volume 1, pages 215–224. IEEE, 2010. [9] Carla P Gomes, Ashish Sabharwal, and Bart Selman. Near-uniform sampling of combinatorial spaces using xor constraints. In Advances In Neural Information Processing Systems, pages 481–488, 2006. [10] Supratik Chakraborty, Daniel Fremont, Kuldeep Meel, Sanjit Seshia, and Moshe Vardi. Distribution-aware sampling and weighted model counting for sat. In AAAI Conference on Artificial Intelligence, 2014. [11] Supratik Chakraborty, Kuldeep S Meel, and Moshe Y Vardi. A scalable and nearly uniform generator of sat witnesses. In International Conference on Computer Aided Verification, pages 608–623. Springer, 2013. [12] Leslie G Valiant and Vijay V Vazirani. Np is as easy as detecting unique solutions. In Proceedings of the seventeenth annual ACM symposium on Theory of computing, pages 458–463. ACM, 1985. [13] Carla P Gomes, Ashish Sabharwal, and Bart Selman. Model counting: A new strategy for obtaining good bounds. In AAAI Conference on Artificial Intelligence, 2006. [14] Stefano Ermon, Carla Gomes, Ashish Sabharwal, and Bart Selman. Low-density parity constraints for hashing-based discrete integration. In ICML, pages 271–279, 2014. [15] Dimitris Achlioptas and Pei Jiang. Stochastic integration via errorcorrecting codes. UAI, 2015. [16] Rishabh Singh, Sumit Gulwani, and Armando Solar-Lezama. Automated feedback generation for introductory programming assignments. In ACM SIGPLAN Notices, volume 48, pages 15–26. ACM, 2013. [17] Cryptominisat. http://www.msoos.org/documentation/cryptominisat/. [18] Sumit Gulwani. Automating string processing in spreadsheets using input-output examples. In ACM SIGPLAN Notices, volume 46, pages 317–330. ACM, 2011. [19] Dianhuan Lin, Eyal Dechter, Kevin Ellis, Joshua B. Tenenbaum, and Stephen Muggleton. Bias reformulation for one-shot function induction. In ECAI 2014, pages 525–530, 2014. [20] Veselin Raychev, Pavol Bielik, Martin Vechev, and Andreas Krause. Learning programs from noisy data. In POPL, pages 761–774. ACM, 2016. [21] Kevin Ellis, Armando Solar-Lezama, and Josh Tenenbaum. Unsupervised learning by program synthesis. In Advances in Neural Information Processing Systems, pages 973–981, 2015. [22] John R. Koza. Genetic programming - on the programming of computers by means of natural selection. Complex adaptive systems. MIT Press, 1993. [23] Eric Schkufza, Rahul Sharma, and Alex Aiken. Stochastic superoptimization. In ACM SIGARCH Computer Architecture News, volume 41, pages 305–316. ACM, 2013. [24] P. Liang, M. I. Jordan, and D. Klein. Learning dependency-based compositional semantics. In Association for Computational Linguistics (ACL), pages 590–599, 2011. [25] Yarden Katz, Noah D. Goodman, Kristian Kersting, Charles Kemp, and Joshua B. Tenenbaum. Modeling semantic cognition as logical dimensionality reduction. In CogSci, pages 71–76, 2008. 9 | 2016 | 403 |
6,332 | Unifying Count-Based Exploration and Intrinsic Motivation Marc G. Bellemare bellemare@google.com Sriram Srinivasan srsrinivasan@google.com Georg Ostrovski ostrovski@google.com Tom Schaul schaul@google.com David Saxton saxton@google.com Google DeepMind London, United Kingdom R´emi Munos munos@google.com Abstract We consider an agent’s uncertainty about its environment and the problem of generalizing this uncertainty across states. Specifically, we focus on the problem of exploration in non-tabular reinforcement learning. Drawing inspiration from the intrinsic motivation literature, we use density models to measure uncertainty, and propose a novel algorithm for deriving a pseudo-count from an arbitrary density model. This technique enables us to generalize count-based exploration algorithms to the non-tabular case. We apply our ideas to Atari 2600 games, providing sensible pseudo-counts from raw pixels. We transform these pseudo-counts into exploration bonuses and obtain significantly improved exploration in a number of hard games, including the infamously difficult MONTEZUMA’S REVENGE. 1 Introduction Exploration algorithms for Markov Decision Processes (MDPs) are typically concerned with reducing the agent’s uncertainty over the environment’s reward and transition functions. In a tabular setting, this uncertainty can be quantified using confidence intervals derived from Chernoff bounds, or inferred from a posterior over the environment parameters. In fact, both confidence intervals and posterior shrink as the inverse square root of the state-action visit count N(x, a), making this quantity fundamental to most theoretical results on exploration. Count-based exploration methods directly use visit counts to guide an agent’s behaviour towards reducing uncertainty. For example, Model-based Interval Estimation with Exploration Bonuses (MBIE-EB; Strehl and Littman, 2008) solves the augmented Bellman equation V (x) = max a∈A h ˆR(x, a) + γ E ˆ P [V (x′)] + βN(x, a)−1/2i , involving the empirical reward ˆR, the empirical transition function ˆP, and an exploration bonus proportional to N(x, a)−1/2. This bonus accounts for uncertainties in both transition and reward functions and enables a finite-time bound on the agent’s suboptimality. In spite of their pleasant theoretical guarantees, count-based methods have not played a role in the contemporary successes of reinforcement learning (e.g. Mnih et al., 2015). Instead, most practical methods still rely on simple rules such as ϵ-greedy. The issue is that visit counts are not directly useful in large domains, where states are rarely visited more than once. Answering a different scientific question, intrinsic motivation aims to provide qualitative guidance for exploration (Schmidhuber, 1991; Oudeyer et al., 2007; Barto, 2013). This guidance can be summarized as “explore what surprises you”. A typical approach guides the agent based on change 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. in prediction error, or learning progress. If en(A) is the error made by the agent at time n over some event A, and en+1(A) the same error after observing a new piece of information, then learning progress is en(A) −en+1(A). Intrinsic motivation methods are attractive as they remain applicable in the absence of the Markov property or the lack of a tabular representation, both of which are required by count-based algorithms. Yet the theoretical foundations of intrinsic motivation remain largely absent from the literature, which may explain its slow rate of adoption as a standard approach to exploration. In this paper we provide formal evidence that intrinsic motivation and count-based exploration are but two sides of the same coin. Specifically, we consider a frequently used measure of learning progress, information gain (Cover and Thomas, 1991). Defined as the Kullback-Leibler divergence of a prior distribution from its posterior, information gain can be related to the confidence intervals used in count-based exploration. Our contribution is to propose a new quantity, the pseudo-count, which connects information-gain-as-learning-progress and count-based exploration. We derive our pseudo-count from a density model over the state space. This is in departure from more traditional approaches to intrinsic motivation that consider learning progress with respect to a transition model. We expose the relationship between pseudo-counts, a variant of Schmidhuber’s compression progress we call prediction gain, and information gain. Combined to Kolter and Ng’s negative result on the frequentist suboptimality of Bayesian bonuses, our result highlights the theoretical advantages of pseudo-counts compared to many existing intrinsic motivation methods. The pseudo-counts we introduce here are best thought of as “function approximation for exploration”. We bring them to bear on Atari 2600 games from the Arcade Learning Environment (Bellemare et al., 2013), focusing on games where myopic exploration fails. We extract our pseudo-counts from a simple density model and use them within a variant of MBIE-EB. We apply them to an experience replay setting and to an actor-critic setting, and find improved performance in both cases. Our approach produces dramatic progress on the reputedly most difficult Atari 2600 game, MONTEZUMA’S REVENGE: within a fraction of the training time, our agent explores a significant portion of the first level and obtains significantly higher scores than previously published agents. 2 Notation We consider a countable state space X. We denote a sequence of length n from X by x1:n ∈X n, the set of finite sequences from X by X ∗, write x1:nx to mean the concatenation of x1:n and a state x ∈X, and denote the empty sequence by ϵ. A model over X is a mapping from X ∗to probability distributions over X. That is, for each x1:n ∈X n the model provides a probability distribution ρn(x) := ρ(x ; x1:n). Note that we do not require ρn(x) to be strictly positive for all x and x1:n. When it is, however, we may understand ρn(x) to be the usual conditional probability of Xn+1 = x given X1 . . . Xn = x1:n. We will take particular interest in the empirical distribution µn derived from the sequence x1:n. If Nn(x) := N(x, x1:n) is the number of occurrences of a state x in the sequence x1:n, then µn(x) := µ(x ; x1:n) := Nn(x) n . We call the Nn the empirical count function, or simply empirical count. The above notation extends to state-action spaces, and we write Nn(x, a) to explicitly refer to the number of occurrences of a state-action pair when the argument requires it. When x1:n is generated by an ergodic Markov chain, for example if we follow a fixed policy in a finite-state MDP, then the limit point of µn is the chain’s stationary distribution. In our setting, a density model is any model that assumes states are independently (but not necessarily identically) distributed; a density model is thus a particular kind of generative model. We emphasize that a density model differs from a forward model, which takes into account the temporal relationship between successive states. Note that µn is itself a density model. 2 3 From Densities to Counts In the introduction we argued that the visit count Nn(x) (and consequently, Nn(x, a)) is not directly useful in practical settings, since states are rarely revisited. Specifically, Nn(x) is almost always zero and cannot help answer the question “How novel is this state?” Nor is the problem solved by a Bayesian approach: even variable-alphabet models (e.g. Hutter, 2013) must assign a small, diminishing probability to yet-unseen states. To estimate the uncertainty of an agent’s knowledge, we must instead look for a quantity which generalizes across states. Guided by ideas from the intrinsic motivation literature, we now derive such a quantity. We call it a pseudo-count as it extends the familiar notion from Bayesian estimation. 3.1 Pseudo-Counts and the Recoding Probability We are given a density model ρ over X. This density model may be approximate, biased, or even inconsistent. We begin by introducing the recoding probability of a state x: ρ′ n(x) := ρ(x ; x1:nx). This is the probability assigned to x by our density model after observing a new occurrence of x. The term “recoding” is inspired from the statistical compression literature, where coding costs are inversely related to probabilities (Cover and Thomas, 1991). When ρ admits a conditional probability distribution, ρ′ n(x) = Prρ(Xn+2 = x | X1 . . . Xn = x1:n, Xn+1 = x). We now postulate two unknowns: a pseudo-count function ˆNn(x), and a pseudo-count total ˆn. We relate these two unknowns through two constraints: ρn(x) = ˆNn(x) ˆn ρ′ n(x) = ˆNn(x) + 1 ˆn + 1 . (1) In words: we require that, after observing one instance of x, the density model’s increase in prediction of that same x should correspond to a unit increase in pseudo-count. The pseudo-count itself is derived from solving the linear system (1): ˆNn(x) = ρn(x)(1 −ρ′ n(x)) ρ′n(x) −ρn(x) = ˆnρn(x). (2) Note that the equations (1) yield ˆNn(x) = 0 (with ˆn = ∞) when ρn(x) = ρ′ n(x) = 0, and are inconsistent when ρn(x) < ρ′ n(x) = 1. These cases may arise from poorly behaved density models, but are easily accounted for. From here onwards we will assume a consistent system of equations. Definition 1 (Learning-positive density model). A density model ρ is learning-positive if for all x1:n ∈X n and all x ∈X, ρ′ n(x) ≥ρn(x). By inspecting (2), we see that 1. ˆNn(x) ≥0 if and only if ρ is learning-positive; 2. ˆNn(x) = 0 if and only if ρn(x) = 0; and 3. ˆNn(x) = ∞if and only if ρn(x) = ρ′ n(x). In many cases of interest, the pseudo-count ˆNn(x) matches our intuition. If ρn = µn then ˆNn = Nn. Similarly, if ρn is a Dirichlet estimator then ˆNn recovers the usual notion of pseudo-count. More importantly, if the model generalizes across states then so do pseudo-counts. 3.2 Estimating the Frequency of a Salient Event in FREEWAY As an illustrative example, we employ our method to estimate the number of occurrences of an infrequent event in the Atari 2600 video game FREEWAY (Figure 1, screenshot). We use the Arcade Learning Environment (Bellemare et al., 2013). We will demonstrate the following: 1. Pseudo-counts are roughly zero for novel events, 3 Frames (1000s) Pseudo-counts salient event pseudo-counts start position pseudo-counts periods without salient events Figure 1: Pseudo-counts obtained from a CTS density model applied to FREEWAY, along with a frame representative of the salient event (crossing the road). Shaded areas depict periods during which the agent observes the salient event, dotted lines interpolate across periods during which the salient event is not observed. The reported values are 10,000-frame averages. 2. they exhibit credible magnitudes, 3. they respect the ordering of state frequency, 4. they grow linearly (on average) with real counts, 5. they are robust in the presence of nonstationary data. These properties suggest that pseudo-counts provide an appropriate generalized notion of visit counts in non-tabular settings. In FREEWAY, the agent must navigate a chicken across a busy road. As our example, we consider estimating the number of times the chicken has reached the very top of the screen. As is the case for many Atari 2600 games, this naturally salient event is associated with an increase in score, which ALE translates into a positive reward. We may reasonably imagine that knowing how certain we are about this part of the environment is useful. After crossing, the chicken is teleported back to the bottom of the screen. To highlight the robustness of our pseudo-count, we consider a nonstationary policy which waits for 250,000 frames, then applies the UP action for 250,000 frames, then waits, then goes UP again. The salient event only occurs during UP periods. It also occurs with the cars in different positions, thus requiring generalization. As a point of reference, we record the pseudo-counts for both the salient event and visits to the chicken’s start position. We use a simplified, pixel-level version of the CTS model for Atari 2600 frames proposed by Bellemare et al. (2014), ignoring temporal dependencies. While the CTS model is rather impoverished in comparison to state-of-the-art density models for images (e.g. Van den Oord et al., 2016), its countbased nature results in extremely fast learning, making it an appealing candidate for exploration. Further details on the model may be found in the appendix. Examining the pseudo-counts depicted in Figure 1 confirms that they exhibit the desirable properties listed above. In particular, the pseudo-count is almost zero on the first occurrence of the salient event; it increases slightly during the 3rd period, since the salient and reference events share some common structure; throughout, it remains smaller than the reference pseudo-count. The linearity on average and robustness to nonstationarity are immediate from the graph. Note, however, that the pseudocounts are a fraction of the real visit counts (inasmuch as we can define “real”): by the end of the trial, the start position has been visited about 140,000 times, and the topmost part of the screen, 1285 times. Furthermore, the ratio of recorded pseudo-counts differs from the ratio of real counts. Both effects are quantifiable, as we shall show in Section 5. 4 The Connection to Intrinsic Motivation Having argued that pseudo-counts appropriately generalize visit counts, we will now show that they are closely related to information gain, which is commonly used to quantify novelty or curiosity and consequently as an intrinsic reward. Information gain is defined in relation to a mixture model ξ over 4 a class of density models M. This model predicts according to a weighted combination from M: ξn(x) := ξ(x ; x1:n) := Z ρ∈M wn(ρ)ρ(x ; x1:n)dρ, with wn(ρ) the posterior weight of ρ. This posterior is defined recursively, starting from a prior distribution w0 over M: wn+1(ρ) := wn(ρ, xn+1) wn(ρ, x) := wn(ρ)ρ(x ; x1:n) ξn(x) . (3) Information gain is then the Kullback-Leibler divergence from prior to posterior that results from observing x: IGn(x) := IG(x ; x1:n) := KL wn(·, x) ∥wn . Computing the information gain of a complex density model is often impractical, if not downright intractable. However, a quantity which we call the prediction gain provides us with a good approximation of the information gain. We define the prediction gain of a density model ρ (and in particular, ξ) as the difference between the recoding log-probability and log-probability of x: PGn(x) := log ρ′ n(x) −log ρn(x). Prediction gain is nonnegative if and only if ρ is learning-positive. It is related to the pseudo-count: ˆNn(x) ≈ ePGn(x) −1 −1 , with equality when ρ′ n(x) →0. As the following theorem shows, prediction gain allows us to relate pseudo-count and information gain. Theorem 1. Consider a sequence x1:n ∈X n. Let ξ be a mixture model over a class of learningpositive models M. Let ˆNn be the pseudo-count derived from ξ (Equation 2). For this model, IGn(x) ≤PGn(x) ≤ˆNn(x)−1 and PGn(x) ≤ˆNn(x)−1/2. Theorem 1 suggests that using an exploration bonus proportional to ˆNn(x)−1/2, similar to the MBIE-EB bonus, leads to a behaviour at least as exploratory as one derived from an information gain bonus. Since pseudo-counts correspond to empirical counts in the tabular setting, this approach also preserves known theoretical guarantees. In fact, we are confident pseudo-counts may be used to prove similar results in non-tabular settings. On the other hand, it may be difficult to provide theoretical guarantees about existing bonus-based intrinsic motivation approaches. Kolter and Ng (2009) showed that no algorithm based on a bonus upper bounded by βNn(x)−1 for any β > 0 can guarantee PAC-MDP optimality. Again considering the tabular setting and combining their result to Theorem 1, we conclude that bonuses proportional to immediate information (or prediction) gain are insufficient for theoretically near-optimal exploration: to paraphrase Kolter and Ng, these methods produce explore too little in comparison to pseudo-count bonuses. By inspecting (2) we come to a similar negative conclusion for bonuses proportional to the L1 or L2 distance between ξ′ n and ξn. Unlike many intrinsic motivation algorithms, pseudo-counts also do not rely on learning a forward (transition and/or reward) model. This point is especially important because a number of powerful density models for images exist (Van den Oord et al., 2016), and because optimality guarantees cannot in general exist for intrinsic motivation algorithms based on forward models. 5 Asymptotic Analysis In this section we analyze the limiting behaviour of the ratio ˆNn/Nn. We use this analysis to assert the consistency of pseudo-counts derived from tabular density models, i.e. models which maintain per-state visit counts. In the appendix we use the same result to bound the approximation error of pseudo-counts derived from directed graphical models, of which our CTS model is a special case. Consider a fixed, infinite sequence x1, x2, . . . from X. We define the limit of a sequence of functions f(x ; x1:n) : n ∈N with respect to the length n of the subsequence x1:n. We additionally assume that the empirical distribution µn converges pointwise to a distribution µ, and write µ′ n(x) for the recoding probability of x under µn. We begin with two assumptions on our density model. 5 Assumption 1. The limits (a) r(x) := lim n→∞ ρn(x) µn(x) (b) ˙r(x) := lim n→∞ ρ′ n(x) −ρn(x) µ′n(x) −µn(x) exist for all x; furthermore, ˙r(x) > 0. Assumption (a) states that ρ should eventually assign a probability to x proportional to the limiting empirical distribution µ(x). In particular there must be a state x for which r(x) < 1, unless ρn →µ. Assumption (b), on the other hand, imposes a restriction on the learning rate of ρ relative to µ’s. As both r(x) and µ(x) exist, Assumption 1 also implies that ρn(x) and ρ′ n(x) have a common limit. Theorem 2. Under Assumption 1, the limit of the ratio of pseudo-counts ˆNn(x) to empirical counts Nn(x) exists for all x. This limit is lim n→∞ ˆNn(x) Nn(x) = r(x) ˙r(x) 1 −µ(x)r(x) 1 −µ(x) . The model’s relative rate of change, whose convergence to ˙r(x) we require, plays an essential role in the ratio of pseudo- to empirical counts. To see this, consider a sequence (xn : n ∈N) generated i.i.d. from a distribution µ over a finite state space, and a density model defined from a sequence of nonincreasing step-sizes (αn : n ∈N): ρn(x) = (1 −αn)ρn−1(x) + αnI {xn = x} , with initial condition ρ0(x) = |X|−1. For αn = n−1, this density model is the empirical distribution. For αn = n−2/3, we may appeal to well-known results from stochastic approximation (e.g. Bertsekas and Tsitsiklis, 1996) and find that almost surely lim n→∞ρn(x) = µ(x) but lim n→∞ ρ′ n(x) −ρn(x) µ′n(x) −µn(x) = ∞. Since µ′ n(x) −µn(x) = n−1(1 −µ′ n(x)), we may think of Assumption 1(b) as also requiring ρ to converge at a rate of Θ(1/n) for a comparison with the empirical count Nn to be meaningful. Note, however, that a density model that does not satisfy Assumption 1(b) may still yield useful (but incommensurable) pseudo-counts. Corollary 1. Let φ(x) > 0 with P x∈X φ(x) < ∞and consider the count-based estimator ρn(x) = Nn(x) + φ(x) n + P x′∈X φ(x′). If ˆNn is the pseudo-count corresponding to ρn then ˆNn(x)/Nn(x) →1 for all x with µ(x) > 0. 6 Empirical Evaluation In this section we demonstrate the use of pseudo-counts to guide exploration. We return to the Arcade Learning Environment, now using the CTS model to generate an exploration bonus. 6.1 Exploration in Hard Atari 2600 Games From 60 games available through the Arcade Learning Environment we selected five “hard” games, in the sense that an ϵ-greedy policy is inefficient at exploring them. We used a bonus of the form R+ n (x, a) := β( ˆNn(x) + 0.01)−1/2, (4) where β = 0.05 was selected from a coarse parameter sweep. We also compared our method to the optimistic initialization trick proposed by Machado et al. (2015). We trained our agents’ Q-functions with Double DQN (van Hasselt et al., 2016), with one important modification: we mixed the Double Q-Learning target with the Monte Carlo return. This modification led to improved results both with and without exploration bonuses (details in the appendix). Figure 2 depicts the result of our experiment, averaged across 5 trials. Although optimistic initialization helps in FREEWAY, it otherwise yields performance similar to DQN. By contrast, the 6 Score Training frames (millions) FREEWAY MONTEZUMA’S REVENGE PRIVATE EYE H.E.R.O. VENTURE Figure 2: Average training score with and without exploration bonus or optimistic initialization in 5 Atari 2600 games. Shaded areas denote inter-quartile range, dotted lines show min/max scores. No bonus With bonus Figure 3: “Known world” of a DQN agent trained for 50 million frames with (right) and without (left) count-based exploration bonuses, in MONTEZUMA’S REVENGE. count-based exploration bonus enables us to make quick progress on a number of games, most dramatically in MONTEZUMA’S REVENGE and VENTURE. MONTEZUMA’S REVENGE is perhaps the hardest Atari 2600 game available through the ALE. The game is infamous for its hostile, unforgiving environment: the agent must navigate a number of different rooms, each filled with traps. Due to its sparse reward function, most published agents achieve an average score close to zero and completely fail to explore most of the 24 rooms that constitute the first level (Figure 3, top). By contrast, within 50 million frames our agent learns a policy which consistently navigates through 15 rooms (Figure 3, bottom). Our agent also achieves a score higher than anything previously reported, with one run consistently achieving 6600 points by 100 million frames (half the training samples used by Mnih et al. (2015)). We believe the success of our method in this game is a strong indicator of the usefulness of pseudo-counts for exploration.1 6.2 Exploration for Actor-Critic Methods We next used our exploration bonuses in conjunction with the A3C (Asynchronous Advantage Actor-Critic) algorithm of Mnih et al. (2016). One appeal of actor-critic methods is their explicit separation of policy and Q-function parameters, which leads to a richer behaviour space. This very separation, however, often leads to deficient exploration: to produce any sensible results, the A3C policy must be regularized with an entropy cost. We trained A3C on 60 Atari 2600 games, with and without the exploration bonus (4). We refer to our augmented algorithm as A3C+. Full details and additional results may be found in the appendix. We found that A3C fails to learn in 15 games, in the sense that the agent does not achieve a score 50% better than random. In comparison, there are only 10 games for which A3C+ fails to improve on the random agent; of these, 8 are games where DQN fails in the same sense. We normalized the two algorithms’ scores so that 0 and 1 are respectively the minimum and maximum of the random agent’s and A3C’s end-of-training score on a particular game. Figure 4 depicts the in-training median score for A3C and A3C+, along with 1st and 3rd quartile intervals. Not only does A3C+ achieve slightly superior median performance, but it also significantly outperforms A3C on at least a quarter of the games. This is particularly important given the large proportion of Atari 2600 games for which an ϵ-greedy policy is sufficient for exploration. 7 Related Work Information-theoretic quantities have been repeatedly used to describe intrinsically motivated behaviour. Closely related to prediction gain is Schmidhuber (1991)’s notion of compression progress, 1A video of our agent playing is available at https://youtu.be/0yI2wJ6F8r0. 7 Training frames (millions) Baseline score A3C+ PERFORMANCE ACROSS GAMES Figure 4: Median and interquartile performance across 60 Atari 2600 games for A3C and A3C+. which equates novelty with an agent’s improvement in its ability to compress its past. More recently, Lopes et al. (2012) showed the relationship between time-averaged prediction gain and visit counts in a tabular setting; their result is a special case of Theorem 2. Orseau et al. (2013) demonstrated that maximizing the sum of future information gains does lead to optimal behaviour, even though maximizing immediate information gain does not (Section 4). Finally, there may be a connection between sequential normalized maximum likelihood estimators and our pseudo-count derivation (see e.g. Ollivier, 2015). Intrinsic motivation has also been studied in reinforcement learning proper, in particular in the context of discovering skills (Singh et al., 2004; Barto, 2013). Recently, Stadie et al. (2015) used a squared prediction error bonus for exploring in Atari 2600 games. Closest to our work is Houthooft et al. (2016)’s variational approach to intrinsic motivation, which is equivalent to a second order Taylor approximation to prediction gain. Mohamed and Rezende (2015) also considered a variational approach to the different problem of maximizing an agent’s ability to influence its environment. Aside for Orseau et al.’s above-cited work, it is only recently that theoretical guarantees for exploration have emerged for non-tabular, stateful settings. We note Pazis and Parr (2016)’s PAC-MDP result for metric spaces and Leike et al. (2016)’s asymptotic analysis of Thompson sampling in general environments. 8 Future Directions The last few years have seen tremendous advances in learning representations for reinforcement learning. Surprisingly, these advances have yet to carry over to the problem of exploration. In this paper, we reconciled counts, the fundamental unit of uncertainty, with prediction-based heuristics and intrinsic motivation. Combining our work with more ideas from deep learning and better density models seems a plausible avenue for quick progress in practical, efficient exploration. We now conclude by outlining a few research directions we believe are promising. Induced metric. We did not address the question of where the generalization comes from. Clearly, the choice of density model induces a particular metric over the state space. A better understanding of this metric should allow us to tailor the density model to the problem of exploration. Compatible value function. There may be a mismatch in the learning rates of the density model and the value function: DQN learns much more slowly than our CTS model. As such, it should be beneficial to design value functions compatible with density models (or vice-versa). The continuous case. Although we focused here on countable state spaces, we can as easily define a pseudo-count in terms of probability density functions. At present it is unclear whether this provides us with the right notion of counts for continuous spaces. Acknowledgments The authors would like to thank Laurent Orseau, Alex Graves, Joel Veness, Charles Blundell, Shakir Mohamed, Ivo Danihelka, Ian Osband, Matt Hoffman, Greg Wayne, Will Dabney, and A¨aron van den Oord for their excellent feedback early and late in the writing, and Pierre-Yves Oudeyer and Yann Ollivier for pointing out additional connections to the literature. 8 References Barto, A. G. (2013). Intrinsic motivation and reinforcement learning. In Intrinsically Motivated Learning in Natural and Artificial Systems, pages 17–47. Springer. Bellemare, M., Veness, J., and Talvitie, E. (2014). Skip context tree switching. In Proceedings of the 31st International Conference on Machine Learning, pages 1458–1466. Bellemare, M. G., Naddaf, Y., Veness, J., and Bowling, M. (2013). The Arcade Learning Environment: An evaluation platform for general agents. Journal of Artificial Intelligence Research, 47:253–279. Bertsekas, D. P. and Tsitsiklis, J. N. (1996). Neuro-Dynamic Programming. Athena Scientific. Cover, T. M. and Thomas, J. A. (1991). Elements of information theory. John Wiley & Sons. Houthooft, R., Chen, X., Duan, Y., Schulman, J., De Turck, F., and Abbeel, P. (2016). Variational information maximizing exploration. Hutter, M. (2013). Sparse adaptive dirichlet-multinomial-like processes. In Proceedings of the Conference on Online Learning Theory. Kolter, Z. J. and Ng, A. Y. (2009). Near-bayesian exploration in polynomial time. In Proceedings of the 26th International Conference on Machine Learning. Leike, J., Lattimore, T., Orseau, L., and Hutter, M. (2016). Thompson sampling is asymptotically optimal in general environments. In Proceedings of the Conference on Uncertainty in Artificial Intelligence. Lopes, M., Lang, T., Toussaint, M., and Oudeyer, P.-Y. (2012). Exploration in model-based reinforcement learning by empirically estimating learning progress. In Advances in Neural Information Processing Systems 25. Machado, M. C., Srinivasan, S., and Bowling, M. (2015). Domain-independent optimistic initialization for reinforcement learning. AAAI Workshop on Learning for General Competency in Video Games. Mnih, V., Badia, A. P., Mirza, M., Graves, A., Lillicrap, T. P., Harley, T., Silver, D., and Kavukcuoglu, K. (2016). Asynchronous methods for deep reinforcement learning. In Proceedings of the International Conference on Machine Learning. Mnih, V., Kavukcuoglu, K., Silver, D., Rusu, A. A., Veness, J., Bellemare, M. G., Graves, A., Riedmiller, M., Fidjeland, A. K., Ostrovski, G., et al. (2015). Human-level control through deep reinforcement learning. Nature, 518(7540):529–533. Mohamed, S. and Rezende, D. J. (2015). Variational information maximisation for intrinsically motivated reinforcement learning. In Advances in Neural Information Processing Systems 28. Ollivier, Y. (2015). Laplace’s rule of succession in information geometry. arXiv preprint arXiv:1503.04304. Orseau, L., Lattimore, T., and Hutter, M. (2013). Universal knowledge-seeking agents for stochastic environments. In Proceedings of the Conference on Algorithmic Learning Theory. Oudeyer, P., Kaplan, F., and Hafner, V. (2007). Intrinsic motivation systems for autonomous mental development. IEEE Transactions on Evolutionary Computation, 11(2):265–286. Pazis, J. and Parr, R. (2016). Efficient PAC-optimal exploration in concurrent, continuous state MDPs with delayed updates. In Proceedings of the 30th AAAI Conference on Artificial Intelligence. Schmidhuber, J. (1991). A possibility for implementing curiosity and boredom in model-building neural controllers. In From animals to animats: proceedings of the first international conference on simulation of adaptive behavior. Singh, S., Barto, A. G., and Chentanez, N. (2004). Intrinsically motivated reinforcement learning. In Advances in Neural Information Processing Systems 16. Stadie, B. C., Levine, S., and Abbeel, P. (2015). Incentivizing exploration in reinforcement learning with deep predictive models. arXiv preprint arXiv:1507.00814. Strehl, A. L. and Littman, M. L. (2008). An analysis of model-based interval estimation for Markov decision processes. Journal of Computer and System Sciences, 74(8):1309 – 1331. Van den Oord, A., Kalchbrenner, N., and Kavukcuoglu, K. (2016). Pixel recurrent neural networks. In Proceedigns of the 33rd International Conference on Machine Learning. van Hasselt, H., Guez, A., and Silver, D. (2016). Deep reinforcement learning with double Q-learning. In Proceedings of the 30th AAAI Conference on Artificial Intelligence. 9 | 2016 | 404 |
6,333 | Learning HMMs with Nonparametric Emissions via Spectral Decompositions of Continuous Matrices Kirthevasan Kandasamy⇤ Carnegie Mellon University Pittsburgh, PA 15213 kandasamy@cs.cmu.edu Maruan Al-Shedivat⇤ Carnegie Mellon University Pittsburgh, PA 15213 alshedivat@cs.cmu.edu Eric P. Xing Carnegie Mellon University Pittsburgh, PA 15213 epxing@cs.cmu.edu Abstract Recently, there has been a surge of interest in using spectral methods for estimating latent variable models. However, it is usually assumed that the distribution of the observations conditioned on the latent variables is either discrete or belongs to a parametric family. In this paper, we study the estimation of an m-state hidden Markov model (HMM) with only smoothness assumptions, such as Hölderian conditions, on the emission densities. By leveraging some recent advances in continuous linear algebra and numerical analysis, we develop a computationally efficient spectral algorithm for learning nonparametric HMMs. Our technique is based on computing an SVD on nonparametric estimates of density functions by viewing them as continuous matrices. We derive sample complexity bounds via concentration results for nonparametric density estimation and novel perturbation theory results for continuous matrices. We implement our method using Chebyshev polynomial approximations. Our method is competitive with other baselines on synthetic and real problems and is also very computationally efficient. 1 Introduction Hidden Markov models (HMMs) [1] are one of the most popular statistical models for analyzing time series data in various application domains such as speech recognition, medicine, and meteorology. In an HMM, a discrete hidden state undergoes Markovian transitions from one of m possible states to another at each time step. If the hidden state at time t is ht, we observe a random variable xt 2 X drawn from an emission distribution, Oj = P(xt|ht = j). In its most basic form X is a discrete set and Oj are discrete distributions. When dealing with continuous observations, it is conventional to assume that the emissions Oj belong to a parametric class of distributions, such as Gaussian. Recently, spectral methods for estimating parametric latent variable models have gained immense popularity as a viable alternative to the Expectation Maximisation (EM) procedure [2–4]. At a high level, these methods estimate higher order moments from the data and recover the parameters via a series of matrix operations such as singular value decompositions, matrix multiplications and pseudo-inverses of the moments. In the case of discrete HMMs [2], these moments correspond exactly to the joint probabilities of the observations in the sequence. Assuming parametric forms for the emission densities is often too restrictive since real world distributions can be arbitrary. Parametric models may introduce incongruous biases that cannot be reduced even with large datasets. To address this problem, we study nonparametric HMMs only assuming some mild smoothness conditions on the emission densities. We design a spectral algorithm for this setting. Our methods leverage some recent advances in continuous linear algebra [5, 6] which views two-dimensional functions as continuous analogues of matrices. Chebyshev polynomial approximations enable efficient computation of algebraic operations on these continuous objects [7, 8]. Using these ideas, we extend existing spectral methods for discrete HMMs to the continuous nonparametric setting. Our main contributions are: ⇤Joint lead authors. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. 1. We derive a spectral learning algorithm for HMMs with nonparametric emission densities. While the algorithm is similar to previous spectral methods for estimating models with a finite number of parameters, many of the ideas used to generalise it to the nonparametric setting are novel, and, to the best of our knowledge, have not been used before in the machine learning literature. 2. We establish sample complexity bounds for our method. For this, we derive concentration results for nonparametric density estimation and novel perturbation theory results for the aforementioned continuous matrices. The perturbation results are new and might be of independent interest. 3. We implement our algorithm by approximating the density estimates via Chebyshev polynomials which enables efficient computation of many of the continuous matrix operations. Our method outperforms natural competitors in this setting on synthetic and real data and is computationally more efficient than most of them. Our Matlab code is available at github.com/alshedivat/nphmm. While we focus on HMMs in this exposition, we believe that the ideas presented in this paper can be easily generalised to estimating other latent variable models and predictive state representations [9] with nonparametric observations using approaches developed by Anandkumar et al. [3]. Related Work: Parametric HMMs are usually estimated using maximum likelihood principle via EM techniques [10] such as the Baum-Welch procedure [11]. However, EM is a local search technique, and optimization of the likelihood may be difficult. Hence, recent work on spectral methods has gained appeal. Our work builds on Hsu et al. [2] who showed that discrete HMMs can be learned efficiently, under certain conditions. The key idea is that any HMM can be completely characterised in terms of quantities that depend entirely on the observations, called the observable representation, which can be estimated from data. Siddiqi et al. [4] show that the same algorithm works under slightly more general assumptions. Anandkumar et al. [3] proposed a spectral algorithm for estimating more general latent variable models with parametric observations via a moment matching technique. That said, we are aware of little work on estimating latent variable models, including HMMs, when the observations are nonparametric. A commonly used heuristic is the nonparametric EM [12], which lacks theoretical underpinnings. This should not be surprising because EM is degenerate for most nonparametric problems as a maximum likelihood procedure [13]. Only recently, De Castro et al. [14] have provided a minimax-type of result for the nonparametric setting. In their work, Siddiqi et al. [4] proposed a heuristic based on kernel smoothing, to modify the discrete algorithm for continuous observations. Further, their procedure cannot be used to recover the joint or conditional probabilities of a sequence, which would be needed to compute probabilities of events and other inference tasks. Song et al. [15, 16] developed an RKHS-based procedure for estimating the Hilbert space embedding of an HMM. While they provide theoretical guarantees, their bounds are in terms of the RKHS distance of the true and estimated embeddings. This metric depends on the choice of the kernel and it is not clear how it translates to a suitable distance measure on the observation space such as an L1 or L2 distance. While their method can be used for prediction and pairwise testing, it cannot recover the joint and conditional densities. On the contrary, our model provides guarantees in terms of the more interpretable total variation distance and is able to recover the joint and conditional probabilities. 2 A Pint-sized Review of Continuous Linear Algebra We begin with a pint-sized review on continuous linear algebra which treats functions as continuous analogues of matrices. Appendix A contains a quart-sized review. Both sections are based on [5, 6]. While these objects can be viewed as operators on Hilbert spaces which have been studied extensively in the years, the above line of work simplified and specialised the ideas to functions. A matrix F 2 Rm⇥n is an m⇥n array of numbers where F(i, j) denotes the entry in row i, column j. m or n could be (countably) infinite. A column qmatrix (quasi-matrix) Q 2 R[a,b]⇥m is a collection of m functions defined on [a, b] where the row index is continuous and column index is discrete. Writing Q = [q1, . . . , qm] where qj : [a, b] ! R is the jth function, Q(y, j) = qj(y) denotes the value of the jth function at y 2 [a, b]. Q> 2 Rm⇥[a,b] denotes a row qmatrix with Q>(j, y) = Q(y, j). A cmatrix (continuous-matrix) C 2 R[a,b]⇥[c,d] is a two dimensional function where both row and column indices are continuous and C(y, x) is the value of the function at (y, x) 2 [a, b] ⇥[c, d]. C> 2 R[c,d]⇥[a,b] denotes its transpose with C>(x, y) = C(y, x). Qmatrices and cmatrices permit all matrix multiplications with suitably defined inner products. For example, if R 2 R[c,d]⇥m and C 2 R[a,b]⇥[c,d], then CR = T 2 R[a,b]⇥m where T(y, j) = R d c C(y, s)R(s, j)ds. 2 A cmatrix has a singular value decomposition (SVD). If C 2 R[a,b]⇥[c,d], it decomposes as an infinite sum, C(y, x) = P1 j=1 σjuj(y)vj(x), that converges in L2. Here σ1 ≥σ2 ≥· · · ≥0 are the singular values of C. {uj}j≥1 and {vj}j≥1 are functions that form orthonormal bases for L2([a, b]) and L2([c, d]), respectively. We can write the SVD as C = U⌃V > by writing the singular vectors as infinite qmatrices U = [u1, u2 . . . ], V = [v1, v2 . . . ], and ⌃= diag(σ1, σ2 . . . ). If only m < 1 first singular values are nonzero, we say that C is of rank m. The SVD of a qmatrix Q 2 R[a,b]⇥m is, Q = U⌃V > where U 2 R[a,b]⇥m and V 2 Rm⇥m have orthonormal columns and ⌃= diag(σ1, . . . , σm) with σ1 ≥· · · ≥σm ≥0. The rank of a column qmatrix is the number of linearly independent columns (i.e. functions) and is equal to the number of nonzero singular values. Finally, as for the finite matrices, the pseudo inverse of the cmatrix C is C† = V ⌃−1U > with ⌃−1 = diag(1/σ1, 1/σ2, . . . ). The pseudo inverse of a qmatrix is defined similarly. 3 Nonparametric HMMs and the Observable Representation Notation: Throughout this manuscript, we will use P to denote probabilities of events while p will denote probability density functions (pdf). An HMM characterises a probability distribution over a sequence of hidden states {ht}t≥0 and observations {xt}t≥0. At a given time step, the HMM can be in one of m hidden states, i.e. ht 2 [m] = {1, . . . , m}, and the observation is in some bounded continuous domain X. Without loss of generality, we take2 X = [0, 1]. The nonparametric HMM will be completely characterised by the initial state distribution ⇡2 Rm, the state transition matrix T 2 Rm⇥m and the emission densities Oj : X ! R, j 2 [m]. ⇡i = P(h1 = i) is the probability that the HMM would be in state i at the first time step. The element T(i, j) = P(ht+1 = i|ht = j) of T gives the probability that a hidden state transitions from state j to state i. The emission function, Oj : X ! R+, describes the pdf of the observation conditioned on the hidden state j, i.e. Oj(s) = p(xt = s|ht = j). Note that we have Oj(x) > 0, 8x and R Oj(·) = 1 for all j 2 [m]. In this exposition, we denote the emission densities by the qmatrix, O = [O1, . . . , Om] 2 R[0,1]⇥m + . In addition, let eO(x) = diag(O1(x), . . . , Om(x)), and A(x) = T eO(x). Let x1:t = {x1, . . . , xt} be an ordered sequence and xt:1 = {xt, . . . , x1} denote its reverse. For brevity, we will overload notation for A for sequences and write A(xt:1) = A(xt)A(xt−1) . . . A(x1). It is well known [2, 17] that the joint probability density of the sequence x1:t can be computed via p(x1:t) = 1> mA(xt:1)⇡. Key structural assumption: Previous work on estimating HMMs with continuous observations typically assumed that the emissions, Oj, take a parametric form, e.g. Gaussian. Unlike them, we only make mild nonparametric smoothness assumptions on Oj. As we will see, to estimate the HMM well in this problem we will need to estimate entire pdfs well. For this reason, the nonparametric setting is significantly more difficult than its parametric counterpart as the latter requires estimating only a finite number of parameters. When compared to the previous literature, this is the crucial distinction and the main challenge in this work. Observable Representation: The observable representation is a description of an HMM in terms of quantities that depend on the observations [17]. This representation is useful for two reasons: (i) it depends only on the observations and can be directly estimated from the data; (ii) it can be used to compute joint and conditional probabilities of sequences even without the knowledge of T and O and therefore can be used for inference and prediction. First, we define the joint densities, P1, P21, P321: P1(t) = p(x1 = t), P21(s, t) = p(x2 = s, x1 = t), P321(r, s, t) = p(x3 = r, x2 = s, x1 = t), where xi, i = 1, 2, 3 denotes the observation at time i. Denote P3x1(r, t) = P321(r, x, t) for all x. We will find it useful to view both P21, P3x1 2 R[0,1]⇥[0,1] as cmatrices. We will also need an additional qmatrix U 2 R[0,1]⇥m such that U >O 2 Rm⇥m is invertible. Given one such U, the observable representation of an HMM is described by the parameters b1, b1 2 Rm and B : [0, 1] ! Rm⇥m, b1 = U >P1, b1 = (P > 21U)†P1, B(x) = (U >P3x1)(U >P21)† (1) As before, for a sequence, xt:1 = {xt, . . . , x1}, we define B(xt:1) = B(xt)B(xt−1) . . . B(x1). The following lemma shows that the first m left singular vectors of P21 are a natural choice for U. Lemma 1. Let ⇡> 0, T and O be of rank m and U be the qmatrix composed of the first m left singular vectors of P21. Then U >O is invertible. 2 We discuss the case of higher dimensions in Section 7. 3 To compute the joint and conditional probabilities using the observable representation, we maintain an internal state, bt, which is updated as we see more observations. The internal state at time t is bt = B(xt−1:1)b1 b> 1B(xt−1:1)b1 . (2) This definition of bt is consistent with b1. The following lemma establishes the relationship between the observable representation and the internal states to the HMM parameters and probabilities. Lemma 2 (Properties of the Observable Representation). Let rank(T) = rank(O) = m and U >O be invertible. Let p(x1:t) denote the joint density of a sequence x1:t and p(xt+1:t+t0|x1:t) denote the conditional density of xt+1:t+t0 given x1:t in a sequence x1:t+t0. Then the following are true. 1. b1 = U >O⇡ 2. b1 = 1> m(U >O)−1 3. B(x) = (U >O)A(x)(U >O)−1 8 x 2 [0, 1]. 4. bt+1 = B(xt)bt/(b> 1B(xt)bt). 5. p(x1:t) = b> 1B(xt:1)b1. 6. p(xt+t0:t+1|x1:t) = b> 1B(xt+t0:t+1)bt. The last two claims of the Lemma 2 show that we can use the observable representation for computing the joint and conditional densities. The proofs of Lemmas 1 and 2 are similar to the discrete case and mimic Lemmas 2, 3 & 4 of Hsu et al. [2]. 4 Spectral Learning of HMMs with Nonparametric Emissions The high level idea of our algorithm, NP-HMM-SPEC, is as follows. First we will obtain density estimates for P1, P21, P321 which will then be used to recover the observable representation b1, b1, B by plugging in the expressions in (1). Lemma 2 then gives us a way to estimate the joint and conditional probability densities. For now, we will assume that we have N i.i.d sequences of triples {X(j)}N j=1 where X(j) = (X(j) 1 , X(j) 2 , X(j) 3 ) are the observations at the first three time steps. We describe learning from longer sequences in Section 4.3. 4.1 Kernel Density Estimation The first step is the estimation of the joint probabilities which requires a nonparametric density estimate. While there are several techniques [18], we use kernel density estimation (KDE) since it is easy to analyse and works well in practice. The KDE for P1, P21, and P321 take the form: bP1(t) = 1 N N X j=1 1 h1 K t −X(j) 1 h1 ! , bP21(s, t) = 1 N N X j=1 1 h2 21 K s −X(j) 2 h21 ! K t −X(j) 1 h21 ! , bP321(r, s, t) = 1 N N X j=1 1 h3 321 K r −X(j) 3 h321 ! K s −X(j) 2 h321 ! K t −X(j) 1 h321 ! . (3) Here K : [0, 1] ! R is a symmetric function called a smoothing kernel and satisfies (at the very least) R 1 0 K(s)ds = 1, R 1 0 sK(s)ds = 0. The parameters h1, h21, h321 are the bandwidths, and are typically decreasing with N. In practice they are usually chosen via cross-validation. 4.2 The Spectral Algorithm Algorithm 1 NP-HMM-SPEC Input: Data {X(j) = (X(j) 1 , X(j) 2 , X(j) 3 )}N j=1, number of states m. • Obtain estimates bP1, bP21, bP321 for P1, P21, P321 via kernel density estimation (3). • Compute the cmatrix SVD of bP21. Let bU 2 R[0,1]⇥m be the first m left singular vectors of bP21. • Compute the parameters observable representation. Note that bB is a Rm⇥m valued function. bb1 = bU > bP1, bb1 = (P > 21 bU)† bP1, bB(x) = (bU > bP3x1)(bU > bP21)† 4 The algorithm, given above in Algorithm 1, follows the roadmap set out at the beginning of this section. While the last two steps are similar to the discrete HMM algorithm of Hsu et al. [2], the SVD, pseudoinverses and multiplications are with q/c-matrices. Once we have the estimates bb1, bb1, and bB(x) the joint and predictive (conditional) densities can be estimated via (see Lemma 2): bp(x1:t) = bb> 1 bB(xt:1)bb1, bp(xt+t0:t+1|x1:t) = bb> 1 bB(xt+t0:t+1)bbt. (4) Here bbt is the estimated internal state obtained by plugging in bb1,bb1, bB in (2). Theoretically, these estimates can be negative in which case they can be truncated to 0 without affecting the theoretical results in Section 5. However, in our experiments these estimates were never negative. 4.3 Implementation Details C/Q-Matrix operations using Chebyshev polynomials: While our algorithm and analysis are conceptually well founded, the important practical challenge lies in the efficient computation of the many aforementioned operations on c/q-matrices. Fortunately, some very recent advances in the numerical analysis literature, specifically on computing with Chebyshev polynomials, have rendered the above algorithm practical [6, Ch.3-4]. Due to the space constraints, we provide only a summary. Chebyshev polynomials is a family of orthogonal polynomials on compact intervals, known to be an excellent approximator of one-dimensional functions [19, 20]. A recent line of work [5, 8] has extended the Chebyshev technology to two dimensional functions enabling the mentioned operations and factorisations such as QR, LU and SVD [6, Sections 4.6-4.8] of continuous matrices to be carried efficiently. The density estimates bP1, bP21, bP321 are approximated by Chebyshev polynomials to within machine precision. Our implementation makes use of the Chebfun library [7] which provides an efficient implementation for the operations on continuous and quasi matrices. Computation time: Representing the KDE estimates bP1, bP21, bP321 using Chebfun was roughly linear in N and is the brunt of the computational effort. The bandwidths for the three KDE estimates are chosen via cross validation which takes O(N 2) effort. However, in practice the cost was dominated by the Chebyshev polynomial approximation. In our experiments we found that NPHMM-SPEC runs in linear time in practice and was more efficient than most alternatives. Training with longer sequences: When training with longer sequences we can use a sliding window of length 3 across the sequence to create the triples of observations needed for the algorithm. That is, given N samples each of length `(j), j = 1, . . . , N, we create an augmented dataset of triples { {(X(j) t , X(j) t+1, X(j) t+2)}`(j)−2 t=1 }N j=1 and run NP-HMM-SPEC with the augmented data. As is with conventional EM procedures, this requires the additional assumption that the initial state is the stationary distribution of the transition matrix T. 5 Analysis We now state our assumptions and main theoretical results. Following [2, 4, 15] we assume i.i.d sequences of triples are used for training. With longer sequences, the analysis should only be modified to account for the mixing of the latent state Markov chain, which is inessential for the main intuitions. We begin with the following regularity condition on the HMM. Assumption 3. ⇡> 0 element-wise. T 2 Rm⇥m and O 2 R[0,1]⇥m are of rank m. The rank condition on O means that emission pdfs are linearly independent. If either T or O are rank deficient, then the learner may confuse state outputs, which makes learning difficult3. Next, while we make no parametric assumptions on the emissions, some smoothness conditions are used to make density estimation tractable. We use the Hölder class, H1(β, L), which is standard in the nonparametrics literature. For β = 1, this assumption reduces to L-Lipschitz continuity. Assumption 4. All emission densities belong to the Hölder class, H1(β, L). That is, they satisfy, for all ↵bβc, j 2 [m], s, t 2 [0, 1] (((( d↵Oj(s) ds↵ −d↵Oj(t) dt↵ (((( L|s −t|β−|↵|. Here bβc is the largest integer strictly less than β. 3 Siddiqi et al. [4] show that the discrete spectral algorithm works under a slightly more general setting. Similar results hold for the nonparametric case too but will restrict ourselves to the full rank setting for simplicity. 5 Under the above assumptions we bound the total variation distance between the true and the estimated densities of a sequence, x1:t. Let (O) = σ1(O)/σm(O) denote the condition number of the observation qmatrix. The following theorem states our main result. Theorem 5. Pick any sufficiently small ✏> 0 and a failure probability δ 2 (0, 1). Let t ≥1. Assume that the HMM satisfies Assumptions 3 and 4 and the number of samples N satisfies, N log(N) ≥ C m1+ 3 2β (O)2+ 3 β σm(P21)4+ 4 β ✓t ✏ ◆2+ 3 β log ✓1 δ ◆1+ 3 2β . Then, with probability at least 1 −δ, the estimated joint density for a t-length sequence satisfies R |p(x1:t) −bp(x1:t)|dx1:t ✏. Here, C is a constant depending on β and L and bp is from (4). Synopsis: Observe that the sample complexity depends critically on the conditioning of O and P21. The closer they are to being singular, the more samples is needed to distinguish different states and learn the HMM. It is instructive to compare the results above with the discrete case result of Hsu et al. [2], whose sample complexity bound4 is N & m (O)2 σm(P21)4 t2 ✏2 log 1 δ. Our bound is different in two regards. First, the exponents are worsened by additional ⇠1 β terms. This characterizes the difficulty of the problem in the nonparametric setting. While we do not have any lower bounds, given the current understanding of the difficulty of various nonparametric tasks [21–23], we think our bound might be unimprovable. As the smoothness of the densities increases β ! 1, we approach the parametric sample complexity. The second difference is the additional log(N) term on the left hand side. This is due to the fact that we want the KDE to concentrate around its expectation in L2 over [0, 1], instead of just point-wise. It is not clear to us whether the log can be avoided. To prove Theorem 5, first we will derive some perturbation theory results for c/q-matrices; we will need them to bound the deviation of the singular values and vectors when we use bP21 instead of P21. Some of these perturbation theory results for continuous linear algebra are new and might be of independent interest. Next, we establish a concentration result for the kernel density estimator. 5.1 Some Perturbation Theory Results for C/Q-matrices The first result is an analog of Weyl’s theorem which bounds the difference in the singular values in terms of the operator norm of the perturbation. Weyl’s theorem has been studied for general operators [24] and cmatrices [6]. We have given one version in Lemma 21 of Appendix B. In addition to this, we will also need to bound the difference in the singular vectors and the pseudo-inverses of the truth and the estimate. To our knowledge, these results are not yet known. To that end, we establish the following results. Here σk(A) denotes the kth singular value of a c/q-matrix A. Lemma 6 (Simplified Wedin’s Sine Theorem for Cmatrices). Let A, ˜A, E 2 R[0,1]⇥[0,1] where ˜A = A + E and rank(A) = m. Let U, ˜U 2 R[a,b]⇥m be the first m left singular vectors of A and ˜A respectively. Then, for all x 2 Rm, k ˜U >Uxk2 ≥kxk2 q 1 −2kEk2 L2/σm( ˜A)2. Lemma 7 (Pseudo-inverse Theorem for Qmatrices). Let A, ˜A, E 2 R[a,b]⇥m and ˜A = A + E. Then, σ1(A† −˜A†) 3 max{σ1(A†)2, σ1(A†)2} σ1(E). 5.2 Concentration Bound for the Kernel Density Estimator Next, we bound the error for kernel density estimation. To obtain the best rates under Hölderian assumptions on O, the kernels used in KDE need to be of order β. A β order kernel satisfies, Z 1 0 K(s)ds = 1, Z 1 0 s↵K(s)ds = 0, for all ↵bβc, Z 1 0 sβK(s)ds 1. (5) Such kernels can be constructed using Legendre polynomials [18]. Given N i.i.d samples from a d dimensional density f, where d 2 {1, 2, 3} and f 2 {P1, P21, P321}, for appropriate choices of the bandwidths h1, h21, h321, the KDE ˆf 2 { bP1, bP21, bP321} concentrates around f. Informally, we show P ⇣ k ˆf −fkL2 > " ⌘ . exp ⇣ −log(N) d 2β+d N 2β 2β+d "2⌘ . (6) 4 Hsu et al. [2] provide a more refined bound but we use this form to simplify the comparison. 6 Number of training sequences 103 104 105 Predictive L1 error 0.025 0.05 0.1 0.25 0.5 MG-HMM NP-HMM-BIN NP-HMM-EM NP-HMM-SPEC Number of training sequences 103 104 105 Prediction absolute error 0.384 0.386 0.388 0.39 True MG-HMM NP-HMM-BIN NP-HMM-EM NP-HMM-HSE NP-HMM-SPEC Number of training sequences 103 104 105 Training time, sec 100 101 102 103 104 MG-HMM NP-HMM-EM NP-HMM-HSE NP-HMM-SPEC Number of training sequences # 103 5 10 50 100 Predictive L1 error 0.05 0.1 0.25 0.5 MG-HMM NP-HMM-BIN NP-HMM-EM NP-HMM-SPEC Number of training sequences # 103 5 10 50 100 Prediction absolute error 0.358 0.362 0.366 0.37 True MG-HMM NP-HMM-BIN NP-HMM-EM NP-HMM-HSE NP-HMM-SPEC Number of training sequences 5 10 50 100 Training time, sec 101 102 103 104 MG-HMM NP-HMM-EM NP-HMM-HSE NP-HMM-SPEC Figure 1: The upper and lower panels correspond to m = 4 m = 8 respectively. All figures are in log-log scale and the x-axis is the number of triples used for training. Left: L1 error between true conditional density p(x6|x1:5), and the estimate for each method. Middle: The absolute error between the true observation and a one-step-ahead prediction. The error of the true model is denoted by a black dashed line. Right: Training time. for all sufficiently small " and N/ log N & "−2+ d β . Here ., & denote inequalities ignoring constants. See Appendix C for a formal statement. Note that when the observations are either discrete or parametric, it is possible to estimate the distribution using O(1/"2) samples to achieve " error in a suitable metric, say, using the maximum likelihood estimate. However, the nonparametric setting is inherently more difficult and therefore the rate of convergence is slower. This slow convergence is also observed in similar concentration bounds for the KDE [25, 26]. A note on the Proofs: For Lemmas 6, 7 we follow the matrix proof in Stewart and Sun [27] and derive several intermediate results for c/q-matrices in the process. The main challenge is that several properties for matrices, e.g. the CS and Schur decompositions, are not known for c/q-matrices. In addition, dealing with various notions of convergences with these infinite objects can be finicky. The main challenge with the KDE concentration result is that we want an L2 bound – so usual techniques (such as McDiarmid’s [13, 18]) do not apply. We use a technical lemma from Giné and Guillou [26] which allows us to bound the L2 error in terms of the VC characteristics of the class of functions induced by an i.i.d sum of the kernel. The proof of theorem 5 just mimics the discrete case analysis of Hsu et al. [2]. While, some care is needed (e.g. kxkL2 kxkL1 does not hold for functional norms) the key ideas carry through once we apply Lemmas 21, 6, 7 and (6). A more refined bound on N that is tighter in polylog(N) terms is possible – see Corollary 25 and equation 13 in the appendix. 6 Experiments We compare NP-HMM-SPEC to the following. MG-HMM: An HMM trained using EM with the emissions modeled as a mixture of Gaussians. We tried 2, 4 and 8 mixtures and report the best result. NP-HMM-BIN: A naive baseline where we bin the space into n intervals and use the discrete spectral algorithm [2] with n states. We tried several values for n and report the best. NP-HMM-EM: The Nonparametric EM heuristic of [12]. NP-HMM-HSE: The Hilbert space embedding method of [15]. Synthetic Datasets: We first performed a series of experiments on synthetic data where the true distribution is known. The goal is to evaluate the estimated models against the true model. We generated triples from two HMMs with m = 4 and m = 8 states and nonparametric emissions. The details of the set up are given in Appendix E. Figure 1 presents the results. First we compare the methods on estimating the one step ahead conditional density p(x6|x1:5). We report the L1 error between the true and estimated models. In Figure 2 we visualise the estimated one step ahead conditional densities. NP-HMM-SPEC outperforms all methods on this metric. Next, we compare the methods on the prediction performance. That is, we sample sequences of length 6 and test how well a learned model can predict x6 conditioned on x1:5. When comparing on squared error, the best predictor is the mean of the distribution. For all methods we use the mean of bp(x6|x1:5) except 7 X -1 -0.5 0 0.5 1 Predictive density 0 0.2 0.4 0.6 0.8 1 Truth MG-HMM X -1 -0.5 0 0.5 1 Predictive density 0 0.2 0.4 0.6 0.8 1 Truth NP-HMM-HKZ-BIN X -1 -0.5 0 0.5 1 Predictive density 0 0.2 0.4 0.6 0.8 1 Truth NP-HMM-EM X -1 -0.5 0 0.5 1 Predictive density 0 0.2 0.4 0.6 0.8 1 Truth NP-HMM-SPEC Figure 2: True and estimated one step ahead densities p(x4|x1:3) for each model. Here m = 4 and N = 104. Dataset MG-HMM NP-HMM-BIN NP-HMM-HSE NP-HMM-SPEC Internet Traffic 0.143 ± 0.001 0.188 ± 0.004 0.0282 ± 0.0003 0.016 ± 0.0002 Laser Gen 0.33 ± 0.018 0.31 ± 0.017 0.19 ± 0.012 0.15 ± 0.018 Patient Sleep 0.330 ± 0.002 0.38 ± 0.011 0.197 ± 0.001 0.225 ± 0.001 Table 1: The mean prediction error and the standard error on the 3 real datasets. for NP-HMM-HSE for which we used the mode since the mean cannot be computed. No method can do better than the true model (shown via the dotted line) in expectation. NP-HMM-SPEC achieves the performance of the true model with large datasets. Finally, we compare the training times of all methods. NP-HMM-SPEC is orders of magnitude faster than NP-HMM-HSE and NP-HMM-EM. Note that the error of MG-HMM—a parametric model—stops decreasing even with large data. This is due to the bias introduced by the parametric assumption. We do not train NP-HMM-EM for longer sequences because it is too slow. A limitation of the NP-HMM-HSE method is that it cannot recover conditional probabilities, so we exclude it from that experiment. We could not include the method of [4] in our comparisons since their code was not available and their method is not straightforward to implement. Further, their method cannot compute joint/predictive probabilities. Real Datasets: We compare all the above methods (except NP-HMM-EM which was too slow) on prediction error on 3 real datasets: internet traffic [28], laser generation [29] and sleep data [30]. The details on these datasets are in Appendix E. For all methods we used the mode of the conditional distribution p(xt+1|x1:t) as the prediction as it performed better. For NP-HMM-SPEC, NP-HMMHSE,NP-HMM-BIN we follow the procedure outlined in Section 4.3 to create triples and train with the triples. In Table 1 we report the mean prediction error and the standard error. NP-HMM-HSE and NP-HMM-SPEC perform better than the other two methods. However, NP-HMM-SPEC was faster to train (and has other attractive properties) when compared to NP-HMM-HSE. 7 Conclusion We proposed and studied a method for estimating the observable representation of a Hidden Markov Model whose emission probabilities are smooth nonparametric densities. We derive a bound on the sample complexity for our method. While our algorithm is similar to existing methods for discrete models, many of the ideas that generalise it to the nonparametric setting are new. In comparison to other methods, the proposed approach has some desirable characteristics: we can recover the joint/conditional densities, our theoretical results are in terms of more interpretable metrics, the method outperforms baselines and is orders of magnitude faster to train. In this exposition only focused on one dimensional observations. The multidimensional case is handled by extending the above ideas and technology to multivariate functions. Our algorithm and the analysis carry through to the d-dimensional setting, mutatis mutandis. The concern however, is more practical. While we have the technology to perform various c/q-matrix operations for d = 1 using Chebyshev polynomials, this is not yet the case for d > 1. Developing efficient procedures for these operations in the high dimensional settings is a challenge for the numerical analysis community and is beyond the scope of this paper. That said, some recent advances in this direction are promising [8, 31]. While our method has focused on HMMs, the ideas in this paper apply for a much broader class of problems. Recent advances in spectral methods for estimating parametric predictive state representations [32], mixture models [3] and other latent variable models [33] can be generalised to the nonparamatric setting using our ideas. Going forward, we wish to focus on such models. Acknowledgements The authors would like to thank Alex Townsend, Arthur Gretton, Ahmed Hefny, Yaoliang Yu, and Renato Negrinho for the helpful discussions. This work was supported by NIH R01GM114311, AFRL/DARPA FA87501220324. 8 References [1] Lawrence R. Rabiner. A Tutorial on Hidden Markov Models and Selected Applications in Speech Recognition. In Proceedings of the IEEE, 1989. [2] Daniel J. Hsu, Sham M. Kakade, and Tong Zhang. A Spectral Algorithm for Learning Hidden Markov Models. In COLT, 2009. [3] Animashree Anandkumar, Daniel Hsu, and Sham M Kakade. A Method of Moments for Mixture Models and Hidden Markov Models. arXiv preprint arXiv:1203.0683, 2012. [4] Sajid M. Siddiqi, Byron Boots, and Geoffrey J. Gordon. Reduced-Rank Hidden Markov Models. In AISTATS, 2010. [5] Alex Townsend and Lloyd N Trefethen. Continuous analogues of matrix factorizations. In Proc. R. Soc. A, 2015. [6] Alex Townsend. Computing with Functions in Two Dimensions. PhD thesis, University of Oxford, 2014. [7] Tobin A Driscoll, Nicholas Hale, and Lloyd N Trefethen. Chebfun guide. Pafnuty Publ, 2014. [8] Townsend, Alex and Trefethen, Lloyd N. An extension of chebfun to two dimensions. SIAM J. Scientific Computing, 2013. [9] Michael L Littman, Richard S Sutton, and Satinder P Singh. Predictive representations of state. In NIPS, volume 14, pages 1555–1561, 2001. [10] A. P. Dempster, N. M. Laird, and D. B. Rubin. Maximum likelihood from incomplete data via the EM algorithm. Journal of the Royal Statistical Society, Series B, 1977. [11] Lloyd R Welch. Hidden Markov models and the Baum-Welch algorithm. IEEE Information Theory Society Newsletter, 2003. [12] Tatiana Benaglia, Didier Chauveau, and David R Hunter. An em-like algorithm for semi-and nonparametric estimation in multivariate mixtures. Journal of Computational and Graphical Statistics, 18(2):505–526, 2009. [13] Larry Wasserman. All of Nonparametric Statistics. Springer-Verlag NY, 2006. [14] Yohann De Castro, Élisabeth Gassiat, and Claire Lacour. Minimax adaptive estimation of nonparametric hidden markov models. arXiv preprint arXiv:1501.04787, 2015. [15] Le Song, Byron Boots, Sajid M Siddiqi, Geoffrey J Gordon, and Alex Smola. Hilbert space embeddings of hidden markov models. In ICML, 2010. [16] Le Song, Animashree Anandkumar, Bo Dai, and Bo Xie. Nonparametric Estimation of Multi-View Latent Variable Models. pages 640–648, 2014. [17] Herbert Jaeger. Observable operator models for discrete stochastic time series. Neural Computation, 2000. [18] Alexandre B. Tsybakov. Introduction to Nonparametric Estimation. Springer, 2008. [19] L. Fox and I. B. Parker. Chebyshev polynomials in numerical analysis. Oxford U.P. cop., 1968. [20] Lloyd N. Trefethen. Approximation Theory and Approximation Practice. Society for Industrial and Applied Mathematics, 2012. [21] Lucien Birgé and Pascal Massart. Estimation of integral functionals of a density. Ann. of Stat., 1995. [22] James Robins, Lingling Li, Eric Tchetgen, and Aad W van der Vaart. Quadratic semiparametric Von Mises Calculus. Metrika, 69(2-3):227–247, 2009. [23] Kirthevasan Kandasamy, Akshay Krishnamurthy, Barnabás Póczos, Larry Wasserman, and James Robins. Nonparametric Von Mises Estimators for Entropies, Divergences and Mutual Informations. In NIPS, 2015. [24] Woo Young Lee. Weyl’s theorem for operator matrices. Integral Equations and Operator Theory, 1998. [25] Han Liu, Min Xu, Haijie Gu, Anupam Gupta, John D. Lafferty, and Larry A. Wasserman. Forest Density Estimation. Journal of Machine Learning Research, 12:907–951, 2011. [26] Evarist Giné and Armelle Guillou. Rates of strong uniform consistency for multivariate kernel density estimators. In Annales de l’IHP Probabilités et statistiques, 2002. [27] G. W. Stewart and Ji-guang Sun. Matrix Perturbation Theory. Academic Press, 1990. [28] Vern Paxson and Sally Floyd. Wide area traffic: the failure of Poisson modeling. IEEE/ACM Transactions on Networking, 1995. [29] U Hübner, NB Abraham, and CO Weiss. Dimensions and entropies of chaotic intensity pulsations in a single-mode far-infrared NH 3 laser. Physical Review A, 1989. [30] Santa Fe Time Series Competition. http://www-psych.stanford.edu/ andreas/Time-Series/SantaFe.html. [31] Hashemi, B. and Trefethen, L. N. Chebfun to three dimensions. In preparation, 2016. [32] Satinder Singh, Michael R. James, and Matthew R. Rudary. Predictive State Representations: A New Theory for Modeling Dynamical Systems. In UAI, 2004. [33] Animashree Anandkumar, Rong Ge, Daniel Hsu, Sham M. Kakade, and Matus Telgarsky. Tensor Decompositions for Learning Latent Variable Models. JMLR, 2014. 9 | 2016 | 405 |
6,334 | Observational-Interventional Priors for Dose-Response Learning Ricardo Silva Department of Statistical Science and Centre for Computational Statistics and Machine Learning University College London ricardo@stats.ucl.ac.uk Abstract Controlled interventions provide the most direct source of information for learning causal effects. In particular, a dose-response curve can be learned by varying the treatment level and observing the corresponding outcomes. However, interventions can be expensive and time-consuming. Observational data, where the treatment is not controlled by a known mechanism, is sometimes available. Under some strong assumptions, observational data allows for the estimation of dose-response curves. Estimating such curves nonparametrically is hard: sample sizes for controlled interventions may be small, while in the observational case a large number of measured confounders may need to be marginalized. In this paper, we introduce a hierarchical Gaussian process prior that constructs a distribution over the doseresponse curve by learning from observational data, and reshapes the distribution with a nonparametric affine transform learned from controlled interventions. This function composition from different sources is shown to speed-up learning, which we demonstrate with a thorough sensitivity analysis and an application to modeling the effect of therapy on cognitive skills of premature infants. 1 Contribution We introduce a new solution to the problem of learning how an outcome variable Y varies under different levels of a control variable X that is manipulated. This is done by coupling different Gaussian process priors that combine observational and interventional data. The method outperforms estimates given by using only observational or only interventional data in a variety of scenarios and provides an alternative way of interpreting related methods in the design of computer experiments. Many problems in causal inference [14] consist of having a treatment variable X and and outcome Y , and estimating how Y varies as we control X at different levels. If we have data from a randomized controlled trial, where X and Y are not confounded, many standard modeling approaches can be used to learn the relationship between X and Y . If X and Y are measured in an observational study, the corresponding data can be used to estimate the association between X and Y , but this may not be the same as the causal relationship of these two variables because of possible confounders. To distinguish between the observational regime (where X is not controlled) and the interventional regime (where X is controlled), we adopt the causal graphical framework of [16] and [19]. In Figure 1 we illustrate the different regimes using causal graphical models. We will use p(· | ·) to denote (conditional) density or probability mass functions. In Figure 1(a) we have the observational, or “natural,” regime where common causes Z generate both treatment variable X and outcome variable Y . While the conditional distribution p(Y = x | X = x) can be learned from this data, this quantity is not the same as p(Y = y | do(X = x)): the latter notation, due to Pearl [16], denotes a regime where X is not random, but a quantity set by an intervention performed by an external agent. The relation between these regimes comes from fundamental invariance assumptions: when X is intervened upon, 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. X Y Z X Y Z X Y ZO ZH (a) (b) (c) Figure 1: Graphs representing causal graphical models. Circles represent random variables, squares represent fixed constants. (a) A system where Z is a set of common causes (confounders), common parents of X and Y here represented as a single vertex. (b) An intervention overrides the value of X setting it to some constant. The rest of the system remains invariant. (c) ZO is not a common cause of X and Y , but blocks the influence of confounder ZH. “all other things are equal,” and this invariance is reflected by the fact that the model in Figure 1(a) and Figure 1(b) share the same conditional distribution p(Y = x|X = x, Z = z) and marginal distribution p(Z = z). If we observe Z, p(Y = y | do(X = x)) can be learned from observational data, as we explain in the next section. Our goal is to learn the relationship f(x) ≡E[Y | do(X = x)], x ∈X, (1) where X ≡{x1, x2, . . . , xT } is a pre-defined set of treatment levels. We call the vector f(X) ≡ [f(x1); . . . ; f(xT )]⊤the response curve for the “doses” X. Although the term “dose” is typically associated with the medical domain, we adopt here the term dose-response learning in its more general setup: estimating the causal effect of a treatment on an outcome across different (quantitative) levels of treatment. We assume that the causal structure information is known, complementing approaches for structure learning [19, 9] by tackling the quantitative side of causal prediction. In Section 2, we provide the basic notation of our setup. Section 3 describes our model family. Section 4 provides a thorough set of experiments assessing our approach, including sensitivity to model misspecification. We provide final conclusions in Section 5. 2 Background The target estimand p(Y = y | do(X = x)) can be derived from the structural assumptions of Figure 1(b) by standard conditioning and marginalization operations: p(Y = y | do(X = x)) = Z p(Y = y | X = x, Z = z)p(Z = z) dz. (2) Notice the important difference between the above and p(Y = y | X = x), which can be derived from the assumptions in Figure 1(a) by marginalizing over p(Z = z | X = x) instead. The observational and interventional distributions can be very different. The above formula is sometimes known as the back-door adjustment [16] and it does not require measuring all common causes of treatment and outcome. It suffices that we measure variables Z that block all “back-door paths” between X and Y , a role played by ZO in Figure 1(c). A formal description of which variables Z will validate (2) is given by [20, 16, 19]. We will assume that the selection of which variables Z to adjust for has been decided prior to our analysis, although in our experiments in Section 4 we will assess the behavior of our method under model misspecification. Our task is to estimate (1) nonparametrically given observational and experimental data, assuming that Z satisfies the back-door criteria. One possibility for estimating (1) from observational data Dobs ≡{(Y (i), X(i), Z(i))}, 1 ≤i ≤N, is by first estimating g(x, z) ≡E[Y | X = x, Z = z]. The resulting estimator, ˆf(x) ≡1 N N X i=1 ˆg(x, z(i)), (3) is consistent under some general assumptions on f(·) and g(·, ·). Estimating g(·, ·) nonparametrically seems daunting, since Z can in principle be high-dimensional. However, as shown by [5], under 2 some conditions the problem of estimating ˆf(·) nonparametrically via (3) is no harder than a onedimensional nonparametric regression problem. There is however one main catch: while observational data can be used to choose the level of regularization for ˆg(·), this is not likely to be an optimal choice for ˆf(·) itself. Nevertheless, even if suboptimal smoothing is done, the use of nonparametric methods for estimating causal effects by back-door adjustment has been successful. For instance, [7] uses Bayesian classification and regression trees for this task. Although of practical use, there are shortcomings in this idea even under the assumption that Z provides a correct back-door adjustment. In particular, Bayesian measures of uncertainty should be interpreted with care: a fully Bayesian equivalent to (3) would require integrating over a model for p(Z) instead of the empirical distribution for Z in Dobs; evaluating a dose x might require combining many g(x, z(i)) where the corresponding training measurements x(i) are far from x, resulting on possibly unreliable extrapolations with poorly calibrated credible intervals. While there are well established approaches to deal with this “lack of overlap” problem in binary treatments or linear responses [18, 8], it is less clear what to do in the continuous case with nonlinear responses. In this paper, we focus on a setup where it is possible to collect interventional data such that treatments are controlled, but where sample sizes might be limited due to financial and time costs. This is related to design of computer experiments, where (cheap, but biased) computer simulations are combined with field experiments [2, 6]. The key idea of combining two sources of data is very generic, the value of new methods being on the design of adequate prior families. For instance, if computer simulations are noisy, it is may not be clear how uncertainty at that level should be modeled. We leverage knowledge of adjustment techniques for causal inference, so that it provides a partially automated recipe to transform observational data into informed priors. We leverage knowledge of the practical shortcomings of nonparametric adjustment (3) so that, unlike the biased but low variance setup of computer experiments, we try to improve the (theoretically) unbiased but possibly oversmooth structure of such estimators by introducing a layer of pointwise affine transformations. Heterogeneous effects and stratification. One might ask why marginalize Z in (2), as it might be of greater interest to understand effects at the finer subpopulation levels conditioned on Z. In fact, (2) should be seen as the most general case, where conditioning on a subset of covariates (for instance, gender) will provide the possibly different average causal effect for each given strata (different levels of gender) marginalized over the remaining covariates. Randomized fine-grained effects might be hard to estimate and require stronger smoothing and extrapolation assumptions, but in principle they could be integrated with the approaches discussed here. In practice, in causal inference we are generally interested in marginal effects for some subpopulations where many covariates might not be practically measurable at decision time, and for the scientific purposes of understanding total effects [5] at different levels of granularity with weaker assumptions. 3 Hierarchical Priors via Inherited Smoothing and Local Affine Changes The main idea is to first learn from observational data a Gaussian process over dose-response curves, then compose it with a nonlinear transformation biased toward the identity function. The fundamental innovation is the construction a nonstationary covariance function from observational data. 3.1 Two-layered Priors for Dose-responses Given an observational dataset Dobs of size N, we fit a Gaussian process to learn a regression model of outcome Y on (uncontrolled) treatment X and covariates Z. A Gaussian likelihood for Y given X and Z is adopted, with conditional mean g(x, z) and variance σ2 g. A Matérn 3/2 covariance function with automatic relevance determination priors is given to g(·, ·), followed by marginal maximum likelihood to estimate σ2 g and the covariance hyperparameters [12, 17]. This provides a posterior distribution over functions g(·, ·) in the input space of X and Z. We then define fobs(X), x ∈X, as fobs(x) ≡1 N N X i=1 g(x, z(i)), (4) where set {g(x, z(i))} is unknown. Uncertainty about fobs(·) comes from the joint predictive distribution of {g(x, z(i))} learned from Dobs, itself a Gaussian distribution with a TN × 1 mean vector 3 µ⋆ g and a TN × TN covariance matrix, T ≡|X|. Since (4) is a linear function of {g(x, z(i))}, this implies fobs(X) is also a (nonstationary) Gaussian process with mean µobs(x) = 1 N PN i=1 µ⋆ g(x, z(i)) for each x ∈X. The motivation for (4) is that µobs is an estimator of the type (3), inheriting its desirable properties and caveats. The cost of computing the covariance matrix Kobs of fobs(X) is O(T 2N 2), potentially expensive. In many practical applications, however, the size of X is not particularly large as it is a set of intervention points to be decided according to practical real-world constraints. In our simulations in Section 4, we chose T = |X| = 20. Approximating such covariance matrix, if necessary, is a future research topic. Assume interventional data Dint ≡{(Y (i) int, x(i) int)}, 1 ≤i ≤M, is provided (with assignments x(i) int chosen by some pre-defined design in X). We assign a prior to f(·) according to the model fobs(X) ∼ N(µobs, Kobs) a(X) ∼ N(1, Ka) b(X) ∼ N(0, Kb) f(X) = a(X) ⊙fobs(X) + b(X) Y (i) int ∼ N(f(x(i) int), σ2 int), 1 ≤i ≤M, (5) where N(m, V) is the multivariate normal distribution with mean m and covariance matrix V, ⊙is the elementwise product, a(·) is a vector which we call the distortion function, and b(·) the translation function. The role of the “elementwise affine” transform a ⊙fobs + b is to bias f toward fobs with uncertainty that varies depending on our uncertainty about fobs. The multiplicative component a ⊙fobs also induces a heavy-tail prior on f. In the Supplementary Material, we discuss briefly the alternative of using the deep Gaussian process of [4] in our observational-interventional setup. 3.2 Hyperpriors We parameterize Ka as follows. Every entry ka(x, x′) of Ka, (x, x′) ∈X × X, assumes the shape of a squared exponential kernel modified according to the smoothness and scale information obtained from Dobs. First, define ka(x, x′) as ka(x, x′) ≡λa × vx × vx′ × exp −1 2 (ˆx −ˆx′)2 + (ˆyx −ˆyx′)2 σa + δ(x −x′)10−5, (6) where (λa, σh) are hyperparameters, δ(·) is the delta function, vx is a rescaling of Kobs(x, x)1/2, ˆx is a rescaling of X to the [0, 1] interval, ˆyx is a rescaling of µobs(x) to the [0, 1] interval. More precisely, ˆx ≡ x −min(X) max(X) −min(X), ˆyx ≡ µobs(x) −min(µobs(X)) max(µobs(X)) −min(µobs(X)), vx = s Kobs(x, x) maxx′ Kobs(x′, x′). (7) Equation (6) is designed to borrow information from the (estimated) smoothness of f(X), by decreasing the correlation of the distortion factors a(x) and a(x′) as a function of the Euclidean distance between the 2D points (x, µobs(x)) and (x′, µobs(x′)), properly scaled. Hyperparameter σa controls how this distance is weighted. (6) also captures information about the amplitude of the distortion signal, making it proportional to the ratios of the diagonal entries of Kobs(X). Hyperparameter λa controls how this amplitude is globally adjusted. Nugget 10−5 brings stability to the sampling of a(X) within Markov chain Monte Carlo (MCMC) inference. Hyper-hyperpriors on λa and σa are set as log(λa) ∼N(0, 0.5), log(σa) ∼N(0, 0.1). (8) That is, λa follows a log-Normal distribution with median 1, approximately 90% of the mass below 2.5, and a long tail to the right. The implied distribution for a(x) where sx = 1 will have most of its mass within a factor of 10 from its median. The prior on σa follows a similar shape, but with a narrower allocation of mass. Covariance matrix Kb is defined in the same way, with its own hyperparameters λb and σb. Finally, the usual Jeffrey’s prior for error variances is given to σ2 int. Figure 2 shows an example of inference obtained from synthetic data, generated according to the protocol of Section 4. In this example, the observational relationship between X and Y has the opposite association of the true causal one, but after adjusting for 15 of the 25 confounders that 4 −4 −3 −2 −1 0 1 2 3 −4 −3 −2 −1 0 1 2 3 4 Treatment X Outcome Y Observational data (N = 1000) −4 −3 −2 −1 0 1 2 3 −4 −3 −2 −1 0 1 2 3 4 Treatment X Outcome Y Interventional data (M = 200) Kobs 2 4 6 8 10 12 14 16 18 20 2 4 6 8 10 12 14 16 18 20 −4 −3 −2 −1 0 1 2 3 −1 −0.5 0 0.5 1 1.5 2 2.5 3 Treatment X Outcome Y Prior: observational only −4 −3 −2 −1 0 1 2 3 −6 −4 −2 0 2 4 6 8 10 Treatment X Distortion H Prior: distortion only −4 −3 −2 −1 0 1 2 3 −1 −0.5 0 0.5 1 1.5 2 2.5 3 Treatment X Outcome Y Prior on dose−response −4 −3 −2 −1 0 1 2 3 −1 −0.5 0 0.5 1 1.5 2 2.5 3 Treatment X Outcome Y Posterior: observational only −4 −3 −2 −1 0 1 2 3 −2 −1 0 1 2 3 4 Treatment X Outcome Y Posterior: distortion only −4 −3 −2 −1 0 1 2 3 −1 −0.5 0 0.5 1 1.5 2 2.5 3 Treatment X Outcome Y Posterior on dose−response Figure 2: An example with synthetic data (|Z| = 25), from priors to posteriors. Figure best seen in color. Top row: scatterplot of observational data, with true dose-response function in solid green, adjusted µobs in dashed red, and the unadjusted Gaussian process regression of Y on X in dashedand-circle magenta (which is a very badly biased estimate in this example); scatterplot in the middle shows interventional data, 20 dose levels uniformly spread in the support of the observational data and 10 outputs per level −notice that the sign of the association is the opposite of the observational regime; matrix Kobs is depicted at the end, where the nonstationarity of the process is evident. Middle row: priors constructed on fobs(X) and a(X) with respective means; plot at the end corresponds to the implied prior on a ⊙fobs + b. Bottom row: the respective posteriors obtained by Gibbs sampling. generated the data (10 confounders are randomly ignored to mimic imperfect prior knowledge), a reasonable initial estimate for f(X) is obtained. The combination with interventional data results in a much better fit, but imperfections still exist at the strongest levels of treatment: the green curve drops at x > 2 stronger than the expected posterior mean. This is due to having both a prior derived from observational data that got the wrong direction of the dose-response curve at x > 1.5, and being unlucky at drawing several higher than expected values in the interventional regime for x = 3. The model then shows its strength on capturing much of the structure of the true dose-response curve even under misspecified adjustments, but the example provides a warning that only so much can be done given unlucky draws from a small interventional dataset. 3.3 Inference, Stratified Learning and Active Learning In our experiments, we infer posterior distributions by Gibbs sampling, alternating the sampling of latent variables f(X), a(X), b(X) and hyperparameters λa, σa, λb, σb, σ2 int, using slice sampling [15] for the hyperparameters. The meaning of the individual posterior distribution over fobs(X) might also be of interest. This quantity is potentially identifiable by considering a joint model for (Dobs, Dint): in this case, fobs(X) learns the observational adjustment R g(x, z)p(z) dz. This suggests that the posterior distribution for fobs(X) will change little according to model (5), which 5 is indeed observed in practice and illustrated by Figure 2. Learning the hyperparameters for Kobs could be done jointly with the remaining hyperparameters, but the cost per iteration would be high due to the update of Kobs. The MCMC procedure for (5) is relatively inexpensive assuming that |X| is small. Learning the hyperparameters of Kobs separately is a type of “modularization” of Bayesian inference [10]. As we mentioned in Section 2, it is sometimes desirable to learn dose-response curves conditioned on a few covariates S ⊂Z of interest. In particular, in this paper we will consider the case of straightforward stratification: given a set S of discrete covariates assuming instantiations s, we have functions f s(X) to be learned. Different estimation techniques can be used to borrow statistical strength across levels of S, both for f s(X) and f s obs(X). However, in our implementation, where we assume |S| is very small (a realistic case for many experimental designs), we construct independent priors for the different f s obs(X) with independent affine transformations. Finally, in the Supplementary Material we also consider simple active learning schemes [11], as suggested by the fact that prior information already provides different estimates of uncertainty across X (Figure 2), which is sometimes dramatically nonstationary. 4 Experiments Assessing causal inference algorithms requires fitting and predicting data generated by expensive randomized trials. Since this is typically unavailable, we will use simulated data where the truth is known. We divide our experiments in two types: first, one where we generate random dose-response functions, which allows us to control the difficulty of the problem in different directions; second, one where we start from a real world dataset and generate “realistic” dose-response curves from which simulated data can be given as input to the method. 4.1 Synthetic Data Studies We generate studies where the observational sample has N = 1000 data points and |Z| = 25 confounders. Interventional data is generated at three different levels of sample size, M = 40, 100 and 200 where the intervention space X is evenly distributed within the range shown by the observational data, with |X| = 20. Covariates Z are generated from a zero-mean, unit variance Gaussian with correlation of 0.5 for all pairs. Treatment X is generated by first sampling a function fi(zi) for every covariate from a Gaussian process, summing over 1 ≤i ≤25 and adding Gaussian noise. Outcome Y is generated by first sampling linear coefficients and one intercept to weight the contribution of confounders Z, and then passing the linear combination through a quadratic function. The dose-response function of X on Y is generated as a polynomial, which is added to the contribution of Z and a Gaussian error. In this way, it is easy to obtain the dose-response function analytically. Besides varying M, we vary the setup in three other aspects: first, the dose-response is either a quadratic or cubic polynomial; second, the contribution of X is scaled to have its minimum and maximum value spam either 50% or 80% of the range of all other causes of Y , including the Gaussian noise (a spam of 50% already generates functions of modest impact to the total variability of Y ); third, the actual data given to the algorithm contains only 15 of the 25 confounders. We either discard 10 confounders uniformly at random (the RANDOM setup), or remove the “top 10 strongest” confounders, as measured by how little confounding remains after adjusting for that single covariate alone (the ADVERSARIAL setup). In the interest of space, we provide a fully detailed description of the experimental setup in the Supplementary Material. Code is also provided to regenerate our data and re-run all of these experiments. Evaluation is done in two ways. First, by the normalized absolute difference between an estimate ˆf(x) and the true f(x), averaged over X. The normalization is done by dividing the difference by the gap between the maximum and minimum true values of f(X) within each simulated problem1. The second measure is the log density of each true f(x), averaged over x ∈X, according to the inferred posterior distribution approximated as a Gaussian distribution, with mean and variance estimated by MCMC. We compare our method against: I. a variation of it where a and b are fixed at 1 and 0, so the only randomness is in fobs; II. instead of an affine transformation, we set f(X) = fobs(X) + r(X), 1Data is also normalized to a zero mean, unit variance according to the empirical mean and variance of the observational data, in order to reduce variability across studies. 6 Table 1: For each experiment, we have either quadratic (Q) or cubic (C) ground truth, with a signal range of 50% or 80%, and an interventional sample size of M = 40, 100 and 200. Ei denotes the difference between competitor i and our method regarding mean error, see text for a description of competitors. The mean absolute error for our method is approximately 0.20 for M = 40 and 0.10 for M = 200 across scenarios. Li denotes the difference between our method and competitor i regarding log-likelihood (differences > 10 are ignored, see text). That is, positive values indicate our method is better according to the corresponding criterion. All results are averages over 50 independent simulations, italics indicate statistically significant differences by a two-tailed t-test at level α = 0.05. Q50% RANDOM Q50% ADV Q80% RANDOM Q80% ADV 40 100 200 40 100 200 40 100 200 40 100 200 EI 0.00 0.02 0.01 0.07 0.07 0.05 0.00 0.00 0.01 0.05 0.04 0.03 EII 0.05 0.02 0.01 0.04 0.00 0.00 0.04 0.03 0.02 0.04 0.02 0.00 EIII 0.11 0.07 0.03 0.05 0.01 0.01 0.11 0.06 0.03 0.08 0.03 0.01 LI 2.33 2.31 2.18 7.16 6.68 6.23 0.62 0.53 0.45 2.16 1.79 1.50 LII 0.78 0.28 0.17 0.44 -0.17 -0.16 0.53 0.42 0.20 0.25 0.07 -0.09 LIII > 10 > 10 0.43 > 10 > 10 -0.06 0.74 0.44 0.36 0.33 -0.01 -0.10 C50% RANDOM C50% ADV C80% RANDOM C80% ADV 40 100 200 40 100 200 40 100 200 40 100 200 EI 0.01 0.02 0.03 0.08 0.08 0.07 0.03 0.05 0.05 0.09 0.09 0.08 EII 0.05 0.03 0.02 0.05 0.02 0.01 0.05 0.03 0.02 0.07 0.03 0.02 EIII 0.08 0.04 0.04 0.03 0.04 0.02 0.11 0.06 0.03 0.09 0.05 0.02 LI > 10 > 10 > 10 9.62 9.05 8.68 > 10 > 10 > 10 > 10 > 10 > 10 LII 3.49 0.83 0.41 4.45 0.43 -0.10 1.07 0.64 -0.04 0.96 0.30 0.14 LIII > 10 > 10 > 10 > 10 > 10 > 10 > 10 0.79 0.03 0.45 0.18 -0.03 where r is given a generic squared exponential Gaussian process prior, which is fit by marginal maximum likelihood; III. Gaussian process regression with squared exponential kernel applied to the interventional data only and hyperparameters fitted by marginal likelihood. The idea is that competitors I and II provide sensitivity analysis of whether our more specialized prior is adding value. In particular, competitor II would be closer to the traditional priors used in computer-aided experimental design [2] (but for our specialized Kobs). Results are shown in Table 1, according to the two assessment criteria, using E for average absolute error, and L for average log-likelihood. Our method demonstrated robustness to varying degrees of unmeasured confounding. Compared to Competitor I, the mean obtained without any further affine transformation already provides a competitive estimator of f(X), but this suffers when unmeasured confounding is stronger (ADVERSARIAL setup). Moreover, uncertainty estimates given by Competitor I tend to be overconfident. Competitor II does not make use of our special covariance function for the correction, and tends to be particularly weak against our method in lower interventional sample sizes. In the same line, our advantage over Competitor III starts stronger at M = 40 and diminishes as expected when M increases. Competitor III is particularly bad at lower signal-to-noise ratio problems, where sometimes it is overly confident that f(X) is zero everywhere (hence, we ignore large likelihood discrepancies in our evaluation). This suggests that in order to learn specialized curves for particular subpopulations, where M will invariably be small, an end-to-end model for observational and interventional data might be essential. 4.2 Case Study We consider an adaptation of the study analyzed by [7]. Targeted at premature infants with low birth weight, the Infant Health and Development Program (IHDP) was a study of the efficacy of “educational and family support services and pediatric follow-up offered during the first 3 years of life” [3]. The study originally randomized infants into those that received treatment and those that did not. The outcome variable was an IQ test applied when infants reached 3 years. Within those which received treatment, there was a range of number of days of treatment. That dose level was not randomized, and again we do not have ground truth for the dose-response curve. For our assessment, we fit a dose-response curve using Gaussian processes with Gaussian likelihood function and the back-door adjustment (3) on available covariates. We then use the model to generate independent synthetic “interventional data.” Measured covariates include birth weight, sex, whether the mother smoked during pregnancy, among other factors detailed by [7, 3]. The Supplementary Material goes in detail about the preprocessing, including R/MATLAB scripts to generate the data. The 7 0 50 100 150 200 250 300 350 400 450 70 75 80 85 90 95 100 105 110 115 Treatment X Outcome Y Posterior on dose−response (high school) 0 50 100 150 200 250 300 350 400 450 70 80 90 100 110 120 130 Treatment X Outcome Y Posterior on dose−response (college) 0 50 100 150 200 250 300 350 400 450 70 75 80 85 90 95 100 105 110 115 120 Treatment X Outcome Y Posterior on dose−response (all) (a) (b) (c) Figure 3: An illustration of a problem generated from a model fitted to real data. That is, we generated data from “interventions” simulated from a model that was fitted to an actual study on premature infant development [3], where the dose is the number of days that an infant is assigned to follow a development program and the outcome is an IQ test at age 3. (a) Posterior distribution for the stratum of infants whose mothers had up to some high school education, but no college. The red curve is the posterior mean of our method, and the blue curve the result of Gaussian process fit with interventional data only. (b) Posterior distributions for the infants whose mothers had (some) college education. (c) The combined strata. observational sample contained 347 individuals (corresponding only to those which were eligible for treatment and had no missing outcome variable) and 21 covariates. This sample included 243 infants whose mother attended (some) high school but not college, and 104 with at least some college. We generated 100 synthetic interventional datasets stratified by mother’s education, (some) highschool vs. (some) college. 19 treatment levels were pre-selected (0 to 450 days, increments of 25 days). All variables were standardized to zero mean and unit standard deviation according to the observational distribution per stratum. Two representative simulated studies are shown in Figure 3, depicting dose-response curves which have modest evidence of non-linearity, and differ in range per stratum2. On average, our method improved over the fitting of a Gaussian process with squared exponential covariance function that was given interventional data only. According to the average normalized absolute differences, the improvement was 0.06, 0.07 and 0.08 for the high school, college and combined data, respectively (where error was reduced in 82%, 89% and 91% of the runs, respectively), each in which 10 interventional samples were simulated per treatment level per stratum. 5 Conclusion We introduced a simple, principled way of combining observational and interventional measurements and assessed its accuracy and robustness. In particular, we emphasized robustness to model misspecification and we performed sensitivity analysis to assess the importance of each individual component of our prior, contrasted to off-the-shelf solutions that can be found in related domains [2]. We are aware that many practical problems remain. For instance, we have not discussed at all the important issue of sample selection bias, where volunteers for an interventional study might not come from the same p(Z) distribution as in the observational study. Worse, neither the observational nor the interventional data might come from the population in which we want to enforce a policy learned from the combined data. While these essential issues were ignored, our method can in principle be combined with ways of assessing and correcting for sample selection bias [1]. Moreover, if unmeasured confounding is too strong, one cannot expect to do well. Methods for sensitivity analysis of confounding assumptions [13] can be integrated with our framework. A more thorough analysis of active learning using our approach, particularly in the light of possible model misspecification, is needed as our results in the Supplementary Material only superficially covers this aspect. Acknowledgments Thanks to Jennifer Hill for clarifications about the IHDP data, and Robert Gramacy for several useful discussions. 2We do not claim that these curves represent the true dose-response curves: confounders are very likely to exist, as the dose level was not decided at the beginning of the trial and is likely to have been changed “on the fly” as the infant responded. It is plausible that our covariates cannot reliably account for this feedback effect. 8 References [1] E. Bareinboim and J. Pearl. Causal inference from Big Data: Theoretical foundations and the data-fusion problem. Proceedings of the National Academy of Sciences, in press, 2016. [2] M. J. Bayarri, J. O. Berger, R. Paulo, J. Sacks, J. A. Cafeo, J. Cavendish, C.-H. Lin, and J. Tu. A framework for validation of computer models. Technometrics, 49:138–154, 2007. [3] J. Brooks-Gunn, F. Liaw, and P. Klebanov. Effects of early intervention on cognitive function of low birth weight preterm infants. Journal of Pediatrics, 120:350–359, 1991. [4] A. Damianou and N. D. Lawrence. Deep Gaussian processes. Proceedings of the Sixteenth International Conference on Artificial Intelligence and Statistics (AISTATS), pages 207–215, 2013. [5] J. Ernest and P. Bühlmann. Marginal integration for nonparametric causal inference. Electronic Journal of Statistics, 9:3155–3194, 2015. [6] R. Gramacy and H. K. Lee. Bayesian treed Gaussian process models with an application to computer modeling. Journal of the American Statistical Association, 103:1119–1130, 2008. [7] J. Hill. Bayesian nonparametric modeling for causal inference. Journal of Computational and Graphical Statistics, 20:217–240, 2011. [8] J. Hill and Y.-S. Su. Assessing lack of common support in causal inference using Bayesian nonparametrics: Implications for evaluating the effect of breastfeeding on children’s cognitive outcomes. The Annals of Applied Statistics, 7:1386–1420, 2013. [9] A. Hyttinen, F. Eberhardt, and P. O. Hoyer. Experiment selection for causal discovery. Journal of Machine Learning Research, 14:3041–3071, 2013. [10] F. Liu, M. J. Bayarri, and J. O. Berger. Modularization in Bayesian analysis, with emphasis on analysis of computer models. Bayesian Analysis, 4:119–150, 2009. [11] D. J. C. MacKay. Information-based objective functions for active data selection. Neural Computation, 4:590–604, 1992. [12] D. J. C. MacKay. Bayesian non-linear modelling for the prediction competition. ASHRAE Transactions, 100:1053–1062, 1994. [13] L. C. McCandless, P. Gustafson, and A. R. Levy. Bayesian sensitivity analysis for unmeasured confounding in observational studies. Statistics in Medicine, 26:2331–2347, 2007. [14] S. L. Morgan and C. Winship. Counterfactuals and Causal Inference: Methods and Principles for Social Research. Cambridge University Press, 2014. [15] R. Neal. Slice sampling. The Annals of Statistics, 31:705–767, 2003. [16] J. Pearl. Causality: Models, Reasoning and Inference. Cambridge University Press, 2000. [17] C. Rasmussen and C. Williams. Gaussian Processes for Machine Learning. MIT Press, 2006. [18] J. Robins, M. Sued, Q. Lei-Gomez, and A. Rotnitzky. Comment: Performance of doublerobust estimators when "inverse probability" weights are highly variable. Statistical Science, 22:544–559, 2007. [19] P. Spirtes, C. Glymour, and R. Scheines. Causation, Prediction and Search. Cambridge University Press, 2000. [20] T. VanderWeele and I. Shpitser. A new criterion for confounder selection. Biometrics, 64:1406– 1413, 2011. 9 | 2016 | 406 |
6,335 | Improved Error Bounds for Tree Representations of Metric Spaces Samir Chowdhury Department of Mathematics The Ohio State University Columbus, OH 43210 chowdhury.57@osu.edu Facundo Mémoli Department of Mathematics Department of Computer Science and Engineering The Ohio State University Columbus, OH 43210 memoli@math.osu.edu Zane Smith Department of Computer Science and Engineering The Ohio State University Columbus, OH 43210 smith.9911@osu.edu Abstract Estimating optimal phylogenetic trees or hierarchical clustering trees from metric data is an important problem in evolutionary biology and data analysis. Intuitively, the goodness-of-fit of a metric space to a tree depends on its inherent treeness, as well as other metric properties such as intrinsic dimension. Existing algorithms for embedding metric spaces into tree metrics provide distortion bounds depending on cardinality. Because cardinality is a simple property of any set, we argue that such bounds do not fully capture the rich structure endowed by the metric. We consider an embedding of a metric space into a tree proposed by Gromov. By proving a stability result, we obtain an improved additive distortion bound depending only on the hyperbolicity and doubling dimension of the metric. We observe that Gromov’s method is dual to the well-known single linkage hierarchical clustering (SLHC) method. By means of this duality, we are able to transport our results to the setting of SLHC, where such additive distortion bounds were previously unknown. 1 Introduction Numerous problems in data analysis are formulated as the question of embedding high-dimensional metric spaces into “simpler" spaces, typically of lower dimension. In classical multidimensional scaling (MDS) techniques [18], the goal is to embed a space into two or three dimensional Euclidean space while preserving interpoint distances. Classical MDS is helpful in exploratory data analysis, because it allows one to find hidden groupings in amorphous data by simple visual inspection. Generalizations of MDS exist for which the target space can be a tree metric space—see [13] for a summary of some of these approaches, written from the point of view of metric embeddings. The metric embeddings literature, which grew out of MDS, typically highlights the algorithmic gains made possible by embedding a complicated metric space into a simpler one [13]. The special case of MDS where the target space is a tree has been of interest in phylogenetics for quite some time [19, 5]; the numerical taxonomy problem (NTP) is that of finding an optimal tree embedding for a given metric space (X, dX), i.e. a tree (X, tX) such that the additive distortion, defined as ∥dX −tX∥ℓ∞(X×X), is minimal over all possible tree metrics on X. This problem turns out to be NP-hard [3]; however, a 3-approximation algorithm exists [3], and a variant of this problem, 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. that of finding an optimal ultrametric tree, can be solved in polynomial time [11]. An ultrametric tree is a rooted tree where every point is equidistant from the root—for example, ultrametric trees are the outputs of hierarchical clustering (HC) methods that show groupings in data across different resolutions. A known connection between HC and MDS is that the output ultrametric of single linkage hierarchical clustering (SLHC) is a 2-approximation to the optimal ultrametric tree embedding [16], thus providing a partial answer to the NTP. However, it appears that the existing line of work regarding NTP does not address the question of quantifying the ℓ∞distance between a metric (X, dX) and its optimal tree metric, or even the optimal ultrametric. More specifically, we can ask: Question 1. Given a set X, a metric dX, and an optimal tree metric topt X (or an optimal ultrametric uopt X ), can one find a nontrivial upper bound on ∥dX −topt X ∥ℓ∞(X×X) (resp. ∥dX −uopt X ∥ℓ∞(X×X)) depending on properties of the metric dX? The question of distortion bounds is treated from a different perspective in the discrete algorithms literature. In this domain, tree embeddings are typically described with multiplicative distortion bounds (described in §2) depending on the cardinality of the underlying metric space, along with (typically) pathological counterexamples showing that these bounds are tight [4, 10]. We remark immediately that (1) multiplicative distortion is distinct from the additive distortion encountered in the NTP, and (2) these embeddings are rarely used in machine learning, where HC and MDS methods are the main workhorses. Moreover, such multiplicative distortion bounds do not take two considerations into account: (1) the ubiquitousness of very large data sets means that a bound dependent on cardinality is not desirable, and (2) “nice" properties such as low intrinsic dimensionality or treeness of real-world datasets are not exploited in cardinality bounds. We prove novel additive distortion bounds for two methods of tree embeddings: one into general trees, and one into ultrametric trees. These additive distortion bounds take into account (1) whether the data is treelike, and (2) whether the data has low doubling dimension, which is a measure of its intrinsic dimension. Thus we prove an answer to Question 1 above, namely, that the approximation error made by an optimal tree metric (or optimal ultrametric) can be bounded nontrivially. Remark 1. The trivial upper bound is ∥dX −topt X ∥ℓ∞(X×X) ≤diam(X, dX). To see this, observe that any ultrametric is a tree, and that SLHC yields an ultrametric uX that is bounded above by dX. An overview of our approach. A common measure of treeness is Gromov’s δ-hyperbolicity, which is a local condition on 4-point subsets of a metric space. Hyperbolicity has been shown to be a useful statistic for evaluating the quality of trees in [7]. The starting point for our work is a method used by Gromov to embed metric spaces into trees, which we call Gromov’s embedding [12]. A known result, which we call Gromov’s embedding theorem, is that if every 4-point subset of an n-point metric space is δ-hyperbolic, then the metric space embeds into a tree with ℓ∞distortion bounded above by 2δ log2(2n). The proof proceeds by a linkage argument, i.e. by invoking the definition of hyperbolicity at different scales along chains of points. By virtue of the embedding theorem, one can argue that hyperbolicity is a measure of the “treeness" of a given metric space. It has been shown in [1, 2] that various real-world data sets, such as Internet latencies and biological, social, and collaboration networks are inherently treelike, i.e. have low hyperbolicity. Thus, by Gromov’s result, these real-world data sets can be embedded into trees with additive distortion controlled by their respective cardinalities. The cardinality bound might of course be undesirable, especially for very large data sets such as the Internet. However, it has been claimed without proof in [1] that Gromov’s embedding can yield a 3-approximation to the NTP, independent of [3]. We note that the assumption of a metric input is not apparent in Gromov’s embedding theorem. Moreover, the proof of the theorem does not utilize any metric property. This leads one to hope for bounds where the dependence on cardinality is replaced by a dependence on some metric notion. A natural candidate for such a metric notion is the doubling dimension of a space [15], which has already found applications in learning [17] and algorithm design [15]. In this paper, we present novel upper bounds on the additive distortion of a Gromov embedding, depending only on the hyperbolicity and doubling dimension of the metric space. Our main tool is a stability theorem that we prove using a metric induced by a Voronoi partition. This result is then combined with the results of Gromov’s linkage argument. Both the stability theorem and Gromov’s theorem rely on the embedding satisfying a particular linkage condition, which can be described as follows: for any embedding f : (X, dX) →(X, tX), and any x, x′ ∈X, we have tX(x, x′) = maxc mini Ψ(xi, xi+1), where c = {xi}k i=0 is a chain of points joining x to x′ and Ψ 2 is some function of dX. A dual notion is to flip the order of the max, min operations. Interestingly, under the correct objective function Ψ, this leads to the well-studied notion of SLHC. By virtue of this duality, the arguments of both the stability theorem and the scaling theorem apply in the SLHC setting. We introduce a new metric space statistic that we call ultrametricity (analogous to hyperbolicity), and are then able to obtain novel lower bounds, depending only on doubling dimension and ultrametricity, for the distortion incurred by a metric space when embedding into an ultrametric tree via SLHC. We remark that just by virtue of the duality between Gromov’s embedding and the SLHC embedding, it is possible to obtain a distortion bound for SLHC depending on cardinality. We were unable to find such a bound in the existing HC literature, so it appears that even the knowledge of this duality, which bridges the domains of HC and MDS methods, is not prevalent in the community. The paper is organized as follows. The main thrust of our work is explained in §1. In §2 we develop the context of our work by highlighting some of the surrounding literature. We provide all definitions and notation, including the Voronoi partition construction, in §3. In §4 we describe Gromov’s embedding and present Gromov’s distortion bound in Theorem 3. Our contributions begin with Theorem 4 in §4 and include all the results that follow: namely the stability results in §5, the improved distortion bounds in §6, and the proof of tightness in §7. The supplementary material contains (1) an appendix with proofs omitted from the body, (2) a practical demonstration in §A where we apply Gromov’s embedding to a bitmap image of a tree and show that our upper bounds perform better than the bounds suggested by Gromov’s embedding theorem, and (3) Matlab .m files containing demos of Gromov’s embedding being applied to various images of trees. 2 Related Literature MDS is explained thoroughly in [18]. In metric MDS [18] one attempts to find an embedding of the data X into a low dimensional Euclidean space given by a point cloud Y ⊂Rd (where often d = 2 or d = 3) such that the metric distortion (measured by the Frobenius norm of the difference of the Gram matrices of X and Y ) is minimized. The most common non-metric variant of MDS is referred to as ordinal embedding, and has been studied in [14]. A common problem with metric MDS is that when the intrinsic dimension of the data is higher than the embedding dimension, the clustering in the original data may not be preserved [21]. One variant of MDS that preserves clusters is the tree preserving embedding [20], where the goal is to preserve the single linkage (SL) dendrogram from the original data. This is especially important for certain types of biological data, for the following reasons: (1) due to speciation, many biological datasets are inherently “treelike", and (2) the SL dendrogram is a 2-approximation to the optimal ultrametric tree embedding [16], so intuitively, preserving the SL dendrogram preserves the “treeness" of the data. Preserving the treeness of a metric space is related to the notion of finding an optimal embedding into a tree, which ties back to the numerical taxonomy problem. The SL dendrogram is an embedding of a metric space into an ultrametric tree, and can be used to find the optimal ultrametric tree [8]. The quality of an embedding is measured by computing its distortion, which has different definitions in different domain areas. Typically, a tree embedding is defined to be an injective map f : X →Y between metric spaces (X, dX) and (Y, tY ), where the target space is a tree. We have defined the additive distortion of a tree embedding in an ℓ∞setting above, but ℓp notions, for p ∈[1, ∞), can also be defined. Past efforts to embed a metric into a tree with low additive distortion are described in [19, Chapter 7]. One can also define a multiplicative distortion [4, 10], but this is studied in the domain of discrete algorithms and is not our focus in the current work. 3 Preliminaries on metric spaces, distances, and doubling dimension A finite metric space (X, dX) is a finite set X together with a function dX : X × X →R+ such that: (1) dX(x, x′) = 0 ⇐⇒ x = x′, (2) dX(x, x′) = dX(x′, x), and (3) dX(x, x′) ≤ dX(x, x′′) + dX(x′′, x′) for any x, x′, x′′ ∈X. A pointed metric space is a triple (X, dX, p), where (X, dX) is a finite metric space and p ∈X. All the spaces we consider are assumed to be finite. 3 For a metric space (X, dX), the diameter is defined to be diam(X, dX) := maxx,x′∈X dX(x, x′). The hyperbolicity of (X, dX) was defined by Gromov [12] as follows: hyp(X, dX) := max x1,x2,x3,x4∈X Ψhyp X (x1, x2, x3, x4), where Ψhyp X (x1, x2, x3, x4) : = 1 2 dX(x1, x2) + dX(x3, x4) −max dX(x1, x3) + dX(x2, x4), dX(x1, x4) + dX(x2, x3) . A tree metric space (X, tX) is a finite metric space such that hyp(X, tX) = 0 [19]. In our work, we strengthen the preceding characterization of trees to the special class of ultrametric trees. Recall that an ultrametric space (X, uX) is a metric space satisfying the strong triangle inequality: uX(x, x′) ≤max(uX(x, x′′), uX(x′′, x′)), ∀x, x′, x′′ ∈X. Definition 1. We define the ultrametricity of a metric space (X, dX) as: ult(X, dX) := max x1,x2,x3∈X Ψult X (x1, x2, x3), where Ψult X (x1, x2, x3) := dX(x1, x3) −max dX(x1, x2), dX(x2, x3) . We introduce ultrametricity to quantify the deviation of a metric space from being ultrametric. Notice that (X, uX) is an ultrametric space if and only if ult(X, uX) = 0. One can verify that an ultrametric space is a tree metric space. We will denote the cardinality of a set X by writing |X|. Given a set X and two metrics dX, d′ X defined on X × X, we denote the ℓ∞distance between dX and d′ X as follows: ∥dX −d′ X∥ℓ∞(X×X) := max x,x′∈X |dX(x, x′) −d′ X(x, x′)|. We use the shorthand ∥dX−d′ X∥∞to mean ∥dX−d′ X∥ℓ∞(X×X). We write ≈to mean “approximately equal to." Given two functions f, g : N →R, we will write f ≍g to mean asymptotic tightness, i.e. that there exist constants c1, c2 such that c1|f(n)| ≤|g(n)| ≤c2|f(n)| for sufficiently large n ∈N. Induced metrics from Voronoi partitions. A key ingredient of our stability result involves a Voronoi partition construction. Given a metric space (X, dX) and a subset A ⊆X, possibly with its own metric dA, we can define a new metric dA X on X × X using a Voronoi partition. First write A = {x1, . . . , xn}. For each 1 ≤i ≤n, we define eVi := {x ∈X : dX(x, xi) ≤minj̸=i dX(x, xj)} . Then X = Sn i=1 eVi. Next we perform the following disjointification trick: V1 := eV1, V2 := eV2 \ eV1, . . . , Vn := eVn \ n−1 [ i=1 eVi . Then X = Fn i=1 Vi, a disjoint union of Voronoi cells Vi. Next define the nearest-neighbor map η : X →A by η(x) = xi for each x ∈Vi. The map η simply sends each x ∈X to its closest neighbor in A, up to a choice when there are multiple nearest neighbors. Then we can define a new (pseudo)metric dA X : X × X →R+ as follows: dA X(x, x′) := dA(η(x), η(x′)). Observe that dA X(x, x′) = 0 if and only if x, x′ ∈Vi for some 1 ≤i ≤n. Symmetry also holds, as does the triangle inequality. A special case of this construction occurs when A is an ε-net of X endowed with a restriction of the metric dX. Given a finite metric space (X, dX), an ε-net is a subset Xε ⊂X such that: (1) for any x ∈X, there exists s ∈Xε such that dX(x, s) < ε, and (2) for any s, s′ ∈Xε, we have dX(s, s′) ≥ε [15]. For notational convenience, we write dε X to refer to dXε X . In this case, we obtain: ∥dX −dε X∥ℓ∞(X×X) = max x,x′∈X dX(x, x′) −dε X(x, x′) = max 1≤i,j≤n max x∈Vi,x′∈Vj dX(x, x′) −dε X(x, x′) = max 1≤i,j≤n max x∈Vi,x′∈Vj dX(x, x′) −dX(xi, xj) ≤ max 1≤i,j≤n max x∈Vi,x′∈Vj dX(x, xi) + dX(x′, xj) ≤2ε. (1) 4 Covering numbers and doubling dimension. For a finite metric space (X, dX), the open ball of radius ε centered at x ∈X is denoted B(x, ε). The ε-covering number of (X, dX) is defined as: NX(ε) := min n ∈N : X ⊂ n [ i=1 B(xi, ε) for x1, . . . , xn ∈X . Notice that the ε-covering number of X is always bounded above by the cardinality of an ε-net. A related quantity is the doubling dimension ddim(X, dX) of a metric space (X, dX), which is defined to be the minimal value ρ such that any ε-ball in X can be covered by at most 2ρ ε/2-balls [15]. The covering number and doubling dimension of a metric space (X, dX) are related as follows: Lemma 2. Let (X, dX) be a finite metric space with doubling dimension bounded above by ρ > 0. Then for all ε ∈(0, diam(X)], we have NX(ε) ≤ 8 diam(X)/ε ρ. 4 Duality between Gromov’s embedding and SLHC Given a metric space (X, dX) and any two points x, x′ ∈X, we define a chain from x to x′ over X as an ordered set of points in X starting at x and ending at x′: c = {x0, x1, x2, . . . , xn : x0 = x, xn = x′, xi ∈X for all 0 ≤i ≤n} . The set of all chains from x to x′ over X will be denoted CX(x, x′). The cost of a chain c = {x0 . . . , xn} over X is defined to be costX(c) := max0≤i<n dX(xi, xi+1). For any metric space (X, dX) and any p ∈X, the Gromov product of X with respect to p is a map gX,p : X × X →R+ defined by: gX,p(x, x′) := 1 2 dX(x, p) + dX(x′, p) −dX(x, x′) . We can define a map gT X,p : X × X →R+ as follows: gT X,p(x, x′)p := max c∈CX(x,x′) min xi,xi+1∈c gX,p(xi, xi+1). This induces a new metric tX,p : X × X →R+: tX,p(x, x′) := dX(x, p) + dX(x′, p) −2gT X,p(x, x′). Gromov observed that the space (X, tX,p) is a tree metric space, and that tX,p(x, x′) ≤dX(x, x′) for any x, x′ ∈X [12]. This yields the trivial upper bound: ∥dX −tX∥∞≤diam(X, dX). The Gromov embedding T is defined for any pointed metric space (X, dX, p) as T (X, dX, p) := (X, tX,p). Note that each choice of p ∈X will yield a tree metric tX,p that depends, a priori, on p. Theorem 3 (Gromov’s embedding theorem [12]). Let (X, dX, p) be an n-point pointed metric space, and let (X, tX,p) = T (X, dX, p). Then, ∥tX,p −dX∥l∞(X×X) ≤2 log2(2n) hyp(X, dX). Gromov’s embedding is an MDS method where the target is a tree. We observe that its construction is dual—in the sense of swapping max and min operations—to the construction of the ultrametric space produced as an output of SLHC. Recall that the SLHC method H is defined for any metric space (X, dX) as H(X, dX) = (X, uX), where uX : X × X →R+ is the ultrametric defined below: uX(x, x′) := min c∈CX(x,x′) costX(c). As a consequence of this duality, we can bound the additive distortion of SLHC as below: Theorem 4. Let (X, dX) be an n-point metric space, and let (X, uX) = H(X, dX). Then we have: ∥dX −uX∥ℓ∞(X×X) ≤log2(2n) ult(X, dX). Moreover, this bound is asymptotically tight. The proof of Theorem 4 proceeds by invoking the definition of ultrametricity at various scales along chains of points; we provide details in Appendix B. We remark that the bounds in Theorems 3, 4 depend on both a local (ultrametricity/hyperbolicity) and a global property (cardinality); however, a natural improvement would be to exploit a global property that takes into account the metric structure of the underlying space. The first step in this improvement is to prove a set of stability theorems. 5 5 Stability of SLHC and Gromov’s embedding It is known that SLHC is robust to small perturbations of the input data with respect to the GromovHausdorff distance between metric spaces, whereas other HC methods, such as average linkage and complete linkage, do not enjoy this stability [6]. We prove a particular stability result for SLHC involving the ℓ∞distance, and then we exploit the duality observed in §4 to prove a similar stability result for Gromov’s embedding. Theorem 5. Let (X, dX) be a metric space, and let (A, dA) be any subspace with the restriction metric dA := dX|A×A. Let H denote the SLHC method. Write (X, uX) = H(X, dX) and (A, uA) = H(A, dA). Also write uA X(x, x′) := uA(η(x), η(x′)) for x, x′ ∈X. Then we have: ∥H(X, dX) −H(A, dA)∥∞:= ∥uX −uA X∥∞≤∥dX −dA X∥∞. Theorem 6. Let (X, dX, p) be a pointed metric space, and let (A, dA, a) be any subspace with the restriction metric dA := dX|A×A such that η(p) = a. Let T denote the Gromov embedding. Write (X, tX,p) = T (X, dX, p) and (A, tA,a) = T (A, dA, a). Also write tA X,p(x, x′) := tA,a(η(x), η(x′)) for x, x′ ∈X. Then we have: ∥T (X, dX, p) −T (A, dA, a)∥∞:= ∥tX,p −tA X,p∥∞≤5∥dX −dA X∥∞. The proofs for both of these results use similar techniques, and we present them in Appendix B. 6 Improvement via Doubling Dimension Our main theorems, providing additive distortion bounds for Gromov’s embedding and for SLHC, are stated below. The proofs for both theorems are similar, so we only present that of the former. Theorem 7. Let (X, dX) be a n-point metric space with doubling dimension ρ, hyperbolicity hyp(X, dX) = δ, and diameter D. Let p ∈X, and write (X, tX) = T (X, dX, p). Then we obtain: Covering number bound: ∥dX −tX∥∞≤ min ε∈(0,D] 12ε + 2δ log2(2NX(ε)) . (2) Also suppose D ≥ δρ 6 ln 2. Then, Doubling dimension bound: ∥dX −tX∥∞≤2δ + 2δρ 13 2 + log2 D δρ . (3) Theorem 8. Let (X, dX) be a n-point metric space with doubling dimension ρ, ultrametricity ult(X, dX) = ν, and diameter D. Write (X, uX) = H(X, dX). Then we obtain: Covering number bound: ∥dX −uX∥∞≤ min ε∈(0,D] 4ε + ν log2(2NX(ε)) . (4) Also suppose D ≥ νρ 4 ln 2. Then, Doubling dimension bound: ∥dX −uX∥∞≤ν + νρ 6 + log2 D νρ . (5) Remark 9 (A remark on the NTP). We are now able to return to Question 1 and provide some answers. Consider a metric space (X, dX). We can upper bound ∥dX −uopt X ∥∞using the bounds in Theorem 8, and ∥dX −topt X ∥∞using the bounds in Theorem 7. Remark 10 (A remark on parameters). Notice that as hyperbolicity δ approaches 0 (or ultrametricity approaches 0), the doubling dimension bounds (hence the covering number bounds) approach 0. Also note that as ε ↓0, we get NX(ε) ↑|X|, so Theorems 7,8 reduce to Theorems 3,4. Experiments lead us to believe that the interesting range of ε values is typically a subinterval of (0, D]. Proof of Theorem 7. Fix ε ∈(0, D] and let Xε = {x1, x2, ..., xk} be a collection of k = NX(ε) points that form an ε-net of X. Then we may define dε X and tε X on X × X as in §3. Subsequent application of Theorem 3 and Lemma 2 gives the bound ∥dε X −tε X∥ℓ∞(X×X) ≤∥dXε −tXε∥ℓ∞(Xε×Xε) ≤2δ log2(2k) ≤2δ log2(2Cε−ρ), 6 where we define C := (8D)ρ. Then by the triangle inequality for the ℓ∞distance, the stability of T (Theorem 6), and using the result that ∥dX −dε X∥ℓ∞(X×X) ≤2ε (Inequality 1), we get: ∥dX −tX∥∞≤∥dX −dε X∥∞+ ∥dε X −tε X∥∞+ ∥tε X −tX∥∞ ≤6∥dX −dε X∥∞+ ∥dε X −tε X∥∞ ≤12ε + 2δ log2(2NX(ε)). Since ε ∈(0, D] was arbitrary, this suffices to prove Inequality 2. Applying Lemma 2 yields: ∥dX −tX∥∞≤12ε + 2δ log2(2Cε−ρ). Notice that Cε−ρ ≥NX(ε) ≥1, so the term on the right of the inequality above is positive. Consider the function f(ε) = 12ε + 2δ + 2δ log2 C −2δρ log2 ε. The minimizer of this function is obtained by taking a derivative with respect to ε: f ′(ε) = 12 −2δρ ε ln 2 = 0 =⇒ε = δρ 6 ln 2. Since ε takes values in (0, D], and limε→0 f(ε) = +∞, the value of f(ε) is minimized at min(D, δρ 6 ln 2). By assumption, D ≥ δρ 6 ln 2. Since ∥dX −tX∥∞≤f(ε) for all ε ∈(0, D], it follows that: ∥dX −tX∥∞≤f δρ 6 ln 2 = 2δρ ln 2 +2δ+2δρ log2 48D ln 2 δρ ≤2δ+2δρ 13 2 + log2 D δρ . 7 Tightness of our bounds in Theorems 7 and 8 By the construction provided below, we show that our covering number bound for the distortion of SLHC is asymptotically tight. A similar construction can be used to show that our covering number bound for Gromov’s embedding is also asymptotically tight. Proposition 11. There exists a sequence (Xn, dXn)n∈N of finite metric spaces such that as n →∞, ∥dXn −uXn∥∞≍ min ε∈(0,Dn] 4ε + νn log2(2NXn(ε)) →0. Here we have written (Xn, uXn) = H(Xn, dXn), νn = ult(Xn, dXn), and Dn = diam(Xn, dXn). Proof of Proposition 11. After defining Xn for n ∈N below, we will denote the error term, our covering number upper bound, and our Gromov-style upper bound as follows: En := ∥dXn −uXn∥∞, Bn := min ε∈(0,Dn] ρ(n, ε), Gn := log2(2|Xn|) ult(Xn, dXn), where ρ : N × [0, ∞) →R is defined by ρ(n, ε) = 4ε + νn log2(2NXn(ε)). Here we write |S| to denote the cardinality of a set S. Recall that the separation of a finite metric space (X, dX) is the quantity sep(X, dX) := minx̸=x′∈X dX(x, x′). Let (V, uV ) be the finite ultrametric space consisting of two equidistant points with common distance 1. For each n ∈N, let Ln denote the line metric space obtained by choosing (n + 1) equally spaced points with separation 1 n2 from the interval [0, 1 n], and endowing this set with the restriction of the Euclidean metric, denoted dLn. One can verify that ult(Ln, dLn) ≈ 1 2n. Finally, for each n ∈N we define Xn := V × Ln, and endow Xn with the following metric: dXn (v, l), (v′, l′) := max dV (v, v′), dLn(l, l′) , v, v′ ∈V, l, l′ ∈Ln. Claim 1. ult(Xn, dXn) = ult(Ln, dLn) ≈ 1 2n. For a proof, see Appendix B. Claim 2. En ≍diam(Ln, dLn) = 1 n. To see this, let n ∈N, and let x = (v, l), x′ = (v′, l′) ∈Xn be two points realizing En. Suppose first that v = v′. Then an optimal chain from (v, l), (v, l′) only 7 has to incur the cost of moving along the Ln coordinate. As such, we obtain uXn(x, x′) ≤ 1 n2 , with equality if and only if l ̸= l′. Then, En = max x,x′∈Xn |dXn(x, x′) −uXn(x, x′)| = max l,l′∈Ln |dLn(l, l′) − 1 n2 | = 1 n − 1 n2 ≍1 n. Note that the case v ̸= v′ is not allowed, because then we would obtain dXn(x, x′) = dV (v, v′) = uXn(x, x′), since sep(V, dV ) ≥diam(Ln, dLn) and all the points in V are equidistant. Thus we would obtain |dXn(x, x′) −uXn(x, x′)| = 0, which is a contradiction because we assumed that x, x′ realize En. Claim 3. For each n ∈N, ε ∈(0, Dn], we have: NXn(ε) = NV (ε) : ε > sep(V, dV ), |V | : diam(Ln, dLn) < ε ≤sep(V, dV ), |V |NLn(ε) : ε ≤diam(Ln, dLn). To see this, note that in the first two cases, any ε-ball centered at a point (v, l) automatically contains all of {v} × Ln, so NXn(ε) = NV (ε). Specifically in the range diam(Ln, dLn) < ε ≤sep(V, dV ), we need exactly one ε-ball for each v ∈V to cover Xn. Finally in the third case, we need NLn(ε) ε-balls to cover {v} × Ln for each v ∈V . This yields the stated estimate. By the preceding claims, we now have the following for each n ∈N, ε ∈(0, Dn]: ρ(n, ε) ≈4ε + 1 2n log2(2NXn(ε)) = 4ε + 1 2n log2(2NV (ε)) : ε > sep(V ), 4ε + 1 2n log2(2|V |) : diam(Ln) < ε ≤sep(V ), 4ε + 1 2n log2(2|V |NLn(ε)) : ε ≤diam(Ln). Notice that for sufficiently large n, infε>diam(Ln) ρ(n, ε) = ρ(n, 1 n). Then we have: 1 n ≤En ≤Bn = min ε∈(0,Dn] ρ(n, ε) ≤ρ(n, 1 n) ≈C n , for some constant C > 0. Here the first inequality follows from the proof of Claim 2, the second from Theorem 8, and the third from our observation above. It follows that En ≍Bn ≍1 n →0. Remark 12. Given the setup of the preceding proof, note that the Gromov-style bound behaves as: Gn = ρ(n, 0) = 1 2n log2(2|V |(n + 1)) ≈C′ log2(n+1) n , for some constant C′ > 0. So Gn approaches 0 at a rate strictly slower than that of En and Bn. 8 Discussion We are motivated by a particular aspect of the numerical taxonomy problem, namely, the distortion incurred when passing from a metric to its optimal tree embedding. We describe and explore a duality between a tree embedding method proposed by Gromov and the well known SLHC method for embedding a metric space into an ultrametric tree. Motivated by this duality, we propose a novel metric space statistic that we call ultrametricity, and give a novel, tight bound on the distortion of the SLHC method depending on cardinality and ultrametricity. We improve this Gromov-style bound by replacing the dependence on cardinality by a dependence on doubling dimension, and produce a family of examples proving tightness of this dimension-based bound. By invoking duality again, we are able to improve Gromov’s original bound on the distortion of his tree embedding method. More specifically, we replace the dependence on cardinality—a set-theoretic notion—by a dependence on doubling dimension, which is truly a metric notion. Through Proposition 11, we are able to prove that our bound is not just asymptotically tight, but that it is strictly better than the corresponding Gromov-style bound. Indeed, Gromov’s bound can perform arbitrarily worse than our dimension-based bound. We construct an explicit example to verify this claim in Appendix A, Remark 14, where we also provide a practical demonstration of our methods. 8 References [1] Ittai Abraham, Mahesh Balakrishnan, Fabian Kuhn, Dahlia Malkhi, Venugopalan Ramasubramanian, and Kunal Talwar. Reconstructing approximate tree metrics. In Proceedings of the 26th annual ACM symposium on Principles of distributed computing. ACM, 2007. [2] Muad Abu-Ata and Feodor F. Dragan. Metric tree-like structures in real-life networks: an empirical study. arXiv preprint arXiv:1402.3364, 2014. [3] Richa Agarwala, Vineet Bafna, Martin Farach, Mike Paterson, and Mikkel Thorup. On the approximability of numerical taxonomy (fitting distances by tree metrics). SIAM Journal on Computing, 28(3):1073–1085, 1998. [4] Yair Bartal. Probabilistic approximation of metric spaces and its algorithmic applications. In Foundations of Computer Science. IEEE, 1996. [5] Jean-Pierre Barthélemy and Alain Guénoche. Trees and proximity representations. 1991. [6] Gunnar Carlsson and Facundo Mémoli. Characterization, stability and convergence of hierarchical clustering methods. The Journal of Machine Learning Research, 2010. [7] John Chakerian and Susan Holmes. Computational tools for evaluating phylogenetic and hierarchical clustering trees. Journal of Computational and Graphical Statistics, 2012. [8] Victor Chepoi and Bernard Fichet. ℓ∞approximation via subdominants. Journal of mathematical psychology, 44(4):600–616, 2000. [9] Michel Marie Deza and Elena Deza. Encyclopedia of distances. Springer, 2009. [10] Jittat Fakcharoenphol, Satish Rao, and Kunal Talwar. A tight bound on approximating arbitrary metrics by tree metrics. In Proceedings of the thirty-fifth annual ACM symposium on Theory of computing, pages 448–455. ACM, 2003. [11] Martin Farach, Sampath Kannan, and Tandy Warnow. A robust model for finding optimal evolutionary trees. Algorithmica, 13(1-2):155–179, 1995. [12] Mikhael Gromov. Hyperbolic groups. Springer, 1987. [13] Piotr Indyk and Jiri Matousek. Low-distortion embeddings of finite metric spaces. in in handbook of discrete and computational geometry, pages 177–196, 2004. [14] Matthäus Kleindessner and Ulrike von Luxburg. Uniqueness of ordinal embedding. In COLT, pages 40–67, 2014. [15] Robert Krauthgamer and James R Lee. Navigating nets: simple algorithms for proximity search. In Proceedings of the fifteenth annual ACM-SIAM symposium on Discrete algorithms, pages 798–807. Society for Industrial and Applied Mathematics, 2004. [16] Mirko Krivanek. The complexity of ultrametric partitions on graphs. Information processing letters, 27(5):265–270, 1988. [17] Yi Li and Philip M. Long. Learnability and the doubling dimension. In Advances in Neural Information Processing Systems, pages 889–896, 2006. [18] Kantilal Varichand Mardia, John T. Kent, and John M. Bibby. Multivariate analysis. 1980. [19] Charles Semple and Mike A. Steel. Phylogenetics, volume 24. Oxford University Press on Demand, 2003. [20] Albert D. Shieh, Tatsunori B. Hashimoto, and Edoardo M. Airoldi. Tree preserving embedding. Proceedings of the National Academy of Sciences of the United States of America, 108(41):16916–16921, 2011. [21] Laurens Van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of Machine Learning Research, 9(2579-2605):85, 2008. 9 | 2016 | 407 |
6,336 | A Bayesian method for reducing bias in neural representational similarity analysis Ming Bo Cai Princeton Neuroscience Institute Princeton University Princeton, NJ 08544 mcai@princeton.edu Nicolas W. Schuck Princeton Neuroscience Institute Princeton University Princeton, NJ 08544 nschuck@princeton.edu Jonathan W. Pillow Princeton Neuroscience Institute Princeton University Princeton, NJ 08544 pillow@princeton.edu Yael Niv Princeton Neuroscience Institute Princeton University Princeton, NJ 08544 yael@princeton.edu Abstract In neuroscience, the similarity matrix of neural activity patterns in response to different sensory stimuli or under different cognitive states reflects the structure of neural representational space. Existing methods derive point estimations of neural activity patterns from noisy neural imaging data, and the similarity is calculated from these point estimations. We show that this approach translates structured noise from estimated patterns into spurious bias structure in the resulting similarity matrix, which is especially severe when signal-to-noise ratio is low and experimental conditions cannot be fully randomized in a cognitive task. We propose an alternative Bayesian framework for computing representational similarity in which we treat the covariance structure of neural activity patterns as a hyperparameter in a generative model of the neural data, and directly estimate this covariance structure from imaging data while marginalizing over the unknown activity patterns. Converting the estimated covariance structure into a correlation matrix offers a much less biased estimate of neural representational similarity. Our method can also simultaneously estimate a signal-to-noise map that informs where the learned representational structure is supported more strongly, and the learned covariance matrix can be used as a structured prior to constrain Bayesian estimation of neural activity patterns. Our code is freely available in Brain Imaging Analysis Kit (Brainiak) (https://github.com/IntelPNI/brainiak). 1 Neural pattern similarity as a way to understand neural representations Understanding how patterns of neural activity relate to internal representations of the environment is one of the central themes of both system neuroscience and human neural imaging [20, 5, 7, 15]. One can record neural responses (e.g. by functional magnetic resonance imaging; fMRI) while participants observe sensory stimuli, and in parallel, build different computational models to mimic the brain’s encoding of these stimuli. Neural activity pattern corresponding to each feature of an encoding model can then be estimated from the imaging data. Such activity patterns can be used to decode the perceived content with respect to the encoding features from new imaging data. The degree to which stimuli can be decoded from one brain area based on different encoding models informs us of the type of information represented in that area. For example, an encoding model based on motion energy in visual stimuli captured activity fluctuations from visual cortical areas V1 to V3, 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. and was used to successfully decode natural movie watched during an fMRI scan [14]. In contrast, encoding models based on semantic categories can more successfully decode information from higher level visual cortex [7]. While the decoding performance of different encoding models informs us of the type of information represented in a brain region, it does not directly reveal the structure of the representational space in that area. Such structure is indexed by how distinctively different contents are represented in that region [21, 4]. Therefore, one way to directly quantify the structure of the representational space in the neural population activity is to estimate the neural activity pattern elicited by each sensory stimulus, and calculate the similarity between the patterns corresponding to each pair of stimuli. This analysis of pair-wise similarity between neural activity patterns to different stimuli was named Representational Similarity Analysis (RSA) [11]. In fact, one of the earliest demonstrations of decoding from fMRI data was based on pattern similarity [7]. RSA revealed that the representational structures in the inferotemporal (IT) cortex of natural objects are highly similar between human and monkey [12] and a continuum in the abstract representation of biological classes exist in human ventral object visual cortex [2]. Because the similarity structure can be estimated from imaging data even without building an encoding model, RSA allows not only for model testing (by comparing the similarity matrix of neural data with the similarity matrix of the feature vectors when stimuli are represented with an encoding model) but also for exploratory study (e.g., by projecting the similarity structure to a low-dimensional space to visualize its structure, [11]). Therefore, originally as a tool for studying visual representations [2, 16, 10], RSA has recently attracted neuroscientists to explore the neural representational structure in many higher level cognitive areas [23, 18]. 2 Structured noise in pattern estimation translates into bias in RSA Although RSA is gaining popularity, a few recent studies revealed that in certain circumstances the similarity structure estimated by standard RSA might include a significant bias. For example, the estimated similarity between fMRI patterns of two stimuli is much higher when the stimuli are displayed closer in time [8]. This dependence of pattern similarity on inter-stimulus interval was hypothesized to reflect "temporal drift of pattern"[1], but we believe it may also be due to temporal autocorrelation in fMRI noise. Furthermore, we applied RSA to a dataset from a structured cognitive task (Fig 1A) [19] and found that the highly structured representational similarity matrix obtained from the neural data (Fig 1B,C) is very similar to the matrix obtained when RSA is applied to pure white noise (Fig 1D). Since no task-related similarity structure should exist in white noise while the result in Fig 1D is replicable from noise, this shows that the standard RSA approach can introduce similarity structure not present in the data. We now provide an analytical derivation to explain the source of both types of bias (patterns closer in time are more similar and spurious similarity emerges from analyzing pure noise). It is notable that almost all applications of RSA explicitly or implicitly assume that fMRI responses are related to task-related events through a general linear model (GLM): Y = X · β + ϵ. (1) Here, Y ∈RnT ×nS is the fMRI time series from an experiment with nT time points from nS brain voxels. The experiment involves nC different conditions (e.g., different sensory stimuli, task states, or mental states), each of which comprises events whose onset time and duration is either controlled by the experimenter, or can be measured experimentally (e.g., reaction times). In fMRI, the measured blood oxygen-level dependent (BOLD) response is protracted, such that the response to condition c is modelled as the time course of events in the experimental condition sc(t) convolved with a typical hemodynamic response function (HRF) h(t). Importantly, each voxel can respond to different conditions with different amplitudes β ∈RnC×nS, and the responses to all conditions are assumed to contribute linearly to the measured signal. Thus, denoting the matrix of HRF-convolved event time courses for each task condition with X ∈RnT ×nC, often called the design matrix, the measured Y is assumed to be a linear sum of X weighted by response amplitude β plus zero-mean noise. Each row of β is the spatial response pattern (i.e., the response across voxels) to an experimental condition. The goal of RSA is therefore to estimate the similarity between the rows of β. Because β is unknown, pattern similarity is usually calculated based on ordinary least square estimation of β: ˆβ = (XT X)−1XT Y, and then using Pearson correlation of ˆβ to measure similarity. Because 2 A Markovian state transition C Low-dimensional projection Internal Enter Exit B Similarity in brain Enter Internal Exit D “Similarity” from noise Figure 1: Standard RSA introduces bias structure to the similarity matrix. (A) A cognitive task that includes 16 different experimental conditions. Transitions between conditions follow a Markov process. Arrows indicate possible transitions, each with p = 0.5. The task conditions can be grouped to 3 categories (color coded) according to the semantics, or mental operations, required in each condition (the exact meaning of these conditions is not relevant to this paper). (B) Standard RSA of activity patterns corresponding to each condition estimated from a region of interest (ROI) reveal a highly structured similarity matrix. (C) Converting the similarity matrix C to a distance matrix 1 −C and projecting it to a low-dimensional space using multi-dimensional scaling [13] reveals a highly regular structure. Seeing such a result, one may infer that representational structure in the ROI is strongly related to the semantic meanings of the task conditions. (D) However, a very similar similarity matrix can also be obtained if one applies standard RSA to pure white noise, with a similar low-dimensional projection (not shown). This indicates that standard RSA can introduce spurious structure in the resulting similarity matrix that does not exist in the data. calculating sample correlation implies the belief that there exists an underlying covariance structure of β, we examine the source of bias by focusing on the covariance of ˆβ compared to that of true β. We assume β of all voxels in the ROI are indeed random vectors generated from a multivariate Gaussian distribution N(0, U) (the size of U being nC × nC). If one knew the true U, similarity measures such as correlation could be derived from it. Substituting the expression Y from equation 1 we have ˆβ = β + (XT X)−1XT ϵ. We assume that the signal β is independent from the noise ϵ, and therefore also independent from its linear transformation (XT X)−1XT ϵ. Thus the covariance of ˆβ is the sum of the true covariance of β and the covariance of (XT X)−1XT ϵ: ˆβ ∼N(0, U + (XT X)−1XT ΣϵX(XT X)−1) (2) Where Σϵ ∈RnT ×nT is the temporal covariance of the noise ϵ (for illustration purposes, in this section we assume that all voxels have the same noise covariance). The term (XT X)−1XT ΣϵX(XT X)−1 is the source of the bias. Since the covariance of ˆβ has this bias term adding to U which we are interested in, their sample correlation is also biased. So are many other similarity measures based on ˆβ, such as Eucledian distance. 3 The bias term (XT X)−1XT ΣϵX(XT X)−1 depends on both the design matrix and the properties of the noise. It is well known that autocorrelation exists in fMRI noise [24, 22]. Even if we assume that the noise is temporally independent (i.e., Σϵ is a diagonal matrix, which may be a valid assumption if one "pre-whitens" the data before further analysis [22]), the bias structure still exists but reduces to (XT X)−1σ2, where σ2 is the variance of the noise. Diedrichsen et al. [6] realized that the noise in ˆβ could contribute to a bias in the correlation matrix but assumed the bias is only in the diagonal of the matrix. However, the bias is a diagonal matrix only if the columns of X (hypothetical fMRI response time courses to different conditions) are orthogonal to each other and if the noise has no autocorrelation. This is rarely the case for most cognitive tasks. In the example in Figure 1A, the transitions between experimental conditions follow a Markov process such that some conditions are always temporally closer than others. Due to the long-lasting HRF, conditions of temporal proximity will have higher correlation in their corresponding columns in X. Such correlation structure in X is the major determinant of the bias structure in this case. On the other hand, if each single stimulus is modelled as a condition in X and regularization is used during regression, the correlation between ˆβ of temporally adjacent stimuli is higher primarily because of the autocorrelation property of the noise. This can be the major determinant of the bias structure in cases such as [8]. It is worth noting that the magnitude of bias is larger relative to the true covariance structure U when the signal-to-noise ratio (SNR) is lower, or when X has less power (i.e., there are few repetitions of each condition, thus few measurements of the related neural activity), as illustrated later in Figure 2B. The bias in RSA was not noticed until recently [1, 8], probably because RSA was initially applied to visual tasks in which stimuli are presented many times in a well randomized order. Such designs made the bias structure close to a diagonal matrix and researchers typically only focus on off-diagonal elements of a similarity matrix. In contrast, the neural signals in higher-level cognitive tasks are typically weaker than those in visual tasks [9]. Moreover, in many decision-making and memory studies the orders of different task conditions cannot be fully counter-balanced. Therefore, we expect the bias in RSA to be much stronger and highly structured in these cases, misleading researchers and hiding the true (but weaker) representational structure in the data. One alternative to estimating ˆβ using regression as above, is to perform RSA on the raw conditionaveraged fMRI data (for instance, taking the average signal ∼6 sec after the onset of an event as a proxy for ˆβ). This is equivalent to using a design matrix that assumes a 6-sec delayed single-pulse HRF. Although here columns of X are orthogonal by definition, the estimate ˆβ is still biased, so is its covariance (XT X)−1XT XtrueUXT trueX(XT X)−1 +(XT X)−1XT ΣϵX(XT X)−1 (where Xtrue is the design matrix reflecting the true HRF in fMRI). See supplementary material for illustration of this bias. 3 Maximum likelihood estimation of similarity structure directly from data As shown in equation 2, the bias in RSA stems from treating the noisy estimate of β as the true β and performing a secondary analysis (correlation) on this noisy estimate. The similarly-structured noise (in terms of the covariance of their generating distribution) in each voxel’s ˆβ translates into bias in the secondary analysis. Since the bias comes from inferring U indirectly from point estimation of β, a good way to avoid such bias is by not relying analysis on this point estimation. With a generative model relating U to the measured fMRI data Y, we can avoid the point estimation of unknown β by marginalizing it in the likelihood of observing the data. In this section, we propose a method which performs maximum-likelihood estimation of the shared covariance structure U of activity patterns directly from the data. Our generative model of fMRI data follows most of the assumptions above, but also allows the noise property and the SNR to vary across voxels. We use an AR(1) process to model the autocorrelation of noise in each voxel: for the ith voxel, we denote the noise at time t(> 0) as ϵt,i, and assume ϵt,i = ρi · ϵt−1,i + ηt,i, ηt,i ∼N(0, σ2 i ) (3) where σ2 i is the variance of the "new" noise and ρi is the autoregressive coefficient for the ith voxel. We assume that the covariance of the Gaussian distribution from which the activity amplitudes βi of the ith voxel are generated has a scaling factor that depends on its SNR si: βi ∼N(0, (siσi)2U). (4) 4 This is to reflect the fact that not all voxels in an ROI respond to tasks (voxels covering partially or entirely white matter might have little or no response). Because the magnitude of the BOLD response to a task is determined by the product of the magnitude of X and β, but s is a hyper-parameter only of β, we hereforth refer to s as pseudo-SNR. We further use the Cholesky decomposition to parametrize the shared covariance structure across voxels: U = LLT , where L is a lower triangular matrix. Thus, βi can be written as βi = siσiLαi, where αi ∼N(0, I) (this change of parameter allows for estimating U of less than full rank by setting L as lower-triangular matrix with a few rightmost-columns truncated). And we have Yi −siσiXLαi ∼N(0, Σϵi(σi, ρi)). Therefore, for the ith voxel, the likelihood of observing data Yi given the parameters is: p(Yi|L, σi, ρi, si) = Z p(Yi|L, σi, ρi, si, αi)p(αi)dαi = Z (2π)−nT 2 |Σ−1 ϵi | 1 2 exp[−1 2(Yi −siσiXLαi)T Σ−1 2 ϵi (Yi −siσiXLαi)] · (2π)−nC 2 exp[−1 2αT i αi]dαi =(2π)−nT 2 |Σ−1 ϵi | 1 2 |Λi| 1 2 exp[1 2((siσi)2Y T i Σ−1 ϵi XLΛiLT XT Σ−1 ϵi Yi −Y T i Σ−1 ϵi Yi)] (5) where Λi = (s2 i σ2 i LT XT Σ−1 ϵi XL + I)−1. Σ−1 ϵi is the inverse of the noise covariance matrix of the ith voxel, which is a function of σi and ρi (see supplementary material). For simplicity, we assume that the noise for different voxels is independent, which is the common assumption of standard RSA (although see [21]). The likelihood of the whole dataset, including all voxels in an ROI, is then p(Y |L, σ, ρ, s) = Y i p(Yi|L, σi, ρi, si). (6) We can use gradient-based methods to optimize the model, that is, to search for the values of parameters that maximize the log likelihood of the data. Note that s are determined only up to a scale, because L can be scaled down by a factor and all si can be scaled up by the same factor without influencing the likelihood. Therefore, we set the geometric mean of s to be 1 to circumvent this indeterminacy, and fit s and L iteratively. The spatial pattern of s thus only reflects the relative SNR of different voxels. Once we obtain ˆL, the estimate of L, we can convert the covariance matrix ˆU = ˆLˆLT into a correlation matrix, which is our estimation of neural representational similarity. Because U is a hyper-parameter of the activity pattern in our generative model and we estimate it directly from data, this is an empirical Bayesian approach. We therefore refer to our method as “Bayesian RSA” now. 4 Performance of the method 4.1 Reduced bias in recovering the latent covariance structure from simulated data To test if the proposed method indeed reduces bias, we simulated fMRI data with a predefined covariance structure and compared the structure recovered by our method with that recovered by standard RSA. Fig 2A shows the hypothetical covariance structure from which we drew βi for each voxel. The bias structure in Fig 1D is the average structure induced by the design matrices of all participants. To simplify the comparison, we use the design matrices of the experiment experienced by one participant. As a result, the bias structure induced by the design matrix deviates slightly from that in Fig 1D. As mentioned, the contribution of the bias to the covariance of ˆβ depends on both the level of noise and the power in the design matrix X. The more each experimental condition is measured during an experiment (roughly speaking, the longer the experiment), the less noisy the estimation of ˆβ, and the less biased the standard RSA is. To evaluate the improvement of our method over standard RSA 5 Recovered covariance structure B C Covariance structure of simulated β A % of recovered structure not explained by true structure individual average standard individual standard average Bayesian individual Bayesian average SNR 0.16 0.31 0.63 Figure 2: Bayesian RSA reduces bias in the recovered shared covariance structure of activity patterns. (A) The covariance structure from which we sampled neural activity amplitudes β for each voxel. fMRI data were synthesized by weighting the design matrix of the task from Fig 1A with the simulated β and adding AR(1) noise. (B) The recovered covariance structure for different simulated pseudo-SNR. Standard individual: covariance calculated directly from ˆβ as is done in standard RSA, for one simulated participant. Standard average: average of covariance matrices of ˆβ from 20 simulated participants. Bayesian individual: covariance estimated directly from data by our method for one simulated participant. Bayesian average: average of the covariance matrices estimated by Bayesian RSA from 20 simulated participants. (C) The ratio of the variation in the recovered covariance structure which cannot be explained by the true covariance structure in Fig 2A. Left: the ratio for covariance matrix from individual simulation (panel 1 and 3 of Fig 2B). Right: the ratio for average covariance matrix (panel 2 and 4 of Fig 2B). Number of runs: the design matrices of 1, 2, or 4 runs of a participant in the experiment of Fig 1A were used in each simulation, to test the effect of experiment duration. Error bar: standard deviation. in different scenarios, we therefore varied two factors: the average SNR of voxels and the duration of the experiment. 500 voxels were simulated. For each voxel, σi was sampled uniformly from [1.0, 3.0], ρi was sampled uniformly from [−0.2, 0.6] (our empirical investigation of example fMRI data shows that small negative autoregressive coefficient can occur in white matter), si was sampled uniformly from f · [0.5, 2.0]. The average SNR was manipulated by choosing f from one of three levels {1, 2, 4} in different simulations. The duration of the experiment was manipulated by using the design matrices of run 1, runs 1-2, and runs 1-4 from one participant. Fig 2B displays the covariance matrix recovered by standard RSA (first two columns) and Bayesian RSA (last two columns), with an experiment duration of approximately 10 minutes (one run, measurement resolution: TR = 2.4 sec). The rows correspond to different levels of average SNR (calculated post-hoc by averaging the ratio std(Xβi) σi across voxels). Covariance matrices recovered from one simulated participant and the average of covariance matrices recovered from 20 simulated participants (“average”) are displayed. Comparing the shapes of the matrix and the magnitudes of values (color bars) across rows, one can see that the bias structure in standard RSA is most severe when SNR is low. Averaging the estimated covariance matrices across simulated participants can reduce noise, but not bias. Comparing between columns, one can see that strong residual structure exists in standard RSA even after averaging, but almost disappears for Bayesian RSA. This is especially apparent for low SNR – the block structure of the true covariance matrix from Figure 2A is almost undetectable for standard RSA even after averaging (column 2, row 1 of Fig 2B), but emerges after averaging for Bayesian RSA (column 4, row 1 of Fig 2B). Fig 2C compares the proportion of variation in the recovered covariance structure that cannot be explained by the true structure in Fig 2A, for different levels of SNR and different experiment durations, for individual simulated participants and for average results. This comparison confirms that the covariance recovered by Bayesian RSA deviates much less from the true covariance matrix than that by standard RSA, and that the deviation observed in an individual participant can be reduced considerably by averaging over multiple participants (comparing the left with right panels of Fig 2C for Bayesian RSA). 6 4.2 Application to real data: simultaneous estimation of neural representational similarity and spatial location supporting the representation In addition to reducing bias in estimation of representational similarity, our method also has an advantage over standard RSA: it estimates the pseudo-SNR map s. This map reveals the locations within the ROI that support the identified representational structure. When a researcher looks into an anatomically defined ROI, it is often the case that only some of the voxels respond to the task conditions. In standard RSA, ˆβ in voxels with little or no response to tasks is dominated by structured noise following the bias covariance structure (XT X)−1XT ΣϵX(XT X)−1, but all voxels are taken into account equally in the analysis. In contrast, si in our model is a hyper-parameter learned directly from data – if a voxel does not respond to any condition of the task, si would be small and the contribution of the voxel to the total log likelihood is small. The fitting of the shared covariance structure is thus less influenced by this voxel. From our simulated data, we found that parameters of the noise (σ and ρ) can be recovered reliably with small variance. However, the estimation of s had large variance from the true values used in the simulation. One approach to reduce variance of estimation is by harnessing prior knowledge about data. Voxels supporting similar representation of sensory input or tasks tend to spatially cluster together. Therefore, we used a Gaussian Process to impose a smooth prior on log(s) [17]. Specifically, for any two voxels i and j, we assumed cov(log(si), log(sj)) = b2exp(−(xi−xj)T (xi−xj) 2l2space −(Ii−Ij)2 2l2 inten ), where xi and xj are the spatial coordinates of the two voxels and Ii and Ij are the average intensities of fMRI signals of the two voxels. Intuitively, this means that if two voxels are close together and have similar signal intensity (that is, they are of the same tissue type), then they should have similar SNR. Such a kernel of a Gaussian Process imposes spatial smoothness but also allows the pseudo-SNR to change quickly at tissue boundaries. The variance of the Gaussian process b2, the length scale lspace and linten were fitted together with the other parameters by maximizing the joint log likelihood of all parameters (here again, we restrict the geometric mean of s to be 1). A B C Map of pseudo-SNR lunamoth ladybug warbler mallard monkey lemur lunamoth ladybug warbler mallard monkey lemur lemur monkey mallard warbler ladybug lunamoth lemur monkey mallard warbler ladybug lunamoth Subjectively judged similarity Similarity in IT by Bayesian RSA Figure 3: Bayesian RSA estimates both the representational similarity structure from fMRI data and the spatial map supporting the learned representation. (A) Similarity between 6 animal categories, as judged behaviorally (reproduced from [2]). (B) Average representational similarity estimated from IT cortex from all participants of [2], using our approach. The estimated structure resembles the subjectively-reported structure. (C) Pseudo-SNR map in IT cortex corresponding to one participant. Red: high pseudo-SNR, green: low pseudo-SNR. Only small clusters of voxels show high pseudo-SNR. We applied our method to the dataset of Connolly et al. (2012) [2]. In their experiment, participants viewed images of animals from 6 different categories during an fMRI scan and rated the similarity between animals outside the scanner. fMRI time series were pre-processed in the same way as in their work [2]. Inferior temporal (IT) cortex is generally considered as the late stage of ventral pathway of the visual system, in which object identity is represented. Fig 3 shows the similarity judged by the participants and the average similarity matrix estimated from IT cortex, which shows similar structure but higher correlations between animal classes. Interestingly, the pseudo-SNR map shows that only part of the anatomically-defined ROI supports the representational structure. 7 5 Discussion In this paper, we demonstrated that representational similarity analysis, a popular method in many recent fMRI studies, suffers from a bias. We showed analytically that such bias is contributed by both the structure of the experiment design and the covariance structure of measurement and neural noise. The bias is induced because standard RSA analyzes noisy estimates of neural activation level, and the structured noise in the estimates turns into bias. Such bias is especially severe when SNR is low and when the order of task conditions cannot be fully counterbalanced. To overcome this bias, we proposed a Bayesian framework of the fMRI data, incorporating the representational structure as the shared covariance structure of activity levels across voxels. Our Bayesian RSA method estimates this covariance structure directly from data, avoiding the structured noise in point estimation of activity levels. Our method can be applied to neural recordings from other modalities as well. Using simulated data, we showed that, as compared to standard RSA, the covariance structure estimated by our method deviates much less from the true covariance structure, especially for low SNR and short experiments. Furthermore, our method has the advantage of taking into account the variation in SNR across voxels. In future work, we will use the pseudo-SNR map and the covariance structure learned from the data jointly as an empirical prior to constrain the estimation of activation levels β. We believe that such structured priors learned directly from data can potentially provide more accurate estimation of neural activation patterns—the bread and butter of fMRI analyses. A number of approaches have recently been proposed to deal with the bias structure in RSA, such as using the correlation or Mahalanobis distance between neural activity patterns estimated from separate fMRI scans instead of from the same fMRI scan, or modeling the bias structure as a diagonal matrix or by a Taylor expansion of an unknown function of inter-events intervals [1, 21, 6]. Such approaches have different limitations. The correlation between patterns estimated from different scans [1] is severely underestimated if SNR is low (for example, unless there is zero noise, the correlation between the neural patterns corresponding to the same conditions estimated from different fMRI scans is always smaller than 1, while the true patterns should presumably be the same across scans in order for such an analysis to be justified). Similar problems exists for using Mahalanobis distance between patterns estimated from different scans [21]: with noise in the data, it is not guaranteed that the distance between patterns of the same condition estimated from separate scans is smaller than the distance between patterns of different conditions. Such a result cannot be interpreted as a measure of “similarity” because, theoretically, neural patterns should be more similar if they belong to the same condition than if they belong to different conditions. Our approach does not suffer from such limitations, because we are directly estimating a covariance structure, which can always be converted to a correlation matrix. Modeling the bias as a diagonal matrix [6] is not sufficient, as the bias can be far from diagonal, as shown in Fig 1D. Taylor expansion of the bias covariance structure as a function of inter-event intervals can potentially account for off-diagonal elements of the bias structure, but it has the risk of removing structure in the true covariance matrix if it happens to co-vary with inter-event intervals, and becomes complicated to set up if conditions repeat multiple times [1]. One limitation of our model is the assumption that noise is spatially independent. Henriksson et al. [8] suggested that global fluctuations of fMRI time series over large areas (which is reflected as spatial correlation) might contribute largely to their RSA pattern. This might also be the reason that the overall correlation in Fig 1B is higher than the bias obtained from standard RSA on independent Gaussian noise (Fig 1D). Our future work will explicitly incorporate such global fluctuations of noise. Acknowledgement This publication was made possible through the support of grants from the John Templeton Foundation and the Intel Corporation. The opinions expressed in this publication are those of the authors and do not necessarily reflect the views of the John Templeton Foundation. JWP was supported by grants from the McKnight Foundation, Simons Collaboration on the Global Brain (SCGB AWD1004351) and the NSF CAREER Award (IIS-1150186). We thank Andrew C. Connolly etc. for sharing of the data used in 4.2. Data used in the supplementary material were obtained from the MGH-USC Human Connectome Project (HCP) database. References [1] A. Alink, A. Walther, A. Krugliak, J. J. van den Bosch, and N. Kriegeskorte. Mind the drift-improving sensitivity to fmri pattern information by accounting for temporal pattern drift. bioRxiv, page 032391, 8 2015. [2] A. C. Connolly, J. S. Guntupalli, J. Gors, M. Hanke, Y. O. Halchenko, Y.-C. Wu, H. Abdi, and J. V. Haxby. The representation of biological classes in the human brain. The Journal of Neuroscience, 32(8): 2608–2618, 2012. [3] R. W. Cox. Afni: software for analysis and visualization of functional magnetic resonance neuroimages. Computers and Biomedical research, 29(3):162–173, 1996. [4] T. Davis and R. A. Poldrack. Measuring neural representations with fmri: practices and pitfalls. Annals of the New York Academy of Sciences, 1296(1):108–134, 2013. [5] R. C. Decharms and A. Zador. Neural representation and the cortical code. Annual review of neuroscience, 23(1):613–647, 2000. [6] J. Diedrichsen, G. R. Ridgway, K. J. Friston, and T. Wiestler. Comparing the similarity and spatial structure of neural representations: a pattern-component model. Neuroimage, 55(4):1665–1678, 2011. [7] J. V. Haxby, M. I. Gobbini, M. L. Furey, A. Ishai, J. L. Schouten, and P. Pietrini. Distributed and overlapping representations of faces and objects in ventral temporal cortex. Science, 293(5539):2425–2430, 2001. [8] L. Henriksson, S.-M. Khaligh-Razavi, K. Kay, and N. Kriegeskorte. Visual representations are dominated by intrinsic fluctuations correlated between areas. NeuroImage, 114:275–286, 2015. [9] P. Jazzard, P. Matthews, and S. Smith. Functional magnetic resonance imaging: An introduction to methods, 2003. [10] D. J. Kravitz, C. S. Peng, and C. I. Baker. Real-world scene representations in high-level visual cortex: it’s the spaces more than the places. The Journal of Neuroscience, 31(20):7322–7333, 2011. [11] N. Kriegeskorte, M. Mur, and P. A. Bandettini. Representational similarity analysis-connecting the branches of systems neuroscience. Frontiers in systems neuroscience, 2:4, 2008. [12] N. Kriegeskorte, M. Mur, D. A. Ruff, R. Kiani, J. Bodurka, H. Esteky, K. Tanaka, and P. A. Bandettini. Matching categorical object representations in inferior temporal cortex of man and monkey. Neuron, 60(6): 1126–1141, 2008. [13] J. B. Kruskal. Multidimensional scaling by optimizing goodness of fit to a nonmetric hypothesis. Psychometrika, 29(1):1–27, 1964. [14] S. Nishimoto, A. T. Vu, T. Naselaris, Y. Benjamini, B. Yu, and J. L. Gallant. Reconstructing visual experiences from brain activity evoked by natural movies. Current Biology, 21(19):1641–1646, 2011. [15] K. A. Norman, S. M. Polyn, G. J. Detre, and J. V. Haxby. Beyond mind-reading: multi-voxel pattern analysis of fmri data. Trends in cognitive sciences, 10(9):424–430, 2006. [16] M. V. Peelen and A. Caramazza. Conceptual object representations in human anterior temporal cortex. The Journal of Neuroscience, 32(45):15728–15736, 2012. [17] C. E. Rasmussen. Gaussian processes for machine learning. 2006. [18] M. Ritchey, E. A. Wing, K. S. LaBar, and R. Cabeza. Neural similarity between encoding and retrieval is related to memory via hippocampal interactions. Cerebral Cortex, page bhs258, 2012. [19] N. W. Schuck, M. B. Cai, R. C. Wilson, and Y. Niv. Human orbitofrontal cortex represents a cognitive map of state space. Neuron, 91:1–11, 2016. [20] E. P. Simoncelli and B. A. Olshausen. Natural image statistics and neural representation. Annual review of neuroscience, 24(1):1193–1216, 2001. [21] A. Walther, H. Nili, N. Ejaz, A. Alink, N. Kriegeskorte, and J. Diedrichsen. Reliability of dissimilarity measures for multi-voxel pattern analysis. NeuroImage, 2015. [22] M. W. Woolrich, B. D. Ripley, M. Brady, and S. M. Smith. Temporal autocorrelation in univariate linear modeling of fmri data. Neuroimage, 14(6):1370–1386, 2001. [23] G. Xue, Q. Dong, C. Chen, Z. Lu, J. A. Mumford, and R. A. Poldrack. Greater neural pattern similarity across repetitions is associated with better memory. Science, 330(6000):97–101, 2010. [24] E. Zarahn, G. K. Aguirre, and M. D’Esposito. Empirical analyses of bold fmri statistics. NeuroImage, 5 (3):179–197, 1997. 9 | 2016 | 408 |
6,337 | Multistage Campaigning in Social Networks Mehrdad Farajtabar∗ Xiaojing Ye⋄ Sahar Harati† Le Song∗ Hongyuan Zha∗ Georgia Institute of Technology∗ Georgia State University⋄ Emory University† mehrdad@gatech.edu xye@gsu.edu sahar.harati@emory.edu {lsong,zha}@cc.gatech.edu Abstract We consider the problem of how to optimize multi-stage campaigning over social networks. The dynamic programming framework is employed to balance the high present reward and large penalty on low future outcome in the presence of extensive uncertainties. In particular, we establish theoretical foundations of optimal campaigning over social networks where the user activities are modeled as a multivariate Hawkes process, and we derive a time dependent linear relation between the intensity of exogenous events and several commonly used objective functions of campaigning. We further develop a convex dynamic programming framework for determining the optimal intervention policy that prescribes the required level of external drive at each stage for the desired campaigning result. Experiments on both synthetic data and the real-world MemeTracker dataset show that our algorithm can steer the user activities for optimal campaigning much more accurately than baselines. 1 Introduction Obama was the first US president in history who successfully leveraged online social media in presidential campaigning, which has been popularized and become a ubiquitous approach to electoral politics (such as in the on-going 2016 US presidential election) in contrast to the decreasing relevance of traditional media such as TV and newspapers [1, 2]. The power of campaigning via social media in modern politics is a consequence of online social networking being an important part of people’s regular daily social lives. It has been quite common that individuals use social network sites to share their ideas and comment on other people’s opinions. In recent years, large organizations, such as governments, public media, and business corporations, also start to announce news, spread ideas, and/or post advertisements in order to steer the public opinion through social media platform. There has been extensive interest for these entities to influence the public’s view and manipulate the trend by incentivizing influential users to endorse their ideas/merits/opinions at certain monetary expenses or credits. To obtain most cost-effective trend manipulations, one needs to design an optimal campaigning strategy or policy such that quantities of interests, such as influence of opinions, exposure of a campaign, adoption of new products, can be maximized or steered towards the target amount given realistic budget constraints. The key factor differentiating social networks from traditional media is peer influence. In fact, events in an online social network can be categorized roughly into two types: endogenous events where users just respond to the actions of their neighbors within the network, and exogenous events where users take actions due to drives external to the network. Then it is natural to raise the following fundamental questions regarding optimal campaigning over social networks: can we model and exploit those event data to steer the online community to a desired exposure level? More specifically, can we drive the overall exposure to a campaign to a certain level (e.g., at least twice per week per user) by incentivizing a small number of users to take more initiatives? What about maximizing the overall exposure for a target group of people? 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. More importantly, those exposure shaping tasks are more effective when the interventions are implemented in multiple stages. Due to the inherent uncertainty in social behavior, the outcome of each intervention may not be fully predictable but can be anticipated to some extent before the next intervention happens. A key aspect of such situations is that interventions can’t be viewed in isolation since one must balance the desire for high present reward with the penalty of low future outcome. In this paper, the dynamic programming framework [3] is employed to tackle the aforementioned issues. In particular, we first establish the fundamental theory of optimal campaigning over social networks where the user activities are modeled as a multivariate Hawkes process (MHP) [4, 5] since MHP can capture both endogenous and exogenous event intensities. We also derive a time dependent linear relation between the intensity of exogenous events and the overall exposure to the campaign. Exploiting this connection, we develop a convex dynamic programming framework for determining the optimal intervention policy that prescribes the required level of external drive at each stage in order for the campaign to reach a desired exposure profile. We propose several objective functions that are commonly considered as campaigning criteria in social networks. Experiments on both synthetic data and real world network of news websites in the MemeTracker dataset show that our algorithms can shape the exposure of campaigns much more accurately than baselines. 2 Basics and Background An n-dimensional temporal point process is a random process whose realization consists of a list of discrete events in time and their associated dimension, {(tk, dk)} with tk ∈R+ and dk ∈{1, . . . , n}. Many different types of data produced in online social networks can be represented as temporal point processes, such as likes and tweets. A temporal point process can be equivalently represented as a counting process, N(t) = (N 1(t), . . . , N n(t))⊤associated to n users in the social network. Here, N i(t) records the number of events user i performs before time t for 1 ≤i ≤n. Let the history Hi(t) be the list of times of events {t1, t2, . . . , tk} of the i-th user up to time t. Then, the number of observed events in a small time window [t, t + dt) of length dt is dN i(t) = ! tk∈Hi(t) δ(t −tk) dt, and hence N i(t) = " t 0 dN i(s), where δ(t) is a Dirac delta function. The point process representation of temporal data is fundamentally different from the discrete time representation typically used in social network analysis. It directly models the time interval between events as random variables, avoids the need to pick a time window to aggregate events, and allows temporal events to be modeled in a fine grained fashion. Moreover, it has a remarkably rich theoretical support [6]. An important way to characterize temporal point processes is via the conditional intensity function — a stochastic model for the time of the next event given all the times of previous events. Formally, the conditional intensity function λi(t) (intensity, for short) of user i is the conditional probability of observing an event in a small window [t, t + dt) given the history H(t) = # H1(t), . . . , Hn(t) $ : λi(t)dt := P {user i performs event in [t, t + dt) | H(t)} = E[dN i(t) | H(t)], (1) where one typically assumes that only one event can happen in a small window of size dt. The functional form of the intensity λi(t) is often designed to capture the phenomena of interests. The Hawkes process [7] is a class of self and mutually exciting point process models, λi(t) = µi(t) + % k:tk<t φidk(t, tk) = µi(t) + n % j=1 & t 0 φij(t, s)dN j(s), (2) where the intensity is history dependent. φij(t, s) is the impact function capturing the temporal influence of an event by user j at time s to the future events of user j at time t ⩾s. Here, the first term µi(t) is the exogenous event intensity modeling drive outside the network and indecent of the history, and the second term ! k:tk<t φidk(t, tk) is the endogenous event intensity modeling interactions within the network [8]. Defining Φ(t, s) = [φij(t, s)]i,j=1...n, and λ(t) = (λ1(t), . . . , λn(t))⊤, and µ(t) = (µ1(t), . . . , µn(t))⊤we can compactly rewrite Eq 2 in matrix form: λ(t) = µ(t) + & t 0 Φ(t, s)dN(s). (3) In practice it is standard to employ shift-invariant impact function, i.e., Φ(t, s) = Φ(t −s). Then, by using notation of convolution f(t) ∗g(t) = " t 0 f(t −s)g(s)ds we have λ(t) = µ(t) + Φ(t) ∗dN(t). (4) 2 3 From Intensity to Average Activity In this section we will develop a closed form relation between the expected total intensity E[λ(t)] and the intensity µ(t) of exogenous events. This relation establish the basis of our campaigning framework. First, define the mean function as M(t) := E[N(t)] = EH(t)[E(N(t)|H(t))]. Note that M(t) is history independent, and it gives the average number of events up to time t for each of the dimension. Similarly, the rate function η(t) is given by η(t)dt := dM(t). On the other hand, dM(t) = dE[N(t)] = EH(t)[E(dN(t)|H(t))] = EH(t)[λ(t)|H(t)]dt = E[λ(t)]dt. (5) Therefore η(t) = E[λ(t)] which serves as a measure of activity in the network. In what follows we will find an analytical form for the average activity. Proofs are presented in Appendix C. Lemma 1. Suppose Ψ : [0, T] →Rn×n is a non-increasing matrix function, then for every fixed constant intensity µ(t) = c ∈Rn +, ηc(t) := Ψ(t)c solves the semi-infinite integral equation η(t) = c + & t 0 Φ(t −s)η(s)ds, ∀t ∈[0, T], (6) if and only if Ψ(t) satisfies Ψ(t) = I + & t 0 Φ(t −s)Ψ(s)ds, ∀t ∈[0, T]. (7) In particular, if Φ(t) = Ae−ωt1≥0(t) = [aije−ωt1≥0(t)]ij where 0 ≤ω /∈Spectrum(A), then Ψ(t) = e(A−ωI)t + ω(A −ωI)−1(e(A−ωI)t −I) (8) for t ∈[0, T], where, 1≥0(t) is an indicator function for t ≥0. Let µ : [0, T] →Rn + be a right-continuous piecewise constant function µ(t) = M % m=1 cm1[τm−1,τm)(t), (9) where 0 = τ0 < τ1 < · · · < τM = T is a finite partition of time interval [0, T] and function 1[τm−1,τm)(t) indicates τm−1 ≤t < τm. The next theorem shows that if Ψ(t) satisfies (7), then one can calculate η(t) for piecewise constant intensity µ : [0, T] of form (9). Theorem 2. Let Ψ(t) satisfy (7) and µ(t) be a right-continuous piecewise constant intensity function of form (9), then the rate function η(t) is given by η(t) = m % k=0 Ψ(t −τk)(ck −ck−1), (10) for all t ∈(τm−1, τm] and m = 1, . . . , M, where c−1 := 0 by convention. Using the above lemma, for the first time, we derive the average intensity for a general exogenous intensity. Appendix E includes a few experiments to investigate these results empirically. Theorem 3. If Ψ ∈C1([0, T]) and satisfies (7), and exogenous intensity µ is bounded and piecewise absolutely continuous on [0, T] where µ(t+) = µ(t) at all discontinuous points t, then µ is differentiable almost everywhere, and the semi-indefinite integral η(t) = µ(t) + & t 0 Φ(t −s)η(s)ds, ∀t ∈[0, T], (11) yields a rate function η : [0, T] →Rn + given by η(t) = & t 0 Ψ(t −s)dµ(s). (12) Corollary 4. Suppose Ψ and µ satisfy the same conditions as in Thm. 3, and define ψ = Ψ′, then the rate function is η(t) = (ψ ∗µ)(t). In particular, if Φ(t) = Ae−ωt1≥0(t) = [aije−ωt1≥0(t)]ij then the rate function η(t) = µ(t) + A " t 0 e(A−wI)(t−s)µ(s)ds. 3 4 Multi-stage Closed-loop Control Problem Given the analytical relation between exogenous intensity and expected overall intensity (rate function), one can solve a single one-stage campaigning problem to find the optimal constant intervention intensity [8]. Alternatively, the time window can be partitioned into multiple stages and one can impose different levels of interventions in these stages. This yields an open-loop optimization of the cost function where one selects all the intervention actions at initial time 0. More effectively, we tackle the campaigning problem in a dynamic and adaptive manner where we can postpone deciding the intervention by observing the process until the next stage begins. This is called the closed-loop optimization of the objective function. In this section, we establish the foundation to formulate the problem as a multi-stage closed-loop optimal control problem. We assume that n users are generating events according to multi-dimensional Hawkes process with exogenous intensity µ(t) ∈Rn and impact function Φ(t, s) ∈Rn×n. Event exposure. Event exposure is the quantity of major interests in campaigning. The exposure process is mathematically represented as a counting process, E(t) = (E1(t), . . . , En(t))⊤: Here, Ei(t) records the number of times user i is exposed (she or one of her neighbors performs an activity) to the campaign by time t. Let B be the adjacency matrix of the user network, i.e., bij = 1 if user i follows user j or equivalently user j influences user i. We assume bii = 1 for all i. Then the exposure process is given by E(t) = B N(t). Stages and interventions. Let [0, T] be the time horizon and 0 = τ0 < τ1 < . . . < τM−1 < τM = T be a partition into the M stages. In order to steer the activities of network towards a desired level (criteria given below) at these stages, we impose a constant intervention um ∈Rn to the existing exogenous intensity µ during time [τm, τm+1) for each stage m = 0, 1, . . . , M −1. The activity intensity at the m-th stage is λm(t) = µ + um + " t 0 Φ(t, s) dN(s) for τm ≤t < τm+1 where N(t) tracks the counting process of activities since t = 0. Note that the intervention itself exhibits a stochastic nature: adding ui m to µi is equivalent to incentivizing user i to increase her activity rate but it is still uncertain when she will perform an activity, which appropriately mimics the randomness in real-world campaigning. States and state evolution. Note that the Hawkes process is non-Markov and one needs complete knowledge of the history to characterize the entire process. However, the conditional intensity λ(t) only depends on the state of process at time t when the standard exponential kernel Φ(t, s) = Ae−ω(t−s)1≥0(t −s) is employed. In this case, the activity rate at stage m is λm(t) = µ + um + & τm 0 Ae−ω(t−s) dN(s) ' () * from previous stages + & t τm Ae−ω(t−s) dN(s) ' () * current stage (13) Define xm := λm−1(τm) −um−1 −µ (and x0 = 0 by convention) then the intensity due to events of all previous m stages can be written as " τm 0 Ae−ω(t−s) dN(s) = xme−ω(t−τm). In other words, xm is sufficient to encode the information of activity in the past m stages that is relevant to future. This is in sharp contrast to the general case where the state space grows with the number of events. Objective function. For a sequence of controls u(t) = !M−1 m=0 um1[τm,τm+1)(t), the activity counting process N(t) is generated by intensity λ(t) = µ + u(t) + " t 0 Ae−ω(t−s) dN(s). For each stage m from 0 to M −1, xm encodes the effects from previous m stages as above and um is the current control imposed at this stage. Let Ei m(t; xm, um) := B " t τm dN i(s) be the number of times user i is exposed to the campaign by time t ∈[τm, τm+1) in stage m, then the goal is to steer the expected total number of exposure ¯Ei m(xm, um) := E[Ei m(τm+1; xm, um)] to a desired level. In what follows, we introduce several instances of the objective function g(xm, um) in terms of { ¯Ei m(xm, um)}n i=1 in each stage m that characterize different exposure shaping tasks. Then the overall control problem is to find u(t) that optimizes the total objective !M−1 m=0 gm(xm, um). • Capped Exposure Maximization (CEM): In real networks, there is a cap on the exposure each user can tolerate due to the limited attention of a user. Suppose we know the upper bound βi m , on user i’s exposure tolerance over which the extra exposure is not counted towards the objective. Then, we can form the following capped exposure maximization gm(xm, um) = 1 n n % i=1 min # ¯Ei m(xm, um), βi m $ (14) 4 Algorithm 1: Closed-loop Multi-stage Dynamic Programming Input: Intervention constraints: c0 . . . cM−1, C0 . . . CM−1, α0 . . . αM−1, Input: Objective-specific constraints: β0 . . . βM−1 for CEM and γ0 . . . γM−1 for LES Input: Time: T, Hawkes parameters: A, ω Output: Optimal intervention u0 . . . uM−1, Optimal cost: Cost Set x0 ←0 and Cost ←0 for l ←0 : M −1 do (vl . . . vM−1) = open loop(xl) (Problems (24), (25), (26) for CEM, MEM, LES respectively) Set ul ←vl and drop vl+1 . . . vM−1 Update next state xl+1 ←fl(xl, ul) and Cost = Cost + gl(xl, ul) • Minimum Exposure Maximization (MEM): Suppose our goal is instead to maintain the exposure of campaign on each user above a certain minimum level, at each stage or, alternatively to make the user with the minimum exposure as exposed as possible, we can consider the following cost function: gm(xm, um) = min i ¯Ei m(xm, um) (15) • Least-squares Exposure Shaping (LES): Sometimes we want to achieve a pre-specified target exposure levels, γm ∈Rn, for the users. For example, we may like to divide users into groups and desire a different level of exposure in each group. To this end, we can perform least-squares campaigning task with the following cost function where D encodes potentially additional constraints (e.g., group partitions): gm(xm, um) = −1 n∥D ¯Em(xm, um) −γm∥2 (16) Policy and actions. By observing the counting process in previous stages (summarized in a sequence of xm) and taking the future uncertainty into account, the control problem is to design a policy π = {πm : Rn →Rn : m = 0, . . . , M −1} such that the controls um = πm(xm) can maximize the total objective !M−1 m=0 gm(xm, um). In addition, we may have constraints on the amount of control. For example, a budget constraint on the sum of all interventions to users at each stage, or, a cap over the amount of intensity a user can handle. A feasible set or an action space over which we find the best intervention is represented as Um := # um ∈Rn|c⊤ mum ≤Cm, 0 ⩽um ⩽αm $ . Here, cm ∈Rn + contains the price of each person per unit increase of exogenous intensity and Cm ∈R+ is the total budget at stage m. Also, αm ∈Rn + is the cap on the amount of activities of the users. To summarize, the following problem is formulated to find the optimal control policy π: maximize π M−1 % m=0 gm(xm, πm(xm)), subject to πm(xm) ∈Um, for m = 0, . . . , M −1. (17) 5 Closed-loop Dynamic Programming Solution We have formulated the control problem as an optimization in (17). However, when control policy πm is to be implemented, only xm is observed and there are still uncertainties in future {xm+1, . . . , xM−1}. For instance, when πm is implemented according to xm starting from time τm, the intensity xm+1 := f(xm, πm(xm)) at time τm+1 depends on xm and the control πm(xm), but is also random due to the stochasticity of the process during time [τm, τm+1). Therefore, the design of π needs to take future uncertainties into considerations. Suppose we have arrived at stage M at time τM−1 with observation xM−1, then the optimal policy πM−1 satisfies gM−1(xM−1, πM−1(xM−1)) = maxu∈UM−1 gM−1(xM−1, u) =: JM−1(xM−1). We then repeat this procedure for m from M −1 to 0 backward to find the sequence of controls via dynamic programming such that the control πm(xm) ∈Um yields optimal objective value Jm(xm) = max um∈Um E[gm(xm, um) + Jm+1(f(xm, um))] (18) Approximate Dynamic Programming. Solving (18) for finding Jm(xm) analytically is intractable. Therefore, we will adopt an approximate dynamic programming scheme. In fact approximate control is as essential part of dynamic programming as the optimization is usually intractable due to 5 curse of dimensionality except a few especial cases [3]. Here we adopt a suboptimal control scheme, certainty equivalent control (CEC), which applies at each stage the control that would be optimal if the uncertain quantities were fixed at some typical values like the average behavior. It results in an optimal control sequence, the first component of which is used at the current stage, while the remaining components are discarded. The procedure is repeated for the remaining stages. Algorithm 1 summarizes the dynamic programing steps. This algorithm has two parts: (i) certainty equivalence which the random behavior is replaced by its average; and (ii) the open-loop optimization. Let’s assume we are at the beginning of stage l of the Alg. 1 with state vector xl at τl. Certainty equivalence. We use the machinery developed in Sec. 3 to compute the average of exposure at any stage m = l, l + 1, . . . , M −1. ¯Em(xm, um) = BE[N(τm+1) −N(τm)] = BE +& τm+1 τm dN(s) , = B & τm+1 τm ηm(s) ds (19) where ηm(t) = E[λm(t)] and λm(t) = µ + um + xle−ω(t−τl) + " t τl Ae−ω(t−s)dN(s) for t ∈ [τm, τm+1). Now, we use the superposition property of point processes [4] to decompose the process as N(t) = N c(t) + N v(t) corresponding to λm(t) = λc m(t) + λv m(t) where the first λc m(t) = µ+um + " t τl Ae−ω(t−s)dN c(s) consists of events caused by exogenous intensity at current stage m and the second λv m(t) = xle−ω(t−τl) + " t τl Ae−ω(t−s)dN v(s) is due to activities in previous stages. According to Thm. 2 we have ηc m(t) := E[λc m(t)] = Ψ(t −τl)µ + Ψ(t −τl)ul + m−1 % k=l+1 Ψ(t −τk)(uk −uk−1), (20) and according to Thm. 3 we have ηv m(t) := E[λv m(t)] = & t τl Ψ(t −s) d(xle−ω(s−τl)1[τl,∞)(s)). (21) From now on, for simplicity, we assume stages are based on equal partition of [0, T] to M segments where each has length ∆M. Combining Eq. (19) and ηm(t) = ηc m(t) + ηv m(t) yields: ¯Em(xm, um) =Γ((m −l + 1)∆M)ul + Γ((m −l)∆M)(ul+1 −ul) + . . . + Γ(∆M)(um −um−1) + Γ((m −l + 1)∆M)µ + Υ((m −l + 1)∆M)xl (22) where Γ(t) and Υ(t) are matrices independent of um’s and are defined in Appendix D. Note the linear relation between average exposure ¯Em(xm, um) and intervention values ul, . . . , um−1. Open-loop optimization. Having found the average exposure at stages m = l, . . . , M−1 we formulate an open-loop optimization to find optimal ul, ul+1, . . . , uM−1. Defining ˆul = (ul; . . . ; uM−1) and ˆEl = ( ¯El(xl, ul); . . . ; ¯EM−1(xM−1, uM−1)) we can write Xlˆul + Ylµ + Wlxl = ˆEl where Zlˆul ≤zl (23) and Xl, Yl, Wl, Zl, and zl are independent of ˆul, µ, and xl as defined in Appendix D. Defining the expanded form of constraint variables as ˆcl = (cl; . . . ; cM−1), ˆCl = (Cl; . . . ; CM−1), and ˆαl = (αl; . . . ; αM−1) we provide the optimization from of the above exposure shaping tasks. For CEM consider ˆβl = (βl; . . . , βM−1). Then the problem maximizeˆh,ˆul 1 n1⊤ˆh subject to Xlˆul + Ylµ + Wlxl ≥ˆh, ˆβl ≥ˆh, Zlˆul ≤zl, (24) solves CEM where h is an auxiliary vector of size n(M −l). For MEM consider the auxiliary h as a vector of size M −l and ˆh a vector of size n(M −1). ˆh = (h(1); . . . ; h(1); h(2); . . . , h(2); . . . , h(M −l); . . . ; h(M −l)) where each h(k) is repeated n times. Then MEM is equivalent to maximizeˆh,ˆul1⊤ˆh subject to Xlˆul + Ylµ + Wlxl ≥ˆh, ˆβl ≥ˆh, Zlˆul ≤zl (25) 6 CLL OPL RND PRK WEI 100 150 200 250 300 350 sum of exposure CLL OPL RND WFL PRP 1.5 2 2.5 3 3.5 4 4.5 5 minimum exposure CLL OPL RND GRD REL 0.5 1 1.5 average distance ×104 a) Capped maximization b) Minimum maximization c) Least-squares shaping Figure 1: The objective on simulated events and synthetic network; n = 300, M = 6, T = 40 For LES let ˆγl = (γl; . . . ; γM−1) and ˆDl = diag(D, . . . , D), then minimizeˆul 1 n∥ˆDl(Xlˆul + Ylµ + Wlxl) −ˆγl∥2 subject to Zlˆul ≤zl (26) All the three tasks involve convex (and linear) objective function with linear constraints which impose a convex feasible set. Therefore, one can use the rich and well-developed literature on convex optimization and linear programming to find the optimum intervention. 6 Experiments We evaluate our campaigning framework using both simulated and real world data and show that our approach significantly outperforms several baselines1. Campaigning results on synthetic networks. In this section, we experiment with a synthetic network of 300 nodes. Details of the experimental setup and parameter setting are found in appendix F. We focus on three tasks: capped exposure maximization, minimax exposure shaping, and least square exposure shaping. To compare the methods we simulate the network with the prescribed intervention intensity and compute the objective function based on the events happened during the simulation. The mean and standard deviation of the objective function out of 10 runs are reported. Fig. 1 summarizes the performance of the proposed algorithm (CLL) and 4 other baselines on different campaigning tasks. For CEM, our approach consistently outperforms the others by at least 10. This means it exposes each user to the campaign at least 10 times more than the rest consuming the same budget and within the same constraints. The extra 20 units of exposures of over OPL or value of information shows how much we gain by incorporating a dynamic closed-loop solution as opposed to open-loop one-time optimization over all stages. For MEM, the proposed method outperforms the others by a smaller margin, however, the 0.1 exposure difference with the second best method is not trifling. This is expected as lifting the minimum exposure is a difficult task [8]. For LES, results demonstrate the superiority of CLL by a large margin. The 103 difference with the second best algorithm aggregated over 6 stages roughly is translated to 103/6 ∼13 difference in the number of exposures per user. Given the heterogeneity of the network activity and target shape, this is a significant improvement over the baselines. Appendix F includes further results on varying number of nodes, number of stages, and duration of each stage. Campaigning results on real world networks. We also evaluate the proposed framework on real world data. To this end, we utilize the MemeTracker dataset [9] which contains the information flows captured by hyperlinks between different sites with timestamps during 9 months. This data has been previously used to validate Hawkes process models of social activity [5, 10]. For the real data, we utilize two evaluation procedures. First, similar to the synthetic case, we simulate the network, but now on a network based on the learned parameters from real data. However, the more interesting evaluation scheme would entail carrying out real intervention in a social media platform. Since this is very challenging to do, instead, in this evaluation scheme we used held-out data to mimic such procedure. Second, we form 10 pairs of clusters/cascades by selecting any 2 combinations of 5 largest clusters in the Memetracker data. Each is a cascade of events around a common subject. For any of these 10 pairs, the methods are faced to the question of predicting which cascade will reach the objective function better. They should be able to answer this by measuring how similar their prescription is to the real exogenous intensity. The key point here is that the real events happened are used to evaluate the objective function of the methods. Then the results are reported on average prediction accuracy on all stages over 10 runs of random constraint and parameter initialization on 10 pairs of cascades. The details of the experimental setup is further explained in Appendix F. Fig. 2, left column illustrates the performance with respect to increasing the number of users in the network. The performance drops slightly with the network size. This means that prediction becomes 1codes are available at http://www.cc.gatech.edu/~mfarajta/ 7 Capped Maximization 50 100 150 200 250 network size 0.6 0.65 0.7 0.75 prediction accuracy CLL OPL RND PRK WEI 2 4 6 8 10 intervention points 0.6 0.65 0.7 0.75 0.8 prediction accuracy CLL OPL RND PRK WEI CLL OPL RND PRK WEI methods 5 10 15 20 sum of exposure Minimum Maximization 50 100 150 200 250 network size 0.45 0.5 0.55 0.6 0.65 prediction accuracy CLL OPL RND WFL PRP 2 4 6 8 10 intervention points 0.4 0.45 0.5 0.55 0.6 0.65 prediction accuracy CLL OPL RND WFL PRP CLL OPL RND WFL PRP methods 0 0.5 1 1.5 minimum exposure Least-squares Shaping 50 100 150 200 250 network size 0.5 0.55 0.6 0.65 prediction accuracy CLL OPL RND GRD REL 2 4 6 8 10 intervention points 0.45 0.5 0.55 0.6 0.65 prediction accuracy CLL OPL RND GRD REL CLL OPL RND GRD REL methods 5000 5500 6000 6500 7000 average distance Performance vs. # users Performance vs. # points Objective function Figure 2: real world dataset results; n = 300, M = 6, T = 40 more difficult as more random variables are involved. The middle panel shows the performance with respect to increasing the number of intervention points. Here, a slight increase in the performance is apparent. As the number of intervention points increases the algorithm has more control over the outcome and can reach the objective function better. Fig. 2 top row summarizes the results of CEM. The left panel demonstrates the predictive performance of the algorithms. CLL consistently outperforms the rest. With 65-70 % of accuracy in predicting the optimal cascade. The right panel shows the objective function simulated 10 times with the learned parameters for network of n = 300 users on 6 intervention points. The extra 2.5 extra exposure per user compared to the second best method with the same budget and constraint would be a significant advertising achievement. Among the competitors OPL and RND seem to perform good. If there where no cap over the resultant exposure, all methods would perform comparably because of the linearity of sum of exposure. However, the successful method is the one who manage to maximize exposure considering the cap. Failure of PRK and WEI indicates that structural properties are not enough to capture the influence. Compared to these two, RND performs better in average, however exhibits a larger variance as expected. Fig. 2 middle row summarizes the results for MEM and shows CLL outperforms others consistently. CLL still is the best algorithm and OPL and RND are the significant baselines. Failure of WFL and PRP shows the network structure plays a significant role in the activity and exposure processes. The bottom row in Fig. 2 demonstrates the results of LES. CLL is still the best method. OPL is still strong but RND is not performing well. The objective function is summation of the square of the gap between target and current exposure. This explains why GRD is showing a comparable success, since, it starts with the highest gap in the exposure and greedily allocates the budget. Conclusion. In this paper, we introduced the optimal multistage campaigning problem, which is a generalization of the activity shaping and influence maximization problems, and it allows for more elaborate goal functions. Our model of social activity is based on multivariate Hawkes process, and for the first time, we manage to derive a linear connection between a time-varying exogenous intensity and the overall network exposure of the campaign. Acknowledgement. The work is supported in part by NSF/NIH BIGDATA R01 GM108341, NSF IIS-1639792, NSF DMS-1620345, and NSF DMS-1620342. 8 References [1] D M West. Air Wars: Television Advertising and Social Media in Election Campaigns, 1952-2012: Television Advertising and Social Media in Election Campaigns, 1952-2012. Sage, 2013. [2] M Vergeer, L Hermans, and S Sams. Online social networks and micro-blogging in political campaigning the exploration of a new campaign tool and a new campaign style. Party Politics, 2013. [3] Dimitri P Bertsekas. Dynamic programming and optimal control, volume 1. [4] D J Daley and D Vere-Jones. An introduction to the theory of point processes. Springer Science & Business Media, 2007. [5] K Zhou, H Zha, and L Song. Learning social infectivity in sparse low-rank networks using multidimensional hawkes processes. In AISTATS, 2013. [6] O Aalen, O Borgan, and H Gjessing. Survival and event history analysis: a process point of view. Springer, 2008. [7] A G Hawkes. Spectra of some self-exciting and mutually exciting point processes. Biometrika, 1971. [8] M Farajtabar, N Du, M Gomez-Rodriguez, I Valera, L Song, and H Zha. Shaping social activity by incentivizing users. NIPS, 2014. [9] J Leskovec, L Backstrom, and J Kleinberg. Meme-tracking and the dynamics of the news cycle. SIGKDD, 2009. [10] SH Yang and H Zha. Mixture of mutually exciting processes for viral diffusion. ICML, 2013. [11] D Kempe, J Kleinberg, and E Tardos. Maximizing the spread of influence through a social network. SIGKDD, 2003. [12] FB Hanson. Applied stochastic processes and control for Jump-diffusions: modeling, analysis, and computation, volume 13. Siam, 2007. [13] A De, I Valera, N Ganguly, S Bhattacharya, and M Gomez Rodriguez. Modeling opinion dynamics in diffusion networks. arXiv:1506.05474, 2015. [14] Y Wang, E Theodorou, A Verma, and L Song. Steering opinion dynamics in information diffusion networks. arXiv:1603.09021, 2016. [15] D Bloembergen, B Ranjbar Sahraei, H Bou-Ammar, K Tuyls, and G Weiss. Influencing social networks: An optimal control study. In ECAI, 2014. [16] K Kandhway and J Kuri. Campaigning in heterogeneous social networks: Optimal control of si information epidemics. 2015. [17] Pin-Yu Chen, Shin-Ming Cheng, and Kwang-Cheng Chen. Optimal control of epidemic information dissemination over networks. Cybernetics, IEEE Transactions on, 2014. [18] W Lian, R Henao, V Rao, J Lucas, and L Carin. A multitask point process predictive model. ICML, 2015. [19] AP Parikh, A Gunawardana, and C Meek. Conjoint modeling of temporal dependencies in event streams. UAI, 2012. [20] PO Perry and PJ Wolfe. Point process modeling for directed interaction networks. Journal of the Royal Statistical Society, 2013. [21] SW Linderman and RP Adams. Discovering latent network structure in point process data. ICML, 2014. [22] C Blundell, J Beck, and KA Heller. Modelling reciprocating relationships with hawkes processes. NIPS, 2012. [23] T Iwata, A Shah, and Z Ghahramani. Discovering latent influence in online social activities via shared cascade poisson processes. SIGKDD, 2013. [24] O Hijab. Introduction to calculus and classical analysis. Springer, 2007. [25] GB Folland. Real analysis: modern techniques and their applications. John Wiley & Sons, 2013. [26] R Bracewell. The fourier transform and iis applications. New York, 5, 1965. [27] AH Al-Mohy and MJ Higham. Computing the action of the matrix exponential, with an application to exponential integrators. SIAM journal on scientific computing, 2011. 9 | 2016 | 409 |
6,338 | Optimal Architectures in a Solvable Model of Deep Networks Jonathan Kadmon The Racah Institute of Physics and ELSC The Hebrew University, Israel jonathan.kadmon@mail.huji.ac.il Haim Sompolinsky The Racah Institute of Physics and ELSC The Hebrew University, Israel and Center for Brain Science Harvard University Abstract Deep neural networks have received a considerable attention due to the success of their training for real world machine learning applications. They are also of great interest to the understanding of sensory processing in cortical sensory hierarchies. The purpose of this work is to advance our theoretical understanding of the computational benefits of these architectures. Using a simple model of clustered noisy inputs and a simple learning rule, we provide analytically derived recursion relations describing the propagation of the signals along the deep network. By analysis of these equations, and defining performance measures, we show that these model networks have optimal depths. We further explore the dependence of the optimal architecture on the system parameters. 1 Introduction The use of deep feedforward neural networks in machine learning applications has become widespread and has drawn considerable research attention in the past few years. Novel approaches for training these structures to perform various computation are in constant development. However, there is still a gap between our ability to produce and train deep structures to complete a task and our understanding of the underlying computations. One interesting class of previously proposed models uses a series of sequential of de-noising autoencoders (dA) to construct a deep architectures [5, 14]. At it base, the dA receives a noisy version of a pre-learned pattern and retrieves the noiseless representation. Other methods of constructing deep networks by unsupervised methods have been proposed including the use of Restricted Boltzmann Machines (RBMs) [3, 12, 7]. Deep architectures have been of interest also to neuroscience as many biological sensory systems (e.g., vision, audition, olfaction and somatosensation, see e.g. [9, 13]) are organized in hierarchies of multiple processing stages. Despite the impressive recent success in training deep networks, fundamental understanding of the merits and limitations of signal processing in such architectures is still lacking. A theory of deep network entails two dynamical processes. One is the dynamics of weight matrices during learning. This problem is challenging even for linear architectures and progress has been made recently on this front (see e.g. [11]). The other dynamical process is the propagation of the signal and the information it carries through the nonlinear feedforward stages. In this work we focus on the second challenge, by analyzing the ’signal and noise’ neural dynamics in a solvable model of deep networks. We assume a simple clustered structure of inputs where inputs take the form of corrupted versions of a discrete set of cluster centers or ’patterns’. The goal of the multiple processing layer is to reformat the inputs such that the noise is suppressed allowing for a linear readout to perform classification tasks based on the top representations. We assume a simple learning rule for the synaptic matrices, the well known Pseudo-Inverse rule [10]. The advantage of this choice, beside its mathematics tractability, is the capacity for storing patterns. In particular, when the input 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. is noiseless, the propagating signals retain their desired representations with no distortion up to a reasonable capacity limit. In addition, previous studies of this rule showed that these systems have a considerable basins of attractions for pattern completion in a recurrent setting [8]. Here we study this system in a deep feedforward architecture. Using mean field theory we derive recursion relations for the propagation of signal and noise across the network layers, which are exact in the limit of large network sizes. Analyzing this recursion dynamics, we show that for fixed overall number of neurons, there is an optimal depth that minimizes the readout average classification error. We analyze the optimal depth as a function of the system parameters such as load, sparsity, and the overall system size. 2 Model of Feedforward Processing of Clustered Inputs We consider a network model of sensory processing composed of three or more layers of neurons arranged in a feedforward architecture (figure 1). The first layer, composed of N0 neuron is the input or stimulus layer. The input layer projects into a sequence of one or more intermediate layers, which we also refer to as processing layers. These layers can represent neurons in sensory cortices or cortical-like structures. The simplest case is a single processing layer (figure 1.A). More generally, we consider L processing layers with possibly different widths (figure 1.B). The last layer in the model is the readout layer, which represents a downstream neural population that receives input from the top processing layer and performs a specific computation, such as recognition of a specific stimulus or classification of stimuli. For concreteness, we will use a layer of one or more readout binary neurons that perform binary classifications on the inputs. For simplicity, all neurons in the network are binary units, i.e., the activity level of each neuron is either 0 (silent) or 1 (firing). We denote Si l 2 {0, 1}, the activity of the i 2 {1, . . . , Nl} neuron in the l = {1, . . . , L} layer; Nl denotes the size of the layer. The level of sparsity of the neural code, i.e. the fraction f of active neurons for each stimulus, is set by tuning the threshold Tl of the neurons in each layer (see below). For simplicity we will assume all neurons (except for the readout) have the same sparsity,f . Figure 1: Schematics of the network. The network receives input from N0 neurons and then projects them onto an intermediate layer composed of Nt processing neurons. The neurons can be arranged in a single (A) or multiple (B) layers. The readout layer receives input from the last processing layer. Input The input to the network is organized as clusters around P activity patterns. At it center, each cluster has a prototypical representation of an underlying specific stimulus, denoted as ¯Si 0,µ, where i = 1, ..., N0 , denotes the index of the neuron in the input layer l = 0, and the index µ = 1, ..., P, denotes the pattern number. The probability of an input neuron to be firing is denoted by f0. Other members of the clusters are noisy versions of the central pattern, representing natural variations in the stimulus representation due to changes in physical features in the world, input noise, or neural noise. We model the noise as iid Bernoulli distribution. Each noisy input Si 0,⌫from the ⌫th cluster, equals ¯Si 0,⌫( ¯ −S i 0,⌫) with probability (1 + m0)/2, ((1 −m0)/2) respectively. Thus, the average overlap of the noisy inputs with the central pattern, say µ = 1 is m0 = 1 N0f(1 −f) * N0 X i=1 # Si 0 −f $ # ¯Si 0,1 −f $ + , (1) 2 ranging from m0 = 1 denoting the noiseless limit, to m0 = 0 where the inputs are uncorrelated with the centers. Topologically, the inputs are organized into clusters with radius 1 −m0. Update rule The state Si l of the i-th neuron in the l > 0 layer is determined by thresholding the weighted sum of the activities in the antecedent layer: Si l = ⇥ # hi l −Tl $ . (2) Here ⇥is the step function and the field hi l represent the synaptic input to the neuron hi l = Nl−1 X j=1 W ij l,l−1 ⇣ Sj l−1 −f ⌘ . (3) where the sparsity f is the mean activity level of the preceding layer (set by thresholding, Eq. (2)). Synaptic matrix A key question is how the connectivity matrix W ij l,l−1 is chosen. Here we construct the weight matrix by first allocating for each layer l , a set of P random templates ⇠l,µ 2 {0, 1}N (with mean activity f), which are to serve as the representations of the P stimulus clusters in the layer. Next, W has to be trained to ensure that the response, ¯Sl,µ, of the layer l to a noiseless inputs, ¯S0,µ, equals ⇠l,µ . Here we use an explicit recipe to enforce these relations, namely the pseudo-inverse (PI) model [10, 8, 6], given by W ij l,l−1 = 1 Nl−1f(1 −f) P X µ,⌫=1 # ⇠i l,⌫−f $ ⇥ Cl−1⇤−1 µ⌫ ⇣ ⇠j l−1,µ −f ⌘ , (4) where Cl µ⌫= 1 Nlf(1 −f) Nl X i=1 # ⇠i l,µ −f $ # ⇠i l,⌫−f $ (5) is the correlation matrix of the random templates in the lth layer. For completeness we also denote ⇠0,µ = ¯S0,µ. This learning rule guarantees that for noiseless inputs, i.e., S0 = ⇠0,µ, the states of all the layers are Sl,µ = ⇠l,µ. This will in turn allow for a perfect readout performance if noise is zero. The capacity of this system is limited by the rank of Cl so we require P < Nl [8]. A similar model of clustered inputs fed into a single processing layer has been studied in [1] using a simpler, Hebbian projection weights. 3 Mean Field Equations for the Signal Propagation To study the dynamics of the signal along the network layers, we assume that the input to the network is a noisy version of one of the clusters, say, cluster µ = 1. In the notation above, the input is a state {Si 0} with an overlap m0 with the pattern ⇠0,1. Information about the cluster identity of the input is represented in subsequent layers through the overlap of the propagated state with the representation of the same cluster in each layer; in our case, the overlap between the response of the layer l, Sl, and ⇠l,1 , defined similarly to Eq. (1), as: ml = 1 Nlf(1 −f) * Nl X i=1 # Si l −f $ # ⇠i l,1 −f $ + . (6) In each layer the load is defined as ↵l = P Nl . (7) Using analytical mean field techniques (detailed in the supplementary material), exact in the limit of large N, we find a recursive equation for the overlaps of different layers. In this limit the fields and the fluctuations of the fields δhi l, assume Gaussian statistics as the realizations of the noisy input vary. The overlaps are evaluated by thresholding these variables, given by 3 (l ≥2) ml+1 = H " Tl+1 −(1 −f)ml p ∆l+1 + Ql+1 # −H " Tl+1 + fml p ∆l+1 + Ql+1 # , (8) where H(x) = (2⇡)−1/2 ´ 1 x dx exp(−x2/2). The threshold Tl is set for each layer by solving f = fH " Tl+1 −(1 −f)ml p ∆l+1 + Ql+1 # + (1 −f)H " Tl+1 + fml p ∆l+1 + Ql+1 # . (9) The factor ∆l+1 + Ql+1 is the variance of the fields D# δhi l+1 $2E which has two contributions. The first is due to the variance in the noisy responses of the previous layers, yielding ∆l+1 = f(1 −f) ↵l 1 −↵l # 1 −m2 l $ . (10) The second contribution comes from the spatial correlations between noisy responses of the previous layers, yielding Ql+1 = 1 −2↵l 2⇡(1 −↵l) f exp " −(Tl −(1 −f)ml−1)2 2(∆l + Ql) # + (1 −f) exp " −(Tl + fml−1)2 2(∆l + Ql) #!2 . (11) Note that despite the fact that the noise in the different nodes of the input layer is uncorrelated, as the signals propagate through the network, correlations between the noisy responses of different neurons in the same layer emerge. These correlations depend on the particular realization of the random templates, and will average to zero upon averaging over the templates. Nevertheless, they contribute a non-random contribution to the total variance of the fields at each layer. Interestingly, for ↵l > 1/2 this term becomes negative, and reduces the overall variance of the fields. The above recursion equations hold for l ≥2. The initial conditions for this layer is Q1 = 0 and m1, ∆1given by: (Layer 1) m1 = H T1 −(1 −f)m0 p∆1 2 −H T1 + fm0 p∆1 2 , (12) f = fH T1 −(1 −f)m0 p∆1 2 + (1 −f)H T1 + fm1 p∆1 2 , (13) and ∆1 = f(1 −f) ↵0 1 −↵0 # 1 −m2 0 $ . (14) where ↵0 = P/N0. Finally, we note that a previous analysis of the feedforward PI model (in the dense case, f = 0.5) reported results [6] neglected the contribution Ql of the induced correlations to the field variance. Indeed, their approximate equations fail to correctly describe the behavior of the system. As we will show, our recursion relations fully accounts for the behavior of the network in the limit of large N . Infinitely deep homogeneous network The above equations, eq (8)-(11) describe the dynamics of the average overlap of the network states and the variance in the inputs to the neurons in each layer. This dynamics depends on the sizes (and sparsity) of the different processing layers. Although the above equations are general, from now on, we will assume homogeneous architecture in which Nl = N = Nt/L (all with the same sparsity). To find the behavior of the signals as they propagate along this infinitely deep homogenous network (l ! 1) we look for the fixed points of the recursion equation. Solution of the equations reveals three fixed points of the trajectories. Two of them are stable fixed points, one at m = 0 and the other at m = 1. The third is an unstable fixed point at some intermediate 4 Figure 2: Overlap dynamics. (A) Trajectory of overlaps across layers from eq (8)-(11) (solid lines) and simulations (circles). Dashed red line show the predicted separatrix m†. The deviation from the theoretical prediction near the separatrix are due to final size effects of the simulations (↵= 0.4, f = 0.1). (B) Basin of attraction for two values of f as a function of ↵. Line show theoretical prediction and shaded area simulations. (C) Convergence time (number of layers) of the m = 1 attractor. Near the unstable fixed point (dashed vertical lines) convergence time diverges and rapidly decreases for larger initial conditions, m0 > m†. value m†. Initial conditions with overlaps obeying m0 > m† converge to 1, implying complete suppression of the input noise, while those with m0 < m† lose all overlap with the central pattern [figure 2.A], which depicts the values of the overlaps for different initial conditions. As expected, the curves (analytical results derived by numerically iterating the above mean field equations) terminate either at ml = 1 or ml = 0 for large l . The same holds for the numerical simulations (dots) except for a few intermediate values of initial conditions that converge to an intermediate asymptotic values of overlaps. These intermediate fixed points are ’finite size effects’. As the system size (Nt and correspondingly N) increases, the range of initial conditions that converge to intermediate fixed points shrinks to zero. In general increasing the sparsity of the representations (i.e., reducing f ) improves the performance of the network. As seen in [figure 2.B] the basin of attraction of the noiseless fixed point increases as f decreases. Convergence time In general, the overlaps approach the noiseless state relatively fast, i.e., within 5 −10 layers. This holds for initial conditions well within the basin of attraction of this fixed point. If the initial condition is close to the boundary of the basin, i.e., m0 ⇡m†, convergence is slow. In this case, the convergence time diverges as m0 ! m† from above [figure 2.C]. 4 Optimal Architecture We evaluate the performances of the network by the ability of readout neurons to correctly perform randomly chosen binary linear classifications of the clusters. For concreteness we consider the performance of a single readout neuron to perform a binary classification where for each central pattern, the desired label is ⇠ro,µ = 0, 1. The readout weights, projecting from the last processing layer into the readout [figure 1] are assumed to be learned to perform the correct classification by a pseudo-inverse rule, similar to the design of the processing weight matrices. The readout weight matrix is given by W j ro = 1 Nfro(1 −fro) P X µ,⌫=1 (⇠ro,µ −fro) ⇥ CL⇤−1 µ⌫ ⇣ ⇠j L,µ −f ⌘ . (15) We assume the readout labels are iid Bernoulli variables with zero bias (fro = 0.5), though a bias can be easily incorporated. The error of the readout is the probability of the neuron being in the opposite state than the labels. ✏= 1 −mro 2 , (16) where mro is the average overlap of the readout layer, and can be calculated using the recursion equations (8)-(11). However, Since generally f 6= fro, the activity factor need to be replaced in the 5 proper positions in the equations. For correctness, we bring the exact form of the readout equation in the supplementary material. 4.1 Single infinite layer In the following we explore the utility of deep architectures in performing the above tasks. Before assessing quantitatively different architectures, we present a simple comparison between a single infinitely wide layer and a deep network with a small number of finite-width layers. An important result of our theory is that for a model with a single processing layer with finite f, the overlap m1 and hence the classification error do not vanish even for a layer with infinite number of neurons. This holds for all levels of input noise, i.e., as long as m0 < 1. This can be seen by setting ↵= 0 in equations (8)-(11) for L = 2 . Note that although the variance contribution to the noise in the field, ∆ro vanishes, the contribution from the correlations, Q1, remains finite and is responsible for the fact that mro < 1 and ✏> 0 [1]. In contrast, in a deep network, if the initial overlap is within the basin of attraction the m = 1 solution, the overlap quickly approach m = 1 [figure (2).C]. This suggests that a deep architecture will generally perform better than a single layer, as can be seen in the example in figure 3.A. Mean error The readout error depends on the level of the initial noise (i.e., the value of m0). Here we introduce a global measure of performance, E , defined as the readout error averaged over the initial overlaps, E = 1 ˆ 0 dm0⇢(m0) ✏(m0) , (17) where the ⇢(m0) is the distribution of cluster sizes. For simplicity we use here a uniform distribution ⇢= 1. The mean error is a function of the parameters of the network, namely the sparsity f , the input and total loads ↵0 = P/N0, ↵t = P/Nt respectively, and the number of layers L, which describes the layout of the network. We are now ready to compare the performance of different architectures. 4.2 Limited resources In any real setting, the resources of the network are limited. This may be due to finite number of available neurons or a limit on the computational power. To evaluate the optimal architecture under constraints of a fixed total number of neurons, we assume that the total number of neurons is fixed to Nt = N0, where N0 is the size of the input layer. As in the analysis above, we consider for simplicity alternative uniform architectures in which all processing layers are of equal size N = Nt/L . The performance as a function of the number of layers is shown in figure 3.B which depicts the mean error against the number of processing layers L for several values of the expansion factor. These curves show that the error has a minimum at a finite depth Lopt = arg min L E(L). (18) The reason for this is that for shallower networks, the overlaps have not been iterated sufficient number of times and hence remain further from the noiseless fixed point. On the other hand, deeper networks will have an increased load at each layer, since ↵= P N0 L, (19) thereby reducing the noise suppression of each layer. As seen in the figure, increasing the total number of neurons, yields a lower mean error Eopt, and increases the the optimal depth on the network. Note however, that for large , the mean error rises slowly for L larger than its optimal value; this is is because the error changes very slowly with ↵for small ↵. and remains close to its ↵= 0 value. Thus, increasing the depth moderately above Lopt may not harm significantly the performance. Ultimately, if L increases to the order of N/P , the load in each processing layer ↵approaches 1, and the performance deteriorates drastically. Other considerations, such as time required for computation may favor shallower architectures, and in practice will limit the utility of architectures deeper than Lopt. 6 Figure 3: Optimal layout. (A) Comparing readout error produced by the same initial condition (m0 = 0.6) of a single, infinitely-wide processing layer to that of a deep architecture with ↵= 0.2. For both networks ↵0 = 0.7, f = 0.15 and m0 = 0.6. (B) Mean error as a function of the number of the processing layers for three values of expansion factor = Nt/N0. Dashed line shows the error of a single infinite layer. (C) Optimal number of layers as a function of the inverse of the input load (↵0 / P), for different values of sparsity. Lines show linear regression on the data points. (D) minimal error as a function of the input load (number of stored templates). Same color code as (C). The effect of load on the optimal architecture If the overall number of neurons in the network is fixed, then the optimal layout Lopt is a function of the size of the dataset, i.e, P. For large P, the optimal network becomes shallow. This is because that when the load is high, resources are better allocated to constrain ↵as much as possible, due to the high readout error when ↵is close to 1, figures C and D . As shown in [figure 3.D], Loptincreases with decreasing the load, scaling as Lopt / P −1/2. (20) This implies that the width Nopt scales as Nopt / P 1/2. (21) 4.3 Autoencoder example The model above assumes inputs in the form of random patterns (⇠0,µ) corrupted by noise. Here we illustrate that the qualitative behavior of the network for inputs generated by handwritten digits (MNIST dataset) with random corruptions. To visualize the suppression of noise by the deep pseudoinverse network, we train the network with autoencoder readout layer, namely use a readout layer of size N0 and readout labels equal the original noiseless images, ⇠ro,µ = ⇠0,µ. The readout weights are Pseudo-inverse weights with output labels identical to the input patterns, and following eq. (15). [? 2]. A perfect overlap at the readout layer implies perfect reconstruction of the original noiseless pattern. In figure 4, two networks were trained as autoencoders on a set of templates composed of 3-digit numbers (See experimental procedures in the supplementary material). Both networks have the same number of neurons. In the first, all processing neurons are placed in a single wide layer, while in the other neurons were divided into 10 equally-sized layers. As the theory predicts, the deep structure is able to reproduce the original templates for a wide range of initial noise, while the single layer typically reduces the noise but fails to reproduce the original image. 7 Figure 4: Visual example of the difference between a single processing layer and a deep structure. Input data was prepared using the MNIST handwritten digit database. Example of the templates are shown on the top row. Two different networks were trained to autoencode the inputs, one with all the processing neurons in a single layer (figure 1.A) and one in which the neurons were divided equally between 10 layers (figure 1.B) (See experimental procedures in the supplementary material for details). A noisy version of the templates were introduced to the two networks and the outputs are presented on the third and fourth rows, for different level of initial noise (columns). 5 Summary and Final Remarks Our paper aims at gaining a better understanding of the functionality of deep networks. Whereas the operation of the bottom (low level processing of the signals) and the top (fully supervised) stages are well understood, an understanding of the rationale of multiple intermediate stages and the tradeoffs between competing architectures is lacking. The model we study is simplified both in the task, suppressing noise, and its learning rule (pseudo-inverse). With respect to the first, we believe that changing the noise model to the more realistic variability inherent in objects will exhibit the same qualitative behaviors. With respect to the learning rule, the pseudo-inverse is close to SVM rule in the regime we work, so we believe that is a good tradeoff between realism and tractability. Thus, although the unavoidable simplicity of our model, we believe its analysis yields important insights which will likely carry over to the more realistic domains of deep networks studied in ML and neuroscience. Effects of sparseness Our results show that the performance of the network is improved as the sparsity of the representation increases. In the extreme case of f ! 0, perfect suppression of noise occurs already after a single processing layer. Cortical sensory representations exhibit only moderate sparsity levels, f ⇡0.1. Computational considerations of robustness to ’representational noise’ at each layer will also limit the value of f. Thus, deep architectures may be necessary for good performance at realistic moderate levels of sparsity (or for dense representations). Infinitely wide shallow architectures: A central result of our model is that a finite deep network may perform better than a network with a single processing layer of infinite width. An infinitely wide shallow network has been studied in the past (e.g., [4]). In principle, an infinitely wide network, even with random projection weights, may serve as a universal approximate, allowing for yielding readout performance as good as or superior to any finite deep network. This however requires a complex training of the readout weights. Our relatively simple readout weights are incapable of extracting this information from the infinite, shallow architecture. Similar behavior is seen with simpler readout weights, the Hebbian weights as well as with more complex readout generated by training the readout weights using SVMs with noiseless patterns or noisy inputs [1]. Thus, our results hold qualitatively for a broad range of plausible readout learning algorithms (such as Hebb, PI, SVM) but not for arbitrarily complex search that finds the optimal readout weights. 8 Acknowledgements This work was partially supported by IARPA (contract #D16PC00002), Gatsby Charitable Foundation, and Simons Foundation SCGB grant. References [1] Baktash Babadi and Haim Sompolinsky. Sparseness and Expansion in Sensory Representations. Neuron, 83(5):1213–1226, September 2014. [2] Pierre Baldi and Kurt Hornik. Neural networks and principal component analysis: Learning from examples without local minima. 2(1):53–58, 1989. [3] Maneesh Bhand, Ritvik Mudur, Bipin Suresh, Andrew Saxe, and Andrew Y Ng. Unsupervised learning models of primary cortical receptive fields and receptive field plasticity. ADVANCES IN NEURAL ..., pages 1971–1979, 2011. [4] Y Cho and L K Saul. Large-margin classification in infinite neural networks. Neural Computation, 22(10):2678–2697, 2010. [5] William W Cohen, Andrew McCallum, and Sam T Roweis, editors. Extracting and Composing Robust Features with Denoising Autoencoders. ACM, 2008. [6] E Domany, W Kinzel, and R Meir. Layered neural networks. Journal of Physics A: Mathematical and General, 22(12):2081–2102, June 1989. [7] G E Hinton and R R Salakhutdinov. Reducing the Dimensionality of Data with Neural Networks. science, 313(5786):504–507, July 2006. [8] I Kanter and Haim Sompolinsky. Associative recall of memory without errors. Physical Review A, 35(1):380–392, 1987. [9] Honglak Lee, Chaitanya Ekanadham, and Andrew Y Ng. Sparse deep belief net model for visual area V2. Advances in neural information ..., pages 873–880, 2008. [10] L Personnaz, I Guyon, and G Dreyfus. Information storage and retrieval in spin-glass like neural networks. Journal de Physique Lettres, 46(8):359–365, April 1985. [11] Andrew M Saxe, James L McClelland, and Surya Ganguli. Exact solutions to the nonlinear dynamics of learning in deep linear neural networks. arXiv.org, December 2013. [12] Paul Smolensky. Information Processing in Dynamical Systems: Foundations of Harmony Theory. February 1986. [13] Glenn C Turner, Maxim Bazhenov, and Gilles Laurent. Olfactory Representations by Drosophila Mushroom Body Neurons. Journal of Neurophysiology, 99(2):734–746, February 2008. [14] Pascal Vincent, Hugo Larochelle, Isabelle Lajoie, Yoshua Bengio, and Pierre-Antoine 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, March 2010. 9 | 2016 | 41 |
6,339 | Conditional Image Generation with PixelCNN Decoders Aäron van den Oord Google DeepMind avdnoord@google.com Nal Kalchbrenner Google DeepMind nalk@google.com Oriol Vinyals Google DeepMind vinyals@google.com Lasse Espeholt Google DeepMind espeholt@google.com Alex Graves Google DeepMind gravesa@google.com Koray Kavukcuoglu Google DeepMind korayk@google.com Abstract This work explores conditional image generation with a new image density model based on the PixelCNN architecture. The model can be conditioned on any vector, including descriptive labels or tags, or latent embeddings created by other networks. When conditioned on class labels from the ImageNet database, the model is able to generate diverse, realistic scenes representing distinct animals, objects, landscapes and structures. When conditioned on an embedding produced by a convolutional network given a single image of an unseen face, it generates a variety of new portraits of the same person with different facial expressions, poses and lighting conditions. We also show that conditional PixelCNN can serve as a powerful decoder in an image autoencoder. Additionally, the gated convolutional layers in the proposed model improve the log-likelihood of PixelCNN to match the state-ofthe-art performance of PixelRNN on ImageNet, with greatly reduced computational cost. 1 Introduction Recent advances in image modelling with neural networks [30, 26, 20, 10, 9, 28, 6] have made it feasible to generate diverse natural images that capture the high-level structure of the training data. While such unconditional models are fascinating in their own right, many of the practical applications of image modelling require the model to be conditioned on prior information: for example, an image model used for reinforcement learning planning in a visual environment would need to predict future scenes given specific states and actions [17]. Similarly image processing tasks such as denoising, deblurring, inpainting, super-resolution and colorization rely on generating improved images conditioned on noisy or incomplete data. Neural artwork [18, 5] and content generation represent potential future uses for conditional generation. This paper explores the potential for conditional image modelling by adapting and improving a convolutional variant of the PixelRNN architecture [30]. As well as providing excellent samples, this network has the advantage of returning explicit probability densities (unlike alternatives such as generative adversarial networks [6, 3, 19]), making it straightforward to apply in domains such as compression [32] and probabilistic planning and exploration [2]. The basic idea of the architecture is to use autoregressive connections to model images pixel by pixel, decomposing the joint image distribution as a product of conditionals. Two variants were proposed in the original paper: PixelRNN, where the pixel distributions are modeled with two-dimensional LSTM [7, 26], and PixelCNN, where they are modelled with convolutional networks. PixelRNNs generally give better performance, but PixelCNNs are much faster to train because convolutions are inherently easier to parallelize; given 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. 0 255 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 Blind spot Horizontal stack Vertical stack Figure 1: Left: A visualization of the PixelCNN that maps a neighborhood of pixels to prediction for the next pixel. To generate pixel xi the model can only condition on the previously generated pixels x1, . . . xi−1. Middle: an example matrix that is used to mask the 5x5 filters to make sure the model cannot read pixels below (or strictly to the right) of the current pixel to make its predictions. Right: Top: PixelCNNs have a blind spot in the receptive field that can not be used to make predictions. Bottom: Two convolutional stacks (blue and purple) allow to capture the whole receptive field. the vast number of pixels present in large image datasets this is an important advantage. We aim to combine the strengths of both models by introducing a gated variant of PixelCNN (Gated PixelCNN) that matches the log-likelihood of PixelRNN on both CIFAR and ImageNet, while requiring less than half the training time. We also introduce a conditional variant of the Gated PixelCNN (Conditional PixelCNN) that allows us to model the complex conditional distributions of natural images given a latent vector embedding. We show that a single Conditional PixelCNN model can be used to generate images from diverse classes such as dogs, lawn mowers and coral reefs, by simply conditioning on a one-hot encoding of the class. Similarly one can use embeddings that capture high level information of an image to generate a large variety of images with similar features. This gives us insight into the invariances encoded in the embeddings — e.g., we can generate different poses of the same person based on a single image. The same framework can also be used to analyse and interpret different layers and activations in deep neural networks. 2 Gated PixelCNN PixelCNNs (and PixelRNNs) [30] model the joint distribution of pixels over an image x as the following product of conditional distributions, where xi is a single pixel: p(x) = n2 Y i=1 p(xi|x1, ..., xi−1). (1) The ordering of the pixel dependencies is in raster scan order: row by row and pixel by pixel within every row. Every pixel therefore depends on all the pixels above and to the left of it, and not on any of other pixels. The dependency field of a pixel is visualized in Figure 1 (left). A similar setup has been used by other autoregressive models such as NADE [14] and RIDE [26]. The difference lies in the way the conditional distributions p(xi|x1, ..., xi−1) are constructed. In PixelCNN every conditional distribution is modelled by a convolutional neural network. To make sure the CNN can only use information about pixels above and to the left of the current pixel, the filters of the convolution are masked as shown in Figure 1 (middle). For each pixel the three colour channels (R, G, B) are modelled successively, with B conditioned on (R, G), and G conditioned on R. This is achieved by splitting the feature maps at every layer of the network into three and adjusting the centre values of the mask tensors. The 256 possible values for each colour channel are then modelled using a softmax. PixelCNN typically consists of a stack of masked convolutional layers that takes an N x N x 3 image as input and produces N x N x 3 x 256 predictions as output. The use of convolutions allows the predictions for all the pixels to be made in parallel during training (all conditional distributions from 2 Equation 1). During sampling the predictions are sequential: every time a pixel is predicted, it is fed back into the network to predict the next pixel. This sequentiality is essential to generating high quality images, as it allows every pixel to depend in a highly non-linear and multimodal way on the previous pixels. 2.1 Gated Convolutional Layers PixelRNNs, which use spatial LSTM layers instead of convolutional stacks, have previously been shown to outperform PixelCNNs as generative models [30]. One possible reason for the advantage is that the recurrent connections in LSTM allow every layer in the network to access the entire neighbourhood of previous pixels, while the region of the neighbourhood available to pixelCNN grows linearly with the depth of the convolutional stack. However this shortcoming can largely be alleviated by using sufficiently many layers. Another potential advantage is that PixelRNNs contain multiplicative units (in the form of the LSTM gates), which may help it to model more complex interactions. To amend this we replaced the rectified linear units between the masked convolutions in the original pixelCNN with the following gated activation unit: y = tanh(Wk,f ∗x) ⊙σ(Wk,g ∗x), (2) where σ is the sigmoid non-linearity, k is the number of the layer, ⊙is the element-wise product and ∗is the convolution operator. We call the resulting model the Gated PixelCNN. Feed-forward neural networks with gates have been explored in previous works, such as highway networks [25], grid LSTM [13] and neural GPUs [12], and have generally proved beneficial to performance. 2.2 Blind spot in the receptive field In Figure 1 (top right), we show the progressive growth of the effective receptive field of a 3 × 3 masked filter over the input image. Note that a significant portion of the input image is ignored by the masked convolutional architecture. This ‘blind spot’ can cover as much as a quarter of the potential receptive field (e.g., when using 3x3 filters), meaning that none of the content to the right of the current pixel would be taken into account. In this work, we remove the blind spot by combining two convolutional network stacks: one that conditions on the current row so far (horizontal stack) and one that conditions on all rows above (vertical stack). The arrangement is illustrated in Figure 1 (bottom right). The vertical stack, which does not have any masking, allows the receptive field to grow in a rectangular fashion without any blind spot, and we combine the outputs of the two stacks after each layer. Every layer in the horizontal stack takes as input the output of the previous layer as well as that of the vertical stack. If we had connected the output of the horizontal stack into the vertical stack, it would be able to use information about pixels that are below or to the right of the current pixel which would break the conditional distribution. Figure 2 shows a single layer block of a Gated PixelCNN. We combine Wf and Wg in a single (masked) convolution to increase parallelization. As proposed in [30] we also use a residual connection [11] in the horizontal stack. We have experimented with adding a residual connection in the vertical stack, but omitted it from the final model as it did not improve the results in our initial experiments. Note that the (n × 1) and (n × n) masked convolutions in Figure 2 can also be implemented by (⌈n 2 ⌉× 1) and (⌈n 2 ⌉× n) convolutions followed by a shift in pixels by padding and cropping. 2.3 Conditional PixelCNN Given a high-level image description represented as a latent vector h, we seek to model the conditional distribution p(x|h) of images suiting this description. Formally the conditional PixelCNN models the following distribution: p(x|h) = n2 Y i=1 p(xi|x1, ..., xi−1, h). (3) We model the conditional distribution by adding terms that depend on h to the activations before the nonlinearities in Equation 2, which now becomes: y = tanh(Wk,f ∗x + V T k,fh) ⊙σ(Wk,g ∗x + V T k,gh), (4) 3 n ⇥n 1 ⇥n tanh σ ⇥ + + 1 ⇥1 1 ⇥1 tanh σ ⇥ 2p p p p p p p 2p p Split feature maps p = #feature maps Figure 2: A single layer in the Gated PixelCNN architecture. Convolution operations are shown in green, element-wise multiplications and additions are shown in red. The convolutions with Wf and Wg from Equation 2 are combined into a single operation shown in blue, which splits the 2p features maps into two groups of p. where k is the layer number. If h is a one-hot encoding that specifies a class this is equivalent to adding a class dependent bias at every layer. Notice that the conditioning does not depend on the location of the pixel in the image; this is appropriate as long as h only contains information about what should be in the image and not where. For example we could specify that a certain animal or object should appear, but may do so in different positions and poses and with different backgrounds. We also developed a variant where the conditioning function was location dependent. This could be useful for applications where we do have information about the location of certain structures in the image embedded in h. By mapping h to a spatial representation s = m (h) (which has the same width and height as the image but may have an arbitrary number of feature maps) with a deconvolutional neural network m(), we obtain a location dependent bias as follows: y = tanh(Wk,f ∗x + Vk,f ∗s) ⊙σ(Wk,g ∗x + Vk,g ∗s). (5) where Vk,g ∗s is an unmasked 1 × 1 convolution. 2.4 PixelCNN Auto-Encoders Because conditional PixelCNNs have the capacity to model diverse, multimodal image distributions p(x|h), it is possible to apply them as image decoders in existing neural architectures such as autoencoders. An auto-encoder consists of two parts: an encoder that takes an input image x and maps it to a (usually) low-dimensional representation h, and a decoder that tries to reconstruct the original image. Starting with a traditional convolutional auto-encoder architecture [16], we replace the deconvolutional decoder with a conditional PixelCNN and train the complete network end-to-end. Since PixelCNN has proved to be a strong unconditional generative model, we would expect this change to improve the reconstructions. Perhaps more interestingly, we also expect it to change the representations that the encoder will learn to extract from the data: since so much of the low level pixel statistics can be handled by the PixelCNN, the encoder should be able to omit these from h and concentrate instead on more high-level abstract information. 3 Experiments 3.1 Unconditional Modeling with Gated PixelCNN Table 1 compares Gated PixelCNN with published results on the CIFAR-10 dataset. These architectures were all optimized for the best possible validation score, meaning that models that get a lower 4 score actually generalize better. Gated PixelCNN outperforms the PixelCNN by 0.11 bits/dim, which has a very significant effect on the visual quality of the samples produced, and which is close to the performance of PixelRNN. Model NLL Test (Train) Uniform Distribution: [30] 8.00 Multivariate Gaussian: [30] 4.70 NICE: [4] 4.48 Deep Diffusion: [24] 4.20 DRAW: [9] 4.13 Deep GMMs: [31, 29] 4.00 Conv DRAW: [8] 3.58 (3.57) RIDE: [26, 30] 3.47 PixelCNN: [30] 3.14 (3.08) PixelRNN: [30] 3.00 (2.93) Gated PixelCNN: 3.03 (2.90) Table 1: Test set performance of different models on CIFAR-10 in bits/dim (lower is better), training performance in brackets. In Table 2 we compare the performance of Gated PixelCNN with other models on the ImageNet dataset. Here Gated PixelCNN outperforms PixelRNN; we believe this is because the models are underfitting, larger models perform better and the simpler PixelCNN model scales better. We were able to achieve similar performance to the PixelRNN (Row LSTM [30]) in less than half the training time (60 hours using 32 GPUs). For the results in Table 2 we trained a larger model with 20 layers (Figure 2), each having 384 hidden units and filter size of 5 × 5. We used 200K synchronous updates over 32 GPUs in TensorFlow [1] using a total batch size of 128. 32x32 Model NLL Test (Train) Conv Draw: [8] 4.40 (4.35) PixelRNN: [30] 3.86 (3.83) Gated PixelCNN: 3.83 (3.77) 64x64 Model NLL Test (Train) Conv Draw: [8] 4.10 (4.04) PixelRNN: [30] 3.63 (3.57) Gated PixelCNN: 3.57 (3.48) Table 2: Performance of different models on ImageNet in bits/dim (lower is better), training performance in brackets. 3.2 Conditioning on ImageNet Classes For our second experiment we explore class-conditional modelling of ImageNet images using Gated PixelCNNs. Given a one-hot encoding hi for the i-th class we model p(x|hi). The amount of information that the model receives is only log(1000) ≈0.003 bits/pixel (for a 32x32 image). Still, one could expect that conditioning the image generation on class label could significantly improve the log-likelihood results, however we did not observe big differences. On the other hand, as noted in [27], we observed great improvements in the visual quality of the generated samples. In Figure 3 we show samples from a single class-conditional model for 8 different classes. We see that the generated classes are very distinct from one another, and that the corresponding objects, animals and backgrounds are clearly produced. Furthermore the images of a single class are very diverse: for example the model was able to generate similar scenes from different angles and lightning conditions. It is encouraging to see that given roughly 1000 images from every animal or object the model is able to generalize and produce new renderings. 5 3.3 Conditioning on Portrait Embeddings In our next experiment we took the latent representations from the top layer of a convolutional network trained on a large database of portraits automatically cropped from Flickr images using a face detector. The quality of images varied wildly, because a lot of the pictures were taken with mobile phones in bad lightning conditions. The network was trained with a triplet loss function [23] that ensured that the embedding h produced for an image x of a specific person was closer to the embeddings for all other images of the same person than it was to any embedding of another person. After the supervised net was trained we took the (image=x, embedding=h) tuples and trained the Conditional PixelCNN to model p(x|h). Given a new image of a person that was not in the training set we can compute h = f(x) and generate new portraits of the same person. Samples from the model are shown in Figure 4. We can see that the embeddings capture a lot of the facial features of the source image and the generative model is able to produce a large variety of new faces with these features in new poses, lighting conditions, etc. Finally, we experimented with reconstructions conditioned on linear interpolations between embeddings of pairs of images. The results are shown in Figure 5. Every image in a single row used the same random seed in the sampling which results in smooth transitions. The leftmost and rightmost images are used to produce the end points of interpolation. 3.4 PixelCNN Auto Encoder This experiment explores the possibility of training both the encoder and decoder (PixelCNN) endto-end as an auto-encoder. We trained a PixelCNN auto-encoder on 32x32 ImageNet patches and compared the results with those from a convolutional auto-encoder trained to optimize MSE. Both models used a 10 or 100 dimensional bottleneck. Figure 6 shows the reconstructions from both models. For the PixelCNN we sample multiple conditional reconstructions. These images support our prediction in Section 2.4 that the information encoded in the bottleneck representation h will be qualitatively different with a PixelCNN decoder than with a more conventional decoder. For example, in the lowest row we can see that the model generates different but similar looking indoor scenes with people, instead of trying to exactly reconstruct the input. 4 Conclusion This work introduced the Gated PixelCNN, an improvement over the original PixelCNN that is able to match or outperform PixelRNN [30], and is computationally more efficient. In our new architecture, we use two stacks of CNNs to deal with “blind spots” in the receptive field, which limited the original PixelCNN. Additionally, we use a gating mechanism which improves performance and convergence speed. We have shown that the architecture gets similar performance to PixelRNN on CIFAR-10 and is now state-of-the-art on the ImageNet 32x32 and 64x64 datasets. Furthermore, using the Conditional PixelCNN we explored the conditional modelling of natural images in three different settings. In class-conditional generation we showed that a single model is able to generate diverse and realistic looking images corresponding to different classes. On human portraits the model is capable of generating new images from the same person in different poses and lightning conditions from a single image. Finally, we demonstrated that the PixelCNN can be used as a powerful image decoder in an autoencoder. In addition to achieving state of the art log-likelihood scores in all these datasets, the samples generated from our model are of very high visual quality showing that the model captures natural variations of objects and lighting conditions. In the future it might be interesting to try and generate new images with a certain animal or object solely from a single example image [21, 22]. Another exciting direction would be to combine Conditional PixelCNNs with variational inference to create a variational auto-encoder. In existing work p(x|h) is typically modelled with a Gaussian with diagonal covariance and using a PixelCNN instead could thus improve the decoder in VAEs. Another promising direction of this work would be to model images based on an image caption instead of class label [15, 19]. 6 African elephant Coral Reef Sandbar Sorrel horse Lhasa Apso (dog) Lawn mower Brown bear Robin (bird) Figure 3: Class-Conditional samples from the Conditional PixelCNN. Figure 4: Left: source image. Right: new portraits generated from high-level latent representation. Figure 5: Linear interpolations in the embedding space decoded by the PixelCNN. Embeddings from leftmost and rightmost images are used for endpoints of the interpolation. 7 m = 10 m = 100 m = 10 m = 100 m = 10 m = 100 Figure 6: Left to right: original image, reconstruction by an auto-encoder trained with MSE, conditional samples from a PixelCNN auto-encoder. Both auto-encoders were trained end-to-end with a m = 10-dimensional bottleneck and a m = 100 dimensional bottleneck. References [1] Martın Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, et al. Tensorflow: Large-scale machine learning on heterogeneous distributed systems. arXiv preprint arXiv:1603.04467, 2016. [2] Marc G Bellemare, Sriram Srinivasan, Georg Ostrovski, Tom Schaul, David Saxton, and Remi Munos. Unifying count-based exploration and intrinsic motivation. arXiv preprint arXiv:1606.01868, 2016. [3] Emily L Denton, Soumith Chintala, Rob Fergus, et al. Deep generative image models using a laplacian pyramid of adversarial networks. In Advances in Neural Information Processing Systems, pages 1486–1494, 2015. [4] Laurent Dinh, David Krueger, and Yoshua Bengio. NICE: Non-linear independent components estimation. arXiv preprint arXiv:1410.8516, 2014. [5] Leon A Gatys, Alexander S Ecker, and Matthias Bethge. A neural algorithm of artistic style. arXiv preprint arXiv:1508.06576, 2015. [6] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in Neural Information Processing Systems, pages 2672–2680, 2014. [7] Alex Graves and Jürgen Schmidhuber. Offline handwriting recognition with multidimensional recurrent neural networks. In Advances in Neural Information Processing Systems, 2009. [8] Karol Gregor, Frederic Besse, Danilo J Rezende, Ivo Danihelka, and Daan Wierstra. Towards conceptual compression. arXiv preprint arXiv:1601.06759, 2016. [9] Karol Gregor, Ivo Danihelka, Alex Graves, and Daan Wierstra. DRAW: A recurrent neural network for image generation. Proceedings of the 32nd International Conference on Machine Learning, 2015. [10] Karol Gregor, Ivo Danihelka, Andriy Mnih, Charles Blundell, and Daan Wierstra. Deep autoregressive networks. In Proceedings of the 31st International Conference on Machine Learning, 2014. [11] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. arXiv preprint arXiv:1512.03385, 2015. [12] Łukasz Kaiser and Ilya Sutskever. Neural gpus learn algorithms. arXiv preprint arXiv:1511.08228, 2015. [13] Nal Kalchbrenner, Ivo Danihelka, and Alex Graves. Grid long short-term memory. arXiv preprint arXiv:1507.01526, 2015. [14] Hugo Larochelle and Iain Murray. The neural autoregressive distribution estimator. The Journal of Machine Learning Research, 2011. 8 [15] Elman Mansimov, Emilio Parisotto, Jimmy Lei Ba, and Ruslan Salakhutdinov. Generating images from captions with attention. arXiv preprint arXiv:1511.02793, 2015. [16] Jonathan Masci, Ueli Meier, Dan Cire¸san, and Jürgen Schmidhuber. Stacked convolutional auto-encoders for hierarchical feature extraction. In Artificial Neural Networks and Machine Learning–ICANN 2011, pages 52–59. Springer, 2011. [17] Junhyuk Oh, Xiaoxiao Guo, Honglak Lee, Richard L Lewis, and Satinder Singh. Action-conditional video prediction using deep networks in atari games. In Advances in Neural Information Processing Systems, pages 2845–2853, 2015. [18] Christopher Olah and Mike Tyka. Inceptionism: Going deeper into neural networks. 2015. [19] Scott Reed, Zeynep Akata, Xinchen Yan, Lajanugen Logeswaran, Bernt Schiele, and Honglak Lee. Generative adversarial text to image synthesis. arXiv preprint arXiv:1605.05396, 2016. [20] Danilo J Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In Proceedings of the 31st International Conference on Machine Learning, 2014. [21] Danilo Jimenez Rezende, Shakir Mohamed, Ivo Danihelka, Karol Gregor, and Daan Wierstra. One-shot generalization in deep generative models. arXiv preprint arXiv:1603.05106, 2016. [22] Ruslan Salakhutdinov, Joshua B Tenenbaum, and Antonio Torralba. Learning with hierarchical-deep models. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 35(8):1958–1971, 2013. [23] Florian Schroff, Dmitry Kalenichenko, and James Philbin. Facenet: A unified embedding for face recognition and clustering. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 815–823, 2015. [24] Jascha Sohl-Dickstein, Eric A. Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep unsupervised learning using nonequilibrium thermodynamics. Proceedings of the 32nd International Conference on Machine Learning, 2015. [25] Rupesh K Srivastava, Klaus Greff, and Jürgen Schmidhuber. Training very deep networks. In Advances in Neural Information Processing Systems, pages 2368–2376, 2015. [26] Lucas Theis and Matthias Bethge. Generative image modeling using spatial LSTMs. In Advances in Neural Information Processing Systems, 2015. [27] Lucas Theis, Aaron van den Oord, and Matthias Bethge. A note on the evaluation of generative models. arXiv preprint arXiv:1511.01844, 2015. [28] Benigno Uria, Marc-Alexandre Côté, Karol Gregor, Iain Murray, and Hugo Larochelle. Neural autoregressive distribution estimation. arXiv preprint arXiv:1605.02226, 2016. [29] Aaron van den Oord and Joni Dambre. Locally-connected transformations for deep gmms. In International Conference on Machine Learning (ICML) : Deep learning Workshop, Abstracts, pages 1–8, 2015. [30] Aaron van den Oord, Nal Kalchbrenner, and Koray Kavukcuoglu. Pixel recurrent neural networks. arXiv preprint arXiv:1601.06759, 2016. [31] Aäron van den Oord and Benjamin Schrauwen. Factoring variations in natural images with deep gaussian mixture models. In Advances in Neural Information Processing Systems, 2014. [32] Aaron van den Oord and Benjamin Schrauwen. The student-t mixture as a natural image patch prior with application to image compression. The Journal of Machine Learning Research, 2014. 9 | 2016 | 410 |
6,340 | Global Optimality of Local Search for Low Rank Matrix Recovery Srinadh Bhojanapalli srinadh@ttic.edu Behnam Neyshabur bneyshabur@ttic.edu Nathan Srebro nati@ttic.edu Toyota Technological Institute at Chicago Abstract We show that there are no spurious local minima in the non-convex factorized parametrization of low-rank matrix recovery from incoherent linear measurements. With noisy measurements we show all local minima are very close to a global optimum. Together with a curvature bound at saddle points, this yields a polynomial time global convergence guarantee for stochastic gradient descent from random initialization. 1 Introduction Low rank matrix recovery problem is heavily studied and has numerous applications in collaborative filtering, quantum state tomography, clustering, community detection, metric learning and multi-task learning [21, 12, 9, 27]. We consider the “matrix sensing” problem of recovering a low-rank (or approximately low rank) p.s.d. matrix1 X⇤2 Rn⇥n, given a linear measurement operator A : Rn⇥n ! Rm and noisy measurements y = A(X⇤) + w, where w is an i.i.d. noise vector. An estimator for X⇤is given by the rank-constrained, non-convex problem minimize X:rank(X)r kA(X) −yk2. (1) This matrix sensing problem has received considerable attention recently [30, 29, 26]. This and other rank-constrained problems are common in machine learning and related fields, and have been used for applications discussed above. A typical theoretical approach to low-rank problems, including (1) is to relax the low-rank constraint to a convex constraint, such as the trace-norm of X. Indeed, for matrix sensing, Recht et al. [20] showed that if the measurements are noiseless and the measurement operator A satisfies a restricted isometry property, then a low-rank X⇤can be recovered as the unique solution to a convex relaxation of (1). Subsequent work established similar guarantees also for the noisy and approximate case [14, 6]. However, convex relaxations to the rank are not the common approach employed in practice. In this and other low-rank problems, the method of choice is typically unconstrained local optimization (via e.g. gradient descent, SGD or alternating minimization) on the factorized parametrization minimize U2Rn⇥r f(U) = kA(UU >) −yk2, (2) 1We study the case where X⇤is PSD. We believe the techniques developed here can be used to extend results to the general case. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. where the rank constraint is enforced by limiting the dimensionality of U. Problem (2) is a nonconvex optimization problem that could have many bad local minima (as we show in Section 5), as well as saddle points. Nevertheless, local optimization seems to work very well in practice. Working on (2) is much cheaper computationally and allows scaling to large-sized problems—the number of optimization variables is only O(nr) rather than O(n2), and the updates are usually very cheap, especially compared to typical methods for solving the SDP resulting from the convex relaxation. There is therefore a significant disconnect between the theoretically studied and analyzed methods (based on convex relaxations) and the methods actually used in practice. Recent attempts at bridging this gap showed that, some form of global “initialization”, typically relying on singular value decomposition, yields a solution that is already close enough to X⇤; that local optimization from this initializer gets to the global optima (or to a good enough solution). Jain et al. [15], Keshavan [17] proved convergence for alternating minimization algorithm provided the starting point is close to the optimum, while Zheng and Lafferty [30], Zhao et al. [29], Tu et al. [26], Chen and Wainwright [8], Bhojanapalli et al. [2] considered gradient descent methods on the factor space and proved local convergence. But all these studies rely on global initialization followed by local convergence, and do not tackle the question of the existence of spurious local minima or deal with optimization starting from random initialization. There is therefore still a disconnect between this theory and the empirical practice of starting from random initialization and relying only on the local search to find the global optimum. In this paper we show that, under a suitable incoherence condition on the measurement operator A (defined in Section 2), with noiseless measurements and with rank(X⇤) r, the problem (2) has no spurious local minima (i.e. all local minima are global and satisfy X⇤= UU >). Furthermore, under the same conditions, all saddle points have a direction with significant negative curvature, and so using a recent result of Ge et al. [10] we can establish that stochastic gradient descent from random initialization converges to X⇤in polynomial number of iterations. We extend the results also to the noisy and approximately-low-rank settings, where we can guarantee that every local minima is close to a global minimum. The incoherence condition we require is weaker than conditions used to establish recovery through local search, and so our results also ensures recovery in polynomial time under milder conditions than what was previously known. In particular, with i.i.d. Gaussian measurements, we ensure no spurious local minima and recovery through local search with the optimal number O(nr) of measurements. Related Work Our work is heavily inspired by Bandeira et al. [1], who recently showed similar behavior for the problem of community detection—this corresponds to a specific rank-1 problem with a linear objective, elliptope constraints and a binary solution. Here we take their ideas, extend them and apply them to matrix sensing with general rank-r matrices. In the past several months, similar type of results were also obtained for other non-convex problems (where the source of non-convexity is not a rank constraint), specifically complete dictionary learning [24] and phase recovery [25]. A related recent result of a somewhat different nature pertains to rank unconstrained linear optimization on the elliptope, showing that local minima of the rank-constrained problem approximate well the global optimum of the rank unconstrained convex problem, even though they might not be the global minima (in fact, the approximation guarantee for the actual global optimum is better) [18]. Another non-convex low-rank problem long known to not possess spurious local minima is the PCA problem, which can also be phrased as matrix approximation with full observations, namely minrank(X)r kA −XkF (e.g. [23]). Indeed, local search methods such as the power-method are routinely used for this problem. Recently local optimization methods for the PCA problem working more directly on the optimized formulation have also been studied, including SGD [22] and Grassmannian optimization [28]. These results are somewhat orthogonal to ours, as they study a setting in which it is well known there are never any spurious local minima, and the challenge is obtaining satisfying convergence rates. The seminal work of Burer and Monteiro [3] proposed low-rank factorized optimization for SDPs, and showed that for extremely high rank r > pm (number of constraints), an Augmented Lagrangian method converges asymptotically to the optimum. It was also shown that (under mild conditions) any rank deficient local minima is a global minima [4, 16], providing a post-hoc verifiable sufficient condition for global optimality. However, this does not establish any a-priori condition, based on problem structure, implying the lack of spurious local minima. 2 While preparing this manuscript, we also became aware of parallel work [11] studying the same question for the related but different problem of matrix completion. For this problem they obtain a similar guarantee, though with suboptimal dependence on the incoherence parameters and so suboptimal sample complexity, and requiring adding a specific non-standard regularizer to the objective—this is not needed for our matrix sensing results. We believe our work, together with the parallel work of [11], are the first to establish the lack of spurious local minima and the global convergence of local search from random initialization for a non-trivial rank-constrained problem (beyond PCA with full observations) with rank r > 1. Notation. For matrices X, Y 2 Rn⇥n, their inner product is hX, Y i = trace ! X>Y " . We use kXkF , kXk2 and kXk⇤for the Frobenius, spectral and nuclear norms of a matrix respectively. Given a matrix X, we use σi (X) to denote singular values of X in decreasing order. Xr = arg minrank(Y )r kX −Y kF denotes the rank-r approximation of X, as obtained via its truncated singular value decomposition. We use plain capitals R and Q to denote orthonormal matrices. 2 Formulation and Assumptions We write the linear measurement operator A : Rn⇥n ! Rm as A(X)i = hAi, Xi where Ai 2 Rn⇥n, yielding yi = hAi, X⇤i + wi, i = 1, · · · , m. We assume wi ⇠N(0, σ2 w) is i.i.d Gaussian noise. We are generally interested in the high dimensional regime where the number of measurements m is usually much smaller than the dimension n2. Even if we know that rank(X⇤) r, having many measurements might not be sufficient for recovery if they are not “spread out” enough. E.g., if all measurements only involve the first n/2 rows and columns, we would never have any information on the bottom-right block. A sufficient condition for identifiability of a low-rank X⇤from linear measurements by Recht et al. [20] is based on restricted isometry property defined below. Definition 2.1 (Restricted Isometry Property). Measurement operator A : Rn⇥n ! Rm (with rows Ai, i = 1, · · · , m) satisfies (r, δr) RIP if for any n ⇥n matrix X with rank r, (1 −δr)kXk2 F 1 m m X i=1 hAi, Xi2 (1 + δr)kXk2 F . (3) In particular, X⇤of rank r is identifiable if δ2r < 1 [see 20, Theorem 3.2]. One situation in which RIP is obtained is for random measurement operators. For example, matrices with i.i.d. N(0, 1) entries satisfy (r, δr)-RIP when m = O( nr δ2 ) [see 6, Theorem 2.3]. This implies identifiability based on i.i.d. Gaussian measurement with m = O(nr) measurements (coincidentally, the number of degrees of freedom in X⇤, optimal up to a constant factor). 3 Main Results We are now ready to present our main result about local minima for the matrix sensing problem (2). We first present the results for noisy sensing of exact low rank matrices, and then generalize the results also to approximately low rank matrices. Now we will present our result characterizing local minima of f(U), for low-rank X⇤. Recall that measurements are y = A(X⇤) + w, where entries of w are i.i.d. Gaussian - wi ⇠N(0, σ2 w). Theorem 3.1. Consider the optimization problem (2) where y = A(X⇤) + w, w is i.i.d. N(0, σ2 w), A satisfies (4r, δ4r)-RIP with δ4r < 1 10, and rank(X⇤) r. Then, with probability ≥1 −10 n2 (over the noise), for any local minimum U of f(U): kUU > −X⇤kF 20 r log(n) m σw. In particular, in the noiseless case (σw = 0) we have UU > = X⇤and so f(U) = 0 and every local minima is global. In the noiseless case, we can also relax the RIP requirement to δ4r < 1/5 (see Theorem 4.1 in Section 4). In the noisy case we cannot expect to ensure we always get to an exact global minima, since the noise might cause tiny fluctuations very close to the global minima possibly 3 creating multiple very close local minima. But we show that all local minima are indeed very close to some factorization U ⇤U ⇤> = X⇤of the true signal, and hence to a global optimum, and this “radius” of local minima decreases as we have more observations. The proof of the Theorem for the noiseless case is presented in Section 4. The proof for the general setting follows along the same lines and can be found in the Appendix. So far we have discussed how all local minima are global, or at least very close to a global minimum. Using a recent result by Ge et al. [10] on the convergence of SGD for non-convex functions, we can further obtain a polynomial bound on the number of SGD iterations required to reach the global minima. The main condition that needs to be established in order to ensure this, is that all saddle points of (2) satisfy the “strict saddle point condition”, i.e. have a direction with significant negative curvature: Theorem 3.2 (Strict saddle). Consider the optimization problem (2) in the noiseless case, where y = A(X⇤), A satisfies (4r, δ4r)-RIP with δ4r < 1 10, and rank(X⇤) r. Let U be a first order critical point of f(U) with UU > 6= X⇤. Then the smallest eigenvalue of the Hessian satisfies λmin 1 mr2(f(U)) & −2 5 σr(X⇤). Now consider the stochastic gradient descent updates, U + = Projb U −⌘ m X i=1 ( ⌦ Ai, UU >↵ −yi)AiU + !! , (4) where is uniformly distributed on the unit sphere and Projb is a projection onto kUkF b. Using Theorem 3.2 and the result of Ge et al. [10] we can establish: Theorem 3.3 (Convergence from random initialization). Consider the optimization problem (2) under the same noiseless conditions as in Theorem 3.2. Using b ≥kU ⇤kF , for some global optimum U ⇤of f(U), for any ✏, c > 0, after T = poly ⇣ 1 σr(X⇤), σ1(X⇤), b, 1 ✏, log(1/c) ⌘ iterations of (4) with an appropriate stepsize ⌘, starting from a random point uniformly distributed on kUkF = b, with probability at least 1 −c, we reach an iterate UT satisfying kUT −U ⇤kF ✏. The above result guarantees convergence of noisy gradient descent to a global optimum. Alternatively, second order methods such as cubic regularization (Nesterov and Polyak [19]) and trust region (Cartis et al. [7]) that have guarantees based on the strict saddle point property can also be used here. RIP Requirement: Our results require (4r, 1/10)-RIP for the noisy case and (4r, 1/5)-RIP for the noiseless case. Requiring (2r, δ2r)-RIP with δ2r < 1 is sufficient to ensure uniqueness of the global optimum of (1), and thus recovery in the noiseless setting [20], but all known efficient recovery methods require stricter conditions. The best guarantees we are aware of require (5r, 1/10)-RIP [20] or (4r, 0.414)-RIP [6] using a convex relaxation. Alternatively, (6r, 1/10)-RIP is required for global initialization followed by non-convex optimization [26]. In terms of requirements on (2r, δ2r)-RIP for non-convex methods, the best we are aware of is requiring δ2r < ⌦(1/r) [15, 29, 30]–this is a much stronger condition than ours, and it yields a suboptimal required number of spherical Gaussian measurements of ⌦(nr3). So, compared to prior work our requirement is very mild—it ensures efficient recovery, and requires the optimal number of spherical Gaussian measurements (up to a constant factor) of O(nr). Extension to Approximate Low Rank We can also obtain similar results that deteriorate gracefully if X⇤is not exactly low rank, but is close to being low-rank (see proof in the Appendix): Theorem 3.4. Consider the optimization problem (2) where y = A(X⇤) and A satisfies (4r, δ4r)RIP with δ4r < 1 100, Then, for any local minima U of f(U): kUU > −X⇤kF 4(kX⇤−X⇤ r kF + δ2rkX⇤−X⇤ r k⇤), where X⇤ r is the best rank r approximation of X⇤. 4 This theorem guarantees that any local optimum of f(U) is close to X⇤upto an error depending on kX⇤−X⇤ r k. For the low-rank noiseless case we have X⇤= X⇤ r and the right hand side vanishes. When X⇤is not exactly low rank, the best recovery error we can hope for is kX⇤−X⇤ r kF , since UU > is at most rank k. On the right hand side of Theorem 3.4, we have also a nuclear norm term, which might be higher, but it also gets scaled down by δ2r, and so by the number of measurements. m/n 10 20 30 40 Rank 4 6 8 10 12 14 16 18 20 m/n 10 20 30 40 Rank 4 6 8 10 12 14 16 18 20 m/n 5 10 15 20 25 30 35 40 Rank 2 4 6 8 10 12 14 16 18 20 Random SVD Figure 1: The plots in this figure compare the success probability of gradient descent between (left) random and (center) SVD initialization (suggested in [15]), for problem (2), with increasing number of samples m and various values of rank r. Right most plot is the first m for a given r, where the probability of success reaches the value 0.5. A run is considered success if kUU > − X⇤kF /kX⇤kF 1e −2. White cells denote success and black cells denote failure of recovery. We set n to be 100. Measurements yi are inner product of entrywise i.i.d Gaussian matrix and a rank-r p.s.d matrix with random subspace. We notice no significant difference between the two initialization methods, suggesting absence of local minima as shown. Both methods have phase transition around m = 2 · n · r. 4 Proof for the Noiseless Case In this section we present the proof characterizing the local minima of problem (2). For ease of exposition we first present the results for the noiseless case (w = 0). Proof for the general case can be found in the Appendix. Theorem 4.1. Consider the optimization problem (2) where y = A(X⇤), A satisfies (4r, δ4r)-RIP with δ4r < 1 5, and rank(X⇤) r. Then, for any local minimum U of f(U): UU > = X⇤. For the proof of this theorem we first discuss the implications of the first and second order optimality conditions and then show how to combine them to yield the result. Invariance of f(U) over r ⇥r orthonormal matrices introduces additional challenges in comparing a given stationary point to a global optimum. We have to find the best orthonormal matrix R to align a given stationary point U to a global optimum U ⇤, where U ⇤U ⇤> = X⇤, to combine results from the first and second order conditions, without degrading the isometry constants. Consider a local optimum U that satisfies first and second order optimality conditions of problem (2). In particular U satisfies rf(U) = 0 and z>r2f(U)z ≥0 for any z 2 Rn·r. Now we will see how these two conditions constrain the error UU > −U ⇤U ⇤>. First we present the following consequence of the RIP assumption [see 5, Lemma 2.1]. Lemma 4.1. Given two n ⇥n rank-r matrices X and Y , and a (4r, δ)-RIP measurement operator A, the following holds:----1 m m X i=1 hAi, Xi hAi, Y i −hX, Y i ----- δkXkF kY kF . (5) 4.1 First order optimality First we will consider the first order condition, rf(U) = 0. For any stationary point U this implies X i D Ai, UU > −U ⇤U ⇤>E AiU = 0. (6) 5 Now using the isometry property of Ai gives us the following result. Lemma 4.2. [First order condition] For any first order stationary point U of f(U), and A satisfying the (4r, δ)-RIP (3), the following holds: k(UU > −U ⇤U ⇤>)QQ>kF δ 000UU > −U ⇤U ⇤>000 F , where Q is an orthonormal matrix that spans the column space of U. This lemma states that any stationary point of f(U) is close to a global optimum U ⇤in the subspace spanned by columns of U. Notice that the error along the orthogonal subspace Q?, kX⇤Q?Q> ?kF can still be large making the distance between X and X⇤arbitrarily far. Proof of Lemma 4.2. Let U = QR, for some orthonormal Q. Consider any matrix of the form ZQR†> 2. The first order optimality condition then implies, m X i=1 D Ai, UU > −U ⇤U ⇤>E ⌦ Ai, UR†Q>Z>↵ = 0 The above equation together with Restricted Isometry Property (equation (5)) gives us the following inequality: --D UU > −U ⇤U ⇤>, QQ>Z>E--- δ 000UU > −U ⇤U ⇤>000 F 00QQ>Z>00 F . Note that for any matrix A, ⌦ A, QQ>Z ↵ = ⌦ QQ>A, Z ↵ . Furthermore, for any matrix A, sup{Z:kZkF 1} hA, Zi = kAkF . Hence the above inequality implies the lemma statement. 4.2 Second order optimality We now consider the second order condition to show that the error along Q?Q> ? is indeed bounded well. Let r2f(U) be the hessian of the objective function. Note that this is an n · r ⇥n · r matrix. Fortunately for our result we need to only evaluate the Hessian along vec(U −U ⇤R) for some orthonormal matrix R. Here vec(.) denotes writing a matrix in vector form. Lemma 4.3. [Hessian computation] Let U be a first order critical point of f(U). Then for any r ⇥r orthonormal matrix R and ∆j = ∆eje> j ( ∆= U −U ⇤R), r X j=1 vec (∆j)> ⇥ r2f(U) ⇤ vec (∆j) = m X i=1 ( r X j=1 4 ⌦ Ai, U∆> j ↵2 −2 D Ai, UU > −U ⇤U ⇤>E2 ), Hence from second order optimality of U we get, Corollary 4.1. [Second order optimality] Let U be a local minimum of f(U) . For any r ⇥r orthonormal matrix R, r X j=1 m X i=1 4 ⌦ Ai, U∆> j ↵2 ≥1 2 m X i=1 D Ai, UU > −U ⇤U ⇤>E2 , (7) Further for A satisfying (2r, δ) -RIP (equation (3)) we have, r X j=1 kUeje> j (U −U ⇤R)>k2 F ≥ 1 −δ 2(1 + δ)kUU > −U ⇤U ⇤>k2 F . (8) The proof of this result follows simply by applying Lemma 4.3. The above Lemma gives a bound on the distance in the factor (U) space kU(U −U ⇤R)>k2 F . To be able to compare the second order condition to the first order condition we need a relation between kU(U −U ⇤R)>k2 F and kX −X⇤k2 F . Towards this we show the following result. 2R† is the pseudo inverse of R 6 Lemma 4.4. Let U and U ⇤be two n ⇥r matrices, and Q is an orthonormal matrix that spans the column space of U. Then there exists an r ⇥r orthonormal matrix R such that for any first order stationary point U of f(U), the following holds: r X j=1 kUeje> j (U −U ⇤R)>k2 F 1 8kUU > −U ⇤U ⇤>k2 F + 34 8 k(UU > −U ⇤U ⇤>)QQ>k2 F . This Lemma bounds the distance in the factor space (k(U −U ⇤R)U >k2 F ) with kUU >−U ⇤U ⇤>k2 F and k(UU >−U ⇤U ⇤>)QQ>k2 F . Combining this with the result from second order optimality (Corollary 4.1) shows kUU >−U ⇤U ⇤>k2 F is bounded by a constant factor of k(UU >−U ⇤U ⇤>)QQ>k2 F . This implies kX⇤Q?Q?kF is bounded, opposite to what the first order condition implied (Lemma 4.2). The proof of the above lemma is in Section B. Hence from the above optimality conditions we get the proof of Theorem 4.1. Proof of Theorem 4.1. Assuming UU > 6= U ⇤U ⇤>, from Lemmas 4.2, 4.4 and Corollary 4.1 we get, ✓1 −δ 2(1 + δ) −1 8 ◆ kUU > −U ⇤U ⇤>k2 F 34 8 δ2 000(UU > −U ⇤U ⇤>) 000 2 F . If δ 1 5 the above inequality holds only if UU > = U ⇤U ⇤>. 5 Necessity of RIP We showed that there are no spurious local minima only under a restricted isometry assumption. A natural question is whether this is necessary, or whether perhaps the problem (2) never has any spurious local minima, perhaps similarly to the non-convex PCA problem minU 00A −UU >00. A good indication that this is not the case is that (2) is NP-hard, even in the noiseless case when y = A(X⇤) for rank(X⇤) k [20] (if we don’t require RIP, we can have each Ai be non-zero on a single entry in which case (2) becomes a matrix completion problem, for which hardness has been shown even under fairly favorable conditions [13])3. That is, we are unlikely to have a poly-time algorithm that succeeds for any linear measurement operator. Although this doesn’t formally preclude the possibility that there are no spurious local minima, but it just takes a very long time to find a local minima, this scenario seems somewhat unlikely. To resolve the question, we present an explicit example of a measurement operator A and y = A(X⇤) (i.e. f(X⇤) = 0), with rank(X⇤) = r, for which (1), and so also (2), have a non-global local minima. Example 1: Let f(X) = (X11 + X22 −1)2 + (X11 −1)2 + X2 12 + X2 21 and consider (1) with r = 1 (i.e. a rank-1 constraint). For X⇤= 1 0 0 0 " we have f(X⇤) = 0 and rank(X⇤) = 1. But X = 0 0 0 1 " is a rank 1 local minimum with f(X) = 1. We can be extended the construction to any rank r by simply adding Pr+2 i=3 (Xii −1)2 to the objective, and padding both the global and local minimum with a diagonal beneath the leading 2 ⇥2 block. In Example 1, we had a rank-r problem, with a rank-r exact solution, and a rank-r local minima. Another question we can ask is what happens if we allow a larger rank than the rank of the optimal solution. That is, if we have f(X⇤) = 0 with low rank(X⇤), even rank(X⇤) = 1, but consider (1) or (2) with a high r. Could we still have non-global local minima? The answer is yes... Example 2: Let f(X) = (X11 + X22 + X33 −1)2 + (X11 −1)2 + (X22 −X33)2 + P i,j:i6=j X2 ij and consider the problem (1) with a rank r = 2 constraint. We can verify that X⇤= 2 4 1 0 0 0 0 0 0 0 0 3 5 is a rank=1 global minimum with f(X⇤) = 0, but X = 2 4 0 0 0 0 1/2 0 0 0 1/2 3 5 is a local minimum with 3Note that matrix completion is tractable under incoherence assumptions, similar to RIP 7 f(X) = 1. Also for an arbitrary large rank constraint r > 1 (taking r to be odd for simplicity), extend the objective to f(X) = (X11 −1)2 + P(r−1)/2 i=1 ⇥ (X11 + X2i,2i + X(2i+1),(2i+1) −1)2 +(X2i,2i −X(2i+1),(2i+1))2⇤ . We still have a rank-1 global minimum X⇤with a single non-zero entry X⇤ 11 = 1, while X = (I −X⇤)/2 is a local minimum with f(X) = 1. 6 Conclusion We established that under conditions similar to those required for convex relaxation recovery guarantees, the non-convex formulation of matrix sensing (2) does not exhibit any spurious local minima (or, in the noisy and approximate settings, at least not outside some small radius around a global minima), and we can obtain theoretical guarantees on the success of optimizing it using SGD from random initialization. This matches the methods frequently used in practice, and can explain their success. This guarantee is very different in nature from other recent work on non-convex optimization for low-rank problems, which relied heavily on initialization to get close to the global optimum, and on local search just for the final local convergence to the global optimum. We believe this is the first result, together with the parallel work of Ge et al. [11], on the global convergence of local search for common rank-constrained problems that are worst-case hard. Our result suggests that SVD initialization is not necessary for global convergence, and random initialization would succeed under similar conditions (in fact, our conditions are even weaker than in previous work that used SVD initialization). To investigate empirically whether SVD initialization is indeed helpful for ensuring global convergence, in Figure 1 we compare recovery probability of random rank-k matrices for random and SVD initialization—there is no significant difference between the two. Beyond the implications for matrix sensing, we are hoping these type of results could be a first step and serve as a model for understanding local search in deep networks. Matrix factorization, such as in (2), is a depth-two neural network with linear transfer—an extremely simple network, but already non-convex and arguably the most complicated network we have a good theoretical understanding of. Deep networks are also hard to optimize in the worst case, but local search seems to do very well in practice. Our ultimate goal is to use the study of matrix recovery as a guide in understating the conditions that enable efficient training of deep networks. Acknowledgements Authors would like to thank Afonso Bandeira for discussions, Jason Lee and Tengyu Ma for sharing and discussing their work. This research was supported in part by an NSF RI/AF grant 1302662. References [1] A. S. Bandeira, N. Boumal, and V. Voroninski. On the low-rank approach for semidefinite programs arising in synchronization and community detection. arXiv preprint arXiv:1602.04426, 2016. [2] S. Bhojanapalli, A. Kyrillidis, and S. Sanghavi. Dropping convexity for faster semi-definite optimization. arXiv preprint arXiv:1509.03917, 2015. [3] S. Burer and R. D. Monteiro. A nonlinear programming algorithm for solving semidefinite programs via low-rank factorization. Mathematical Programming, 95(2):329–357, 2003. [4] S. Burer and R. D. Monteiro. Local minima and convergence in low-rank semidefinite programming. Mathematical Programming, 103(3):427–444, 2005. [5] E. J. Candès. The restricted isometry property and its implications for compressed sensing. Comptes Rendus Mathematique, 346(9):589–592, 2008. [6] E. J. Candes and Y. Plan. Tight oracle inequalities for low-rank matrix recovery from a minimal number of noisy random measurements. Information Theory, IEEE Transactions on, 57(4):2342–2359, 2011. [7] C. Cartis, N. I. Gould, and P. L. Toint. Complexity bounds for second-order optimality in unconstrained optimization. Journal of Complexity, 28(1):93–108, 2012. [8] Y. Chen and M. J. Wainwright. Fast low-rank estimation by projected gradient descent: General statistical and algorithmic guarantees. arXiv preprint arXiv:1509.03025, 2015. 8 [9] S. Flammia, D. Gross, Y.-K. Liu, and J. Eisert. Quantum tomography via compressed sensing: Error bounds, sample complexity and efficient estimators. New Journal of Physics, 14(9):095022, 2012. [10] R. Ge, F. Huang, C. Jin, and Y. Yuan. Escaping from saddle points—online stochastic gradient for tensor decomposition. In Proceedings of The 28th Conference on Learning Theory, pages 797–842, 2015. [11] R. Ge, J. Lee, and T. Ma. Matrix completion has no spurious local minimum. arXiv preprint arXiv:1605.07272, 2016. [12] D. Gross, Y.-K. Liu, S. T. Flammia, S. Becker, and J. Eisert. Quantum state tomography via compressed sensing. Physical review letters, 105(15):150401, 2010. [13] M. Hardt, R. Meka, P. Raghavendra, and B. Weitz. Computational limits for matrix completion. In Proceedings of The 27th Conference on Learning Theory, pages 703–725, 2014. [14] P. Jain, R. Meka, and I. S. Dhillon. Guaranteed rank minimization via singular value projection. In Advances in Neural Information Processing Systems, pages 937–945, 2010. [15] P. Jain, P. Netrapalli, and S. Sanghavi. Low-rank matrix completion using alternating minimization. In Proceedings of the 45th annual ACM Symposium on theory of computing, pages 665–674. ACM, 2013. [16] M. Journée, 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. [17] R. H. Keshavan. Efficient algorithms for collaborative filtering. PhD thesis, STANFORD, 2012. [18] A. Montanari. A Grothendieck-type inequality for local maxima. arXiv preprint arXiv:1603.04064, 2016. [19] Y. Nesterov and B. T. Polyak. Cubic regularization of newton method and its global performance. Mathematical Programming, 108(1):177–205, 2006. [20] B. Recht, M. Fazel, and P. A. Parrilo. Guaranteed minimum-rank solutions of linear matrix equations via nuclear norm minimization. SIAM review, 52(3):471–501, 2010. [21] J. D. Rennie and N. Srebro. Fast maximum margin matrix factorization for collaborative prediction. In Proceedings of the 22nd international conference on Machine learning, pages 713–719. ACM, 2005. [22] C. D. Sa, C. Re, and K. Olukotun. Global convergence of stochastic gradient descent for some non-convex matrix problems. In Proceedings of the 32nd International Conference on Machine Learning (ICML-15), pages 2332–2341, 2015. [23] N. Srebro and T. Jaakkola. Weighted low-rank approximations. In Proceedings of the 20th International Conference on Machine Learning (ICML-03), pages 720–727, 2003. [24] J. Sun, Q. Qu, and J. Wright. Complete dictionary recovery using nonconvex optimization. In Proceedings of The 32nd International Conference on Machine Learning, pages 2351–2360, 2015. [25] J. Sun, Q. Qu, and J. Wright. A geometric analysis of phase retrieval. preprint arXiv:1602.06664, 2016. [26] S. Tu, R. Boczar, M. Soltanolkotabi, and B. Recht. Low-rank solutions of linear matrix equations via Procrustes flow. arXiv preprint arXiv:1507.03566, 2015. [27] H.-F. Yu, P. Jain, P. Kar, and I. Dhillon. Large-scale multi-label learning with missing labels. In Proceedings of The 31st International Conference on Machine Learning, pages 593–601, 2014. [28] D. Zhang and L. Balzano. Global convergence of a grassmannian gradient descent algorithm for subspace estimation. arXiv preprint arXiv:1506.07405, 2015. [29] T. Zhao, Z. Wang, and H. Liu. A nonconvex optimization framework for low rank matrix estimation. In Advances in Neural Information Processing Systems, pages 559–567, 2015. [30] Q. Zheng and J. Lafferty. A convergent gradient descent algorithm for rank minimization and semidefinite programming from random linear measurements. In Advances in Neural Information Processing Systems, pages 109–117, 2015. 9 | 2016 | 411 |
6,341 | Tensor Switching Networks Chuan-Yung Tsai∗, Andrew Saxe∗, David Cox Center for Brain Science, Harvard University, Cambridge, MA 02138 {chuanyungtsai,asaxe,davidcox}@fas.harvard.edu Abstract We present a novel neural network algorithm, the Tensor Switching (TS) network, which generalizes the Rectified Linear Unit (ReLU) nonlinearity to tensor-valued hidden units. The TS network copies its entire input vector to different locations in an expanded representation, with the location determined by its hidden unit activity. In this way, even a simple linear readout from the TS representation can implement a highly expressive deep-network-like function. The TS network hence avoids the vanishing gradient problem by construction, at the cost of larger representation size. We develop several methods to train the TS network, including equivalent kernels for infinitely wide and deep TS networks, a one-pass linear learning algorithm, and two backpropagation-inspired representation learning algorithms. Our experimental results demonstrate that the TS network is indeed more expressive and consistently learns faster than standard ReLU networks. 1 Introduction Deep networks [1, 2] continue to post impressive successes in a wide range of tasks, and the Rectified Linear Unit (ReLU) [3, 4] is arguably the most used simple nonlinearity. In this work we develop a novel deep learning algorithm, the Tensor Switching (TS) network, which generalizes the ReLU such that each hidden unit conveys a tensor, instead of scalar, yielding a more expressive model. Like the ReLU network, the TS network is a linear function of its input, conditioned on the activation pattern of its hidden units. By separating the decision to activate from the analysis performed when active, even a linear classifier can reach back across all layers to the input of the TS network, implementing a deep-network-like function while avoiding the vanishing gradient problem [5], which can otherwise significantly slow down learning in deep networks. The trade-off is the representation size. We exploit the properties of TS networks to develop several methods suitable for learning in different scaling regimes, including their equivalent kernels for SVMs on small to medium datasets, a one-pass linear learning algorithm which visits each data point only once for use with very large but simpler datasets, and two backpropagation-inspired representation learning algorithms for more generic use. Our experimental results show that TS networks are indeed more expressive and consistently learn faster than standard ReLU networks. Related work is briefly summarized as follows. With respect to improving the nonlinearities, the idea of severing activation and analysis weights (or having multiple sets of weights) in each hidden layer has been studied in [6, 7, 8]. Reordering activation and analysis is proposed by [9]. On tackling the vanishing gradient problem, tensor methods are used by [10] to train single-hidden-layer networks. Convex learning and inference in various deep architectures can be found in [11, 12, 13] too. Finally, conditional linearity of deep ReLU networks is also used by [14], mainly to analyze their performance. In comparison, the TS network does not simply reorder or sever activation and analysis within each hidden layer. Instead, it is a cross-layer generalization of these concepts, which can be applied with most of the recent deep learning architectures [15, 9], not only to increase their expressiveness, but also to help avoiding the vanishing gradient problem (see Sec. 2.3). ∗Equal contribution. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. 2 3 Input X0 0 5 1 Scalar Switching ReLU X1 W1 1 1 1 1 −1 −1 Linear Readout y WX 2 3 Input X0 [0 0] [2 3] [2 3] Tensor Switching ReLU Z1 W1 1 1 1 1 −1 −1 Linear Readout y WZ Figure 1: (Left) A single-hidden-layer standard (i.e. Scalar Switching) ReLU network. (Right) A single-hidden-layer Tensor Switching ReLU network, where each hidden unit conveys a vector of activities—inactive units (top-most unit) convey a vector of zeros while active units (bottom two units) convey a copy of their input. 2 Tensor Switching Networks In the following we first construct the definition of shallow (single-hidden-layer) TS networks, then generalize the definition to deep TS networks, and finally describe their qualitative properties. For simplicity, we only show fully-connected architectures using the ReLU nonlinearity. However, other popular nonlinearities, e.g. max pooling and maxout [16], in addition to ReLU, are also supported in both fully-connected and convolutional architectures. 2.1 Shallow TS Networks The TS-ReLU network is a generalization of standard ReLU networks that permits each hidden unit to convey an entire tensor of activity (see Fig. 1). To describe it, we build up from the standard ReLU network. Consider a ReLU layer with weight matrix W1 ∈Rn1×n0 responding to an input vector X0 ∈Rn0. The resulting hidden activity X1 ∈Rn1 of this layer is X1 = max (0n1, W1X0) = H (W1X0) ◦(W1X0) where H is the Heaviside step function, and ◦denotes elementwise product. The rightmost equation splits apart each hidden unit’s decision to activate, represented by the term H (W1X0), from the information (i.e. result of analysis) it conveys when active, denoted by W1X0. We then go one step further to rewrite X1 as X1 = H (W1X0) ⊗X0 | {z } Z1 ⊙W1 × 1n0, (1) where we have made use of the following tensor operations: vector-tensor cross product C = A ⊗ B =⇒ci,j,k,... = aibj,k,..., tensor-matrix Hadamard product C = A ⊙B =⇒c...,j,i = a...,j,ibj,i and tensor summative reduction C = A × 1n =⇒c...,k,j = Pn i=1 a...,k,j,i. In (1), the input vector X0 is first expanded into a new matrix representation Z1 ∈Rn1×n0 with one row per hidden unit. If a hidden unit is active, the input vector X0 is copied to the corresponding row. Otherwise, the row is filled with zeros. Finally, this expanded representation Z1 is collapsed back by projection onto W1. The central idea behind the TS-ReLU network is to learn a linear classifier directly from the rich, expanded representation Z1, rather than collapsing it back to the lower dimensional X1. That is, in a standard ReLU network, the hidden layer activity X1 is sent through a linear classifier fX (WXX1) trained to minimize some loss function LX (fX). In the TS-ReLU network, by contrast, the expanded representation Z1 is sent to a linear classifier fZ (WZ vec (Z1)) with loss function LZ (fZ). Each TS-ReLU neuron thus transmits a vector of activities (a row of Z1), compared to a standard ReLU neuron that transmits a single scalar (see Fig. 1). Because of this difference, in the following we call the standard ReLU network a Scalar Switching ReLU (SS-ReLU) network. 2.2 Deep TS Networks The construction given above generalizes readily to deeper networks. Define a nonlinear expansion operation as X⊕W = H (WX)⊗X and linear contraction operation as Z⊖W = (Z ⊙W)×1n, such that (1) becomes Xl = ((Xl−1 ⊕Wl) ⊙Wl) × 1nl−1 = Xl−1 ⊕Wl ⊖Wl for a given layer l 2 with Xl ∈Rnl and Wl ∈Rnl×nl−1. A deep SS-ReLU network with L layers may then be expressed as a sequence of alternating expansion and contraction steps, XL = X0 ⊕W1 ⊖W1 · · · ⊕WL ⊖WL. (2) To obtain the deep TS-ReLU network, we further define the ternary expansion operation Z ⊕X W = H (WX) ⊗Z, such that the decision to activate is based on the SS-ReLU variables X, but the entire tensor Z is transmitted when the associated hidden unit is active. Let Z0 = X0. The l-th layer activity tensor of a TS network can then be written as Zl = H (WlXl−1) ⊗Zl−1 = Zl−1 ⊕Xl−1 Wl ∈ Rnl×nl−1×···×n0. Thus compared to a deep SS-ReLU network, a deep TS-ReLU network simply omits the contraction stages, ZL = Z0 ⊕X0 W1 · · · ⊕XL−1 WL. (3) Because there are no contraction steps, the order of Zl ∈Rnl×nl−1×···×n0 grows with depth, adding an additional dimension for each layer. One interpretation of this scheme is that, if a hidden unit at layer l is active, the entire tensor Zl−1 is copied to the appropriate position in Zl.1 Otherwise a tensor of zeros is copied. Another equivalent interpretation is that the input vector X0 is copied to a given position Zl(i, j, . . . , k, :) only if hidden units i, j, . . . , k at layers l, l −1, . . . , 1 respectively are all active. Otherwise, Zl(i, j, . . . , k, :) = 0n0. Hence activity propagation in the deep TS-ReLU network preserves the layered structure of a deep SS-ReLU network, in which a chain of hidden units across layers must activate for activity to propagate from input to output. 2.3 Properties The TS network decouples a hidden unit’s decision to activate (as encoded by the activation weights {Wl}) from the analysis performed on the input when the unit is active (as encoded by the analysis weights WZ). This distinguishing feature leads to the following 3 properties. Cross-layer analysis. Since the TS representation preserves the layered structure of a deep network and offers direct access to the entire input (parcellated by the activated hidden units), a simple linear readout can effectively reach back across layers to the input and thus implicitly learns analysis weights for all layers at one time in WZ. Therefore it avoids the vanishing gradient problem by construction.2 Error-correcting analysis. As activation and analysis are severed, a careful selection of the analysis weights can “clean up” a certain amount of inexactitude in the choice to activate, e.g. from noisy or even random activation weights. While for the SS network, bad activation also implies bad analysis. Fine-grained analysis. To see this, we consider single-hidden-layer TS and SS networks with just one hidden unit. The TS unit, when active, conveys the entire input vector, and hence any full-rank linear map from input to output may be implemented. The SS unit, when active, conveys just a single scalar, and hence can only implement a rank-1 linear map between input and output. By choosing the right analysis weights, a TS network can always implement an SS network,3 but not vice versa. As such, it clearly has greater modeling capacity for a fixed number of hidden units. Although the TS representation is highly expressive, it comes at the cost of an exponential increase in the size of its representation with depth, i.e. Q l nl. This renders TS networks of substantial width and depth very challenging (except as kernels). But as we will show, the expressiveness permits TS networks to perform fairly well without having to be extremely wide and deep, and often noticeably better than SS networks of the same sizes. Also, TS networks of useful sizes still can be implemented with reasonable computing resources, especially when combined with techniques in Sec. 4.3. 3 Equivalent Kernels In this section we derive equivalent kernels for TS-ReLU networks with arbitrary depth and an infinite number of hidden units at each layer, with the aim of providing theoretical insight into how TS-ReLU is analytically different from SS-ReLU. These kernels represent the extreme of infinite (but unlearned) features, and might be used in SVM on datasets of small to medium sizes. 1For convolutional networks using max pooling, the convolutional-window-sized input patch winning the max pooling is copied. In other words, different nonlinearities only change the way the input is switched. 2It is in spirit similar to models with skip connections to the output [17, 18], although not exactly reducible. 3Therefore TS networks are also universal function approximators [19]. 3 θ 0 0.5π π k -1 -0.5 0 0.5 1 Linear SS L=1 SS L=2 SS L=3 TS L=1 TS L=2 TS L=3 Figure 2: Equivalent kernels as a function of the angle between unit-length vectors x and y. The deep SS-ReLU kernel converges to 1 everywhere as L →∞, while the deep TSReLU kernel converges to 1 at the origin and 0 everywhere else. Consider a single-hidden-layer TS-ReLU network with n1 hidden units in which each element of the activation weight matrix W1 ∈Rn1×n0 is i.i.d. zero mean Gaussian with arbitrary standard deviation σ. The infinite-width random TS-ReLU kernel between two vectors x, y ∈Rn0 is the dot product between their expanded representations (scaled by p 2/n1 for convenience) in the limit of infinite hidden units, kTS 1 (x, y) = limn1→∞vec p 2/n1 x ⊕W1 ⊺ vec p 2/n1 y ⊕W1 = 2 E [H (w⊺x) H (w⊺y)] x⊺y, where w ∼N 0, σ2I is a n0-dimensional random Gaussian vector. The expectation is the probability that a randomly chosen vector w lies within 90 degrees of both x and y. Because w is drawn from an isotropic Gaussian, if x and y differ by an angle θ, then only the fraction π−θ 2π of randomly drawn w will be within 90 degrees of both, yielding the equivalent kernel of a single-hidden-layer infinite-width random TS-ReLU network given in (5).4 kSS 1 (x, y) = ¯kSS (θ) x⊺y = 1 −tan θ −θ π x⊺y (4) kTS 1 (x, y) = ¯kTS (θ) x⊺y = 1 −θ π x⊺y (5) Figure 2 compares (5) against the linear kernel and the single-hidden-layer infinite-width random SS-ReLU kernel (4) from [20] (see Linear, TS L = 1 and SS L = 1). It has two important qualitative features. First, it has discontinuous derivative at θ = 0, and hence a much sharper peak than the other kernels.5 Intuitively this means that a very close match counts for much more than a moderately close match. Second, unlike the SS-ReLU kernel which is non-negative everywhere, the TS-ReLU kernel still has a negative lobe, though it is substantially reduced relative to the linear kernel. Intuitively this means that being dissimilar to a support vector can provide evidence against a particular classification, but this negative evidence is much weaker than in a standard linear kernel. To derive kernels for deeper TS-ReLU networks, we need to consider the deeper SS-ReLU kernels as well, since its activation and analysis are severed, and the activation instead depends on its SS-ReLU counterpart. Based upon the recursive formulation from [20], first we define the zeroth-layer kernel k• 0 (x, y) = x⊺y and the generalized angle θ• l = cos−1 k• l (x, y)/ p k• l (x, x) k• l (y, y) , where • denotes SS or TS. Then we can easily get kSS l+1 (x, y) = ¯kSS θSS l kSS l (x, y),6 and kTS l+1 (x, y) = ¯kTS θSS l kTS l (x, y), where ¯k• follows (4) or (5) accordingly. Figure 2 also plots the deep TS-ReLU and SS-ReLU kernels as a function of depth. The shape of these kernels reveals sharply divergent behavior between the TS and SS networks. As depth increases, the equivalent kernel of the TS network falls off ever more rapidly as the angle between input vectors increases. This means that vectors must be an ever closer match to retain a high kernel value. As argued earlier, this highlights the ability of the TS network to pick up on and amplify small differences between inputs, resulting in a quasi-nearest-neighbor behavior. In contrast, the equivalent kernel of the SS network limits to one as depth increases. Thus, rather than amplifying small differences, it collapses them with depth such that even very dissimilar vectors receive high kernel values. 4This proof is succinct using a geometric view, while a longer proof can be found in the Supplementary Material. As the kernel is directly defined as a dot product between feature vectors, it is naturally a valid kernel. 5Interestingly, a similar kernel is also observed by [21] for models with explicit skip connections. 6We write (4) and kSS l differently from [20] for cleaner comparisons against TS-ReLU kernels. However they are numerically unstable expressions and are not used in our experiments to replace the original ones in [20]. 4 X0 XL LZ Z0 ZL = A0 AL ⊕W1⊖W1···⊕WL⊖WL Scalar Switching ⊕W1···⊕WL Tensor Switching ⊖W1···⊖WL Auxiliary Figure 3: Inverted backpropagation learning flowchart, where →denotes signal flow, 99K denotes pseudo gradient flow, and = denotes equivalence. (Top row) The SS pathway. (Bottom row) The TS and auxiliary pathways, where Zl’s are related by nonlinear expansions, and Al’s are related by linear contractions. The resulting AL is equivalent to the alternating expansion and contraction in the SS pathway that yields XL. 4 Learning Algorithms In the following we present 3 learning algorithms suitable for different scenarios. One-pass ridge regression in Sec. 4.1 learns only the linear readout (i.e. analysis weights WZ), leaving the hiddenlayer representations (i.e. activation weights {Wl}) random, hence it is convex and exactly solvable. Inverted backpropagation in Sec. 4.2 learns both analysis and activation weights. Linear RotationCompression in Sec. 4.3 also learns both weights, but learns activation weights in an indirect way. 4.1 Linear Readout Learning via One-pass Ridge Regression In this scheme, we leverage the intuition that precision in the decision for a hidden unit to activate is less important than carefully tuned analysis weights, which can in part compensate for poorly tuned activation weights. We randomly draw and fix the activation weights {Wl}, and then solve for the analysis weights WZ using ridge regression, which can be done in a single pass through the dataset. First, each data point p = 1, . . . , P is expanded into its tensor representation Zp L and then accumulated into the correlation matrices CZZ = P p vec (Zp L) vec (Zp L)⊺and CyZ = P p yp vec (Zp L)⊺. After all data points are processed once, the analysis weights are determined as WZ = CyZ (CZZ + λI)−1 where λ is an L2 regularization parameter. Unlike a standard SS network, which in this setting would only be able to select a linear readout from the top hidden layer to the final classification decision, the TS network offers direct access to entire input vectors, parcellated by the hidden units they activate. In this way, even a linear readout can effectively reach back across layers to the input, implementing a complex function not representable with an SS network with random filters. However, this scheme requires high memory usage, which is on the order of O QL l=0 n2 l for storing CZZ, and even higher computation cost7 for solving WZ, which makes deep architectures (i.e. L > 1) impractical. Therefore, this scheme may best suit online learning applications which allow only one-time access to data, but do not require a deep classifier. 4.2 Representation Learning via Inverted Backpropagation The ridge regression learning uses random activation weights and only learns analysis weights. Here we provide a “gradient-based” procedure to learn both weights. Learning the analysis weights (i.e. the final linear layer) WZ simply requires ∂LZ ∂WZ , which is generally easy to compute. However, since the activation weights Wl in the TS network only appear inside the Heaviside step function H with zero (or undefined) derivative, the gradient ∂LZ ∂Wl is also zero. To bypass this, we introduce a sequence of auxiliary variables Al defined by A0 = ZL and the recursion Al = Al−1 ⊖Wl ∈RnL×nL−1×···×nl. We then derive the pseudo gradient using the proposed inverted backpropagation as d ∂LZ ∂Wl = ∂LZ ∂A0 ∂A1 ∂A0 † · · · ∂Al ∂Al−1 † ∂Al ∂Wl , (6) where † denotes Moore–Penrose pseudoinverse. Because the Al’s are related via the linear contraction operator, these derivatives are non-zero and easy to compute. We find this works sufficiently well as a non-zero proxy for ∂LZ ∂Wl . 7Nonetheless this is a one-time cost and still can be advantageous over other slowly converging algorithms. 5 Our motivation with this scheme is to “recover” the learning behavior in SS networks. To see this, first note that AL = A0 ⊖W1 · · · ⊖WL = XL (see Fig. 3). This reflects the fact that the TS and SS networks are linear once the active set of hidden units is known, such that the order of expansion and contraction steps has no effect on the final output. Hence the linear contraction steps, which alternate with expansion steps in (3), can instead be gathered at the end after all expansion steps. The gradient in the SS network is then ∂LX ∂Wl = ∂LX ∂AL ∂AL ∂AL−1 · · · ∂Al+1 ∂Al ∂Al ∂Wl = ∂LX ∂AL ∂AL ∂AL−1 · · · ∂A1 ∂A0 | {z } ∂LX ∂A0 ∂A1 ∂A0 † · · · ∂Al ∂Al−1 † ∂Al ∂Wl . (7) Replacing ∂LX ∂A0 in (7) with ∂LZ ∂A0 , such that the expanded representation may influence the inverted gradient, we recover (6). Compared to one-pass ridge regression, this scheme controls the memory and time complexities at O (Q l nl), which makes training of a moderately-sized TS network on modern computing resources feasible. The ability to train activation weights also relaxes the assumption that analysis weights can “clean up” inexact activations caused by using even random weights. 4.3 Indirect Representation Learning via Linear Rotation-Compression Although the inverted backpropagation learning controls memory and time complexities better than the one-pass ridge regression, the exponential growth of a TS network’s representation still severely constrains its potential toward being applied in recent deep learning architectures, where network width and depth can easily go beyond, e.g., a thousand. In addition, the success of recent deep learning architectures also heavily depends on the acceleration provided by highly-optimized GPU-enabled libraries, where the operations of the previous learning schemes are mostly unsupported. To address these 2 concerns, we provide a standard backpropagation-compatible learning algorithm, where we no longer keep separate X and Z variables. Instead we define Xl = W∗ l vec (Xl−1 ⊕Wl), which directly flattens the expanded representation and linearly projects it against W∗ l ∈Rn∗ l ×nlnl−1. In this scheme, even though Wl still lacks a non-zero gradient, the W∗ l−1 of the previous layer can be learned using backpropagation to properly “rotate” Xl−1, such that it can be utilized by Wl and the TS nonlinearity. Therefore, the representation learning here becomes indirect. To simultaneously control the representation size, one can easily let n∗ l < nlnl−1 such that W∗ l becomes “compressive.” Interestingly, we find n∗ l = nl often works surprisingly well, which suggests linearly compressing the expanded TS representation back to the size of an SS representation can still retain its advantage, and thus is used as the default. This scheme can also be combined with inverted backpropagation if learning Wl is still desired. To understand why linear compression does not remove the TS representation power, we note that it is not equivalent to the linear contraction operation ⊖, where each tensor-valued unit is down projected independently. Linear compression introduces extra interaction between tensor-valued units. Another way to view the linear compression’s role is through kernel analysis as shown in Sec. 3—adding a linear layer does not change the shape of a given TS kernel. 5 Experimental Results Our experiments focus on comparing TS and SS networks with the goal of determining how the TS nonlinearities differ from their SS counterparts. SVMs using SS-ReLU and TS-ReLU kernels are implemented in Matlab based on libsvm-compact [22]. TS networks and all 3 learning algorithms in Sec. 4 are implemented in Python based on Numpy’s ndarray data structure. Both implementations utilize multicore CPU acceleration. In addition, TS networks with only the linear rotation-compression learning are also implemented in Keras, which enjoys much faster GPU acceleration. We adopt 3 datasets, viz. MNIST, CIFAR10 and SVHN2, where we reserve the last 5,000 training images for validation. We also include SVHN2’s extra training set (except for SVMs8) in the training process, and zero-pad MNIST images such that all datasets have the same spatial resolution—32×32. 8Due to the prohibitive kernel matrix size, as SVMs here can only be solved in the dual form. 6 Table 1: Error rate (%) and run time (×) comparison. MNIST CIFAR10 SVHN2 Time Error RateDepth One-pass – Asymptotic One-pass – Asymptotic One-pass – Asymptotic SS SVM – 1.405 – 43.187 – 21.601 1.0 TS SVM – 1.403 – 43.602 – 20.381 2.1 SS MLP 16.342 – 2.363 66.411 – 46.912 30.243 – 12.203 1.0 TS MLP RR 2.991 – 47.711 – 27.111 – 156.2 TS MLP LRC 3.332 – 2.062 55.691 – 46.872 20.422 – 12.583 11.7 TS MLP IBP-LRC 3.331 – 2.331 55.691 – 45.862 20.202 – 12.633 17.4 SS CNN 43.743+1 – 1.084+2 74.843+3 – 26.735+2 13.697+1 – 4.966+1 1.0 TS CNN LRC 3.855+3 – 0.866+2 54.403+3 – 25.748+3 9.137+3 – 5.066+3 2.0 RR = One-Pass Ridge Regression, LRC = Linear Rotation-Compression, IBP = Inverted Backpropagation. One-pass Error Rate ∆ -4% 0% 4% 16% 36% 64% 100% Asymptotic Error Rate ∆ -1% 0% 1% 4% 9% 16% MNIST CIFAR10 SVHN2 Seconds 10 100 1000 Error Rate 30% 40% 50% 60% 70% 80% SS L=3+1 SS L=6+2 SS L=9+3 TS L=3+1 TS L=6+2 TS L=9+3 Figure 4: Comparison of SS CNN and TS CNN LRC models. (Left) Each dot’s coordinate indicates the differences of one-pass and asymptotic error rates between one pair of SS CNN and TS CNN LRC models sharing the same hyperparameters. The first quadrant shows where the TS CNN LRC is better in both errors. (Right) Validation error rates v.s. training time on CIFAR10 from the shallower, intermediate and deeper models. For SVMs, we grid search for both kernels with depth from 1 to 10, C from 1 to 1, 000, and PCA dimension reduction of the images to 32, 64, 128, 256, or no reduction. For SS and TS networks with fully-connected (i.e. MLP) architectures, we grid search for depth from 1 to 3 and width (including PCA of the input) from 32 to 256 based on our Python implementation. For SS and TS networks with convolutional (i.e. CNN) architectures, we adopt VGG-style [15] convolutional layers with 3 standard SS convolution-max pooling blocks,9 where each block can have up to three 3 × 3 convolutions, plus 1 to 3 fully-connected SS or TS layers of fixed width 256. CNN experiments are based on our Keras implementation. For all MLPs and CNNs, we universally use SGD with learning rate 10−3, momentum 0.9, L2 weight decay 10−3 and batch size 128 to reduce the grid search complexity by focusing on architectural hyperparameters. All networks are trained for 100 epochs on MNIST and CIFAR10, and 20 epochs on SVHN2, without data augmentation. The source code and scripts for reproducing our experiments are available at https://github.com/coxlab/tsnet. Table 1 summarizes our experimental results, including both one-pass (i.e. first-epoch) and asymptotic (i.e. all-epoch) error rates and the corresponding depths (for CNNs, convolutional and fully-connected layers are listed separately). The TS nonlinearities perform better in almost all categories, confirming our theoretical insights in Sec. 2.3—the cross-layer analysis (as evidenced by their low error rates after only one epoch of training), the error-correcting analysis (on MNIST and CIFAR10, for instance, the one-pass error rates of TS MLP RR using fixed random activation are close to the asymptotic error rates of TS MLP LRC and IBP-LRC with trained activation), and the fine-grained analysis (the TS networks in general achieve better asymptotic error rates than their SS counterparts). 9This decision mainly is to accelerate the experimental process, since TS convolution runs much slower, but we also observe that TS nonlinearities in lower layers are not always helpful. See later for more discussion. 7 Backpropagation (SS MLP) Inverted Backpropagation (TS MLP IBP) Figure 5: Visualization of filters learned on (Top) MNIST, (Middle) CIFAR10 and (Bottom) SVHN2. To further demonstrate how using TS nonlinearities affects the distribution of performance across different architectures (here, mainly depth), we plot the performance gains (viz. one-pass and asymptotic error rates) introduced by using the TS nonlinearities on all CNN variants in Fig. 4. The fact that most dots are in the first quadrant (and none in the third quadrant) suggests the TS nonlinearities are predominantly beneficial. Also, to ease the concern that the TS networks’ higher complexity may simply consume their advantage on actual run time, we also provide examples of learning progress (i.e. validation error rate) over run time in Fig. 4. The results suggest that even our unoptimized TS network implementation can still provide sizable gains in learning speed. Finally, to verify the effectiveness of inverted backpropagation in learning useful activation filters even without the actual gradient, we train single-hidden-layer SS and TS MLPs with 16 hidden units each (without using PCA dimension reduction of the input) and visualize the learned filters in Fig. 5. The results suggest inverted backpropagation functions equally well. 6 Discussion Why do TS networks learn quickly? In general, the TS network sidesteps the vanishing gradient problem as it skips the long chain of linear contractions against the analysis weights (i.e. the auxiliary pathway in Fig. 3). Its linear readout has direct access to the full input vector, which is switched to different parts of the highly expressive expanded representation. This directly accelerates learning. Also, a well-flowing gradient confers benefits beyond the TS layers—e.g. SS layers placed before TS layers also learn faster since the TS layers “self-organize” rapidly, permitting useful error signals to flow to the lower layers faster.10 Lastly, when using the inverted backpropagation or linear rotationcompression learning, although {Wl} or {W∗ l } do not learn as fast as WZ, and may still be quite random in the first few epochs, the error-correcting nature of WZ can still compensate for the learning progress. Challenges toward deeper TS networks. As shown in Fig. 2, the equivalent kernels of deeper TS networks can be extremely sharp and discriminative, which unavoidably hurts invariant recognition of dissimilar examples. This may explain why we find having TS nonlinearities in only higher (instead of all) layers works better, since the lower SS layers can form invariant representations for the higher TS layers to classify. To remedy this, we may need to consider other types of regularization for WZ (instead of L2) or other smoothing techniques [25, 26]. Future work. Our main future direction is to improve the TS network’s scalability, which may require more parallelism (e.g. multi-GPU processing) and more customization (e.g. GPU kernels utilizing the sparsity of TS representations), with preferably more memory storage/bandwidth (e.g. GPUs using 3D-stacked memory). With improved scalability, we also plan to further verify the TS nonlinearity’s efficiency in state-of-the-art architectures [27, 9, 18], which are still computationally prohibitive with our current implementation. Acknowledgments We would like to thank James Fitzgerald, Mien “Brabeeba” Wang, Scott Linderman, and Yu Hu for fruitful discussions. We also thank the anonymous reviewers for their valuable comments. This work was supported by NSF (IIS 1409097), IARPA (contract D16PC00002), and the Swartz Foundation. 10This is a crucial aspect of gradient descent dynamics in layered structures, which behave like a chain—the weakest link must change first [23, 24]. 8 References [1] Y. LeCun, Y. Bengio, and G. Hinton, “Deep learning,” Nature, 2015. [2] J. Schmidhuber, “Deep learning in neural networks: An overview,” Neural Networks, 2015. [3] R. Hahnloser, R. Sarpeshkar, M. Mahowald, R. Douglas, and S. Seung, “Digital selection and analogue amplification coexist in a cortex-inspired silicon circuit,” Nature, 2000. [4] V. Nair and G. Hinton, “Rectified Linear Units Improve Restricted Boltzmann Machines,” in ICML, 2010. [5] S. Hochreiter, Y. Bengio, P. Frasconi, and J. Schmidhuber, “Gradient Flow in Recurrent Nets: the Difficulty of Learning Long-Term Dependencies,” in A Field Guide to Dynamical Recurrent Networks, 2001. [6] A. Courville, J. Bergstra, and Y. Bengio, “A Spike and Slab Restricted Boltzmann Machine,” in AISTATS, 2011. [7] K. Konda, R. Memisevic, and D. Krueger, “Zero-bias autoencoders and the benefits of co-adapting features,” in ICLR, 2015. [8] R. Srivastava, K. Greff, and J. Schmidhuber, “Training Very Deep Networks,” in NIPS, 2015. [9] K. He, X. Zhang, S. Ren, and J. Sun, “Identity Mappings in Deep Residual Networks,” in ECCV, 2016. [10] M. Janzamin, H. Sedghi, and A. Anandkumar, “Beating the Perils of Non-Convexity: Guaranteed Training of Neural Networks using Tensor Methods,” arXiv, 2015. [11] L. Deng and D. Yu, “Deep Convex Net: A Scalable Architecture for Speech Pattern Classification,” in Interspeech, 2011. [12] B. Amos and Z. Kolter, “Input-Convex Deep Networks,” in ICLR Workshop, 2015. [13] Ö. Aslan, X. Zhang, and D. Schuurmans, “Convex Deep Learning via Normalized Kernels,” in NIPS, 2014. [14] S. Wang, A. Mohamed, R. Caruana, J. Bilmes, M. Plilipose, M. Richardson, K. Geras, G. Urban, and O. Aslan, “Analysis of Deep Neural Networks with the Extended Data Jacobian Matrix,” in ICML, 2016. [15] K. Simonyan and A. Zisserman, “Very Deep Convolutional Networks for Large-Scale Image Recognition,” in ICLR, 2015. [16] I. Goodfellow, D. Warde-Farley, M. Mirza, A. Courville, and Y. Bengio, “Maxout Networks,” in ICML, 2013. [17] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich, “Going Deeper with Convolutions,” in CVPR, 2015. [18] G. Huang, Z. Liu, and K. Weinberger, “Densely Connected Convolutional Networks,” arXiv, 2016. [19] S. Sonoda and N. Murata, “Neural network with unbounded activation functions is universal approximator,” Applied and Computational Harmonic Analysis, 2015. [20] Y. Cho and L. Saul, “Large-Margin Classification in Infinite Neural Networks,” Neural Computation, 2010. [21] D. Duvenaud, O. Rippel, R. Adams, and Z. Ghahramani, “Avoiding pathologies in very deep networks,” in AISTATS, 2014. [22] J. Andén and S. Mallat, “Deep Scattering Spectrum,” IEEE T-SP, 2014. [23] A. Saxe, J. McClelland, and S. Ganguli, “Exact solutions to the nonlinear dynamics of learning in deep linear neural networks,” in ICLR, 2014. [24] A. Saxe, “A deep learning theory of perceptual learning dynamics,” in COSYNE, 2015. [25] T. Miyato, S. Maeda, M. Koyama, K. Nakae, and S. Ishii, “Distributional Smoothing with Virtual Adversarial Training,” in ICLR, 2016. [26] Q. Bai, S. Rosenberg, Z. Wu, and S. Sclaroff, “Differential Geometric Regularization for Supervised Learning of Classifiers,” in ICML, 2016. [27] J. Springenberg, A. Dosovitskiy, T. Brox, and M. Riedmiller, “Striving for Simplicity: The All Convolutional Net,” in ICLR Workshop, 2015. 9 | 2016 | 412 |
6,342 | Optimistic Bandit Convex Optimization Mehryar Mohri Courant Institute and Google 251 Mercer Street New York, NY 10012 mohri@cims.nyu.edu Scott Yang Courant Institute 251 Mercer Street New York, NY 10012 yangs@cims.nyu.edu Abstract We introduce the general and powerful scheme of predicting information re-use in optimization algorithms. This allows us to devise a computationally efficient algorithm for bandit convex optimization with new state-of-the-art guarantees for both Lipschitz loss functions and loss functions with Lipschitz gradients. This is the first algorithm admitting both a polynomial time complexity and a regret that is polynomial in the dimension of the action space that improves upon the original regret bound for Lipschitz loss functions, achieving a regret of eO " T 11/16d3/8# . Our algorithm further improves upon the best existing polynomial-in-dimension bound (both computationally and in terms of regret) for loss functions with Lipschitz gradients, achieving a regret of eO " T 8/13d5/3# . 1 Introduction Bandit convex optimization (BCO) is a key framework for modeling learning problems with sequential data under partial feedback. In the BCO scenario, at each round, the learner selects a point (or action) in a bounded convex set and observes the value at that point of a convex loss function determined by an adversary. The feedback received is limited to that information: no gradient or any other higher order information about the function is provided to the learner. The learner’s objective is to minimize his regret, that is the difference between his cumulative loss over a finite number of rounds and that of the loss of the best fixed action in hindsight. The limited feedback makes the BCO setup relevant to a number of applications, including online advertising. On the other hand, it also makes the problem notoriously difficult and requires the learner to find a careful trade-off between exploration and exploitation. While it has been the subject of extensive study in recent years, the fundamental BCO problem remains one of the most challenging scenarios in machine learning where several questions concerning optimality guarantees remain open. The original work of Flaxman et al. [2005] showed that a regret of eO(T 5/6) is achievable for bounded loss functions and of eO(T 3/4) for Lipschitz loss functions (the latter bound is also given in [Kleinberg, 2004]), both of which are still the best known results given by explicit algorithms. Agarwal et al. [2010] introduced an algorithm that maintains a regret of eO(T 2/3) for loss functions that are both Lipschitz and strongly convex, which is also still state-of-the-art. For functions that are Lipschitz and also admit Lipschitz gradients, Saha and Tewari [2011] designed an algorithm with a regret of eO(T 2/3) regret, a result that was recently improved to eO(T 5/8) by Dekel et al. [2015]. Here, we further improve upon these bounds both in the Lipschitz and Lipschitz gradient settings. By incorporating the novel and powerful idea of predicting information re-use, we introduce an algorithm with a regret bound of eO " T 11/16# for Lipschitz loss functions. Similarly, our algorithm also achieves the best regret guarantee among computationally tractable algorithms for loss functions with Lipschitz 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. gradients: eO " T 8/13# . Both bounds admit a relatively mild dependency on the dimension of the action space. We note that the recent remarkable work by [Bubeck et al., 2015, Bubeck and Eldan, 2015] has proven the existence of algorithms that can attain a regret of eO(T 1/2), which matches the known lower bound ⌦(T 1/2) given by Dani et al.. Thus, the dependency of our bounds with respect to T is not optimal. Furthermore, two recent unpublished manuscripts, [Hazan and Li, 2016] and [Bubeck et al., 2016], present algorithms achieving regret eO(T 1/2). These results, once verified, would be ground-breaking contributions to the literature. However, unlike our algorithms, the regret bound for both of these algorithms admits a large dependency on the dimension d of the action space: exponential for [Hazan and Li, 2016], dO(9.5) for [Bubeck et al., 2016]. One hope is that the novel ideas introduced by Hazan and Li [2016] (the application of the ellipsoid method with a restart button and lower convex envelopes) or those by Bubeck et al. [2016] (which also make use of the restart idea but introduces a very original kernel method) could be combined with those presented in this paper to derive algorithms with the most favorable guarantees with respect to both T and d. We begin by formally introducing our notation and setup. We then highlight some of the essential ideas in previous work before introducing our new key insight. Next, we give a detailed description of our algorithm for which we prove theoretical guarantees in several settings. 2 Preliminaries 2.1 BCO scenario The scenario of bandit convex optimization, which dates back to [Flaxman et al., 2005], is a sequential prediction problem on a convex compact domain K ⇢Rd. At each round t 2 [1, T], the learner selects a (possibly) randomized action xt 2 K and incurs the loss ft(xt) based on a convex function ft : K ! R chosen by the adversary. We assume that the adversary is oblivious, so that the loss functions are independent of the player’s actions. The objective of the learner is to minimize his regret with respect to the optimal static action in hindsight, that is, if we denote by A the learner’s randomized algorithm, the following quantity: RegT (A) = E " T X t=1 ft(xt) # −min x2K T X t=1 ft(x). (1) We will denote by D the diameter of the action space K in the Euclidean norm: D = supx,y2K kx − yk2. Throughout this paper, we will often use different induced norms. We will denote by k · kA the norm induced by a symmetric positive definite (SPD) matrix A ≻0, defined for all x 2 Rd by kxkA = p x>Ax. Moreover, we will denote by k · kA,⇤its dual norm, given by k · kA−1. To simplify the notation, we will write k · kx instead of k · kr2R(x), when the convex and twice differentiable function R: int(K) ! R is clear from the context. Here, int(K) is the set interior of K. We will consider different levels of regularity for the functions ft selected by the adversary. We will always assume that they are uniformly bounded by some constant C > 0, that is |ft(x)| C for all t 2 [1, T] and x 2 K, and, by shifting the loss functions upwards by at most C, we will also assume, without loss of generality, that they are non-negative: ft ≥0, for all t 2 [1, T]. Moreover, we will always assume that ft is Lipschitz on K (henceforth denoted C0,1(K)): 8t 2 [1, T], 8x, y 2 K, |ft(x) −ft(y)| Lkx −yk2. In some instances, we will further assume that the functions admit H-Lipschitz gradients on the interior of the domain (henceforth denoted C1,1(int(K))): 9H > 0: 8t 2 [1, T], 8x, y 2 int(K), krft(x) −rft(y)k2 Hkx −yk2. Since ft is convex, it admits a subgradient at any point in K. We denote by gt one element of the subgradient at the point xt 2 K selected by the learner at round t. When the losses are C1,1, the only element of the subgradient is the gradient, and gt = rft(xt). We will use the shorthand v1:t = Pt s=1 vs to denote the sum of t vectors v1, . . . , vt. In particular, g1:t will denote the sum of the subgradients gs for s 2 [1, t]. Lastly, we will denote by B1(0) = ( x 2 Rd : kxk2 1 ⇢Rd the d-dimensional Euclidean ball of radius one and by @B1(0) the unit sphere. 2 2.2 Follow-the-regularized-leader template A standard algorithm in online learning, both for the bandit and full-information setting is the follow-the-regularized-leader (FTRL) algorithm. At each round, the algorithm selects the action that minimizes the cumulative linearized loss augmented with a regularization term R: K ! R. Thus, the action xt+1 is defined as follows: xt+1 = argmin x2K ⌘g> 1:tx + R(x), where ⌘> 0 is a learning rate that determines the tradeoff between greedy optimization and regularization. If we had access to the subgradients at each round, then, FTRL with R(x) = kxk2 2 and ⌘= 1 p T would yield a regret of O( p dT), which is known to be optimal. But, since we only have access to the loss function values ft(xt) and since the loss functions change at each round, a more refined strategy is needed. 2.2.1 One-point gradient estimates and surrogate losses One key insight into the bandit convex optimization problem, due to Flaxman et al. [2005], is that the subgradient of a smoothed version of the loss function can be estimated by sampling and rescaling around the point the algorithm originally intended to play. Lemma 1 ([Flaxman et al., 2005, Saha and Tewari, 2011]). Let f : K ! R be an arbitrary function (not necessarily differentiable) and let U(@B1(0)) denote the uniform distribution over the unit sphere. Then, for any δ > 0 and any SPD matrix A ≻0, the function bf defined for all x 2 K by bf(x) = Eu⇠U(@B1(0))[f(x + δAu)] is differentiable over int(K) and, for any x 2 int(K), bg = d δ f(x + δAu)A−1u is an unbiased estimate of r bf(x): E u⇠U(@B1(0)) d δ f(x + δAu)A−1u , = r bf(x). The result shows that if at each round t we sample ut ⇠U(@B1(0)), define an SPD matrix At and play the point yt = xt + δAtu (assuming that yt 2 K), then bgt = d δ f(xt + δAtut)A−1 t ut is an unbiased estimate of the gradient of bf at the point xt originally intended: E[bgt] = r bf(xt). Thus, we can use FTRL with these smoothed gradient estimates: xt+1 = argminx2K ⌘bg> 1:tx + R(x), at the cost of the approximation error from ft to bft. Furthermore, the norm of these estimate gradients can be bounded. Lemma 2. Let δ > 0, ut 2 @B1(0) and At ≻0, then the norm of bgt = d δ f(xt + δAtut)A−1 t ut can be bounded as follows: kbgtk2 A2 t d2 δ2 C2. Proof. Since ft is bounded by C, we can write kbgtk2 A2 t d2 δ2 C2utA−1 t A2 tA−1 t ut d2 δ2 C2. This gives us a bound on the Lipschitz constant of bft in terms of d, δ, and C. 2.2.2 Self-concordant barrier as regularization When sampling to derive a gradient estimate, we need to ensure that the point sampled lies within the feasible set K. A second key idea in the BCO problem, due to Abernethy et al. [2008], is to design ellipsoids that are always contained in the feasible sets. This is done by using tools from the theory of interior-point methods in convex optimization. Definition 1 (Definition 2.3.1 [Nesterov and Nemirovskii, 1994]). Let K ⇢Rd be closed convex, and let ⌫≥0. A C3 function R: int(K) ! R is a ⌫-self-concordant barrier for K if for any sequence (zs)1 s=1 with zs ! @K, we have R(zs) ! 1, and if for all x 2 int(K), and y 2 Rd, the following inequalities hold: |r3R(x)[y, y, y]| 2kyk3 x, |rR(x)>y| ⌫1/2kykx. 3 Since self-concordant barriers are preserved under translation, we will always assume for convenience that minx2K R(x) = 0. Nesterov and Nemirovskii [1994] show that any d-dimensional closed convex set admits an O(d)self-concordant barrier. This allows us to always choose a self-concordant barrier as regularization. We will use several other key properties of self-concordant barriers in this work, all of which are stated precisely in Appendix 7.1. 3 Previous work The original paper by Flaxman et al. [2005] sampled indiscriminately around spheres and projected back onto the feasible set at each round. This yielded a regret of eO " T 3/4# for C0,1 loss functions. The follow-up work of Saha and Tewari [2011] showed that for C1,1 loss functions, one can run FTRL with a self-concordant barrier as regularization and sample around the Dikin ellipsoid to attain an improved regret bound of eO " T 2/3# . More recently, Dekel et al. [2015] showed that by averaging the smoothed gradient estimates and still using the self-concordant barrier as regularization, one can achieve a regret of eO " T 5/8# . Specifically, denote by ¯gt = 1 k+1 Pk i=0 bgt−i the average of the past k + 1 incurred gradients, where bgt−i = 0 for t −i 0. Then we can play FTRL on these averaged smoothed gradient estimates: xt+1 = argmin2K ⌘¯g> t x + R(x), to attain the better guarantee. Abernethy and Rakhlin [2009] derive a generic estimate for FTRL algorithms with self-concordant barriers as regularization: Lemma 3 ([Abernethy and Rakhlin, 2009]-Theorem 2.2-2.3). Let K be a closed convex set in Rd and let R be a ⌫-self-concordant barrier for K. Let {gt}T t=1 ⇢Rd and ⌘> 0 be such that ⌘kgtkxt,⇤1/4 for all t 2 [1, T]. Then, the FTRL update xt+1 = argminx2K g> 1:tx + R(x) admits the following guarantees: kxt −xt+1kxt 2⌘kgtkxt,⇤, 8x 2 K, T X t=1 g> t (xt −x) 2⌘ T X t=1 kgtk2 xt,⇤+ 1 ⌘R(x). By Lemma 2, if we use FTRL with smoothed gradients, then the upper bound in this lemma can be further bounded by 2⌘ T X t=1 kbgtk2 xt,⇤+ 1 ⌘R(x) 2⌘T C2d2 δ2 + 1 ⌘R(x). Furthermore, the regret is then bounded by the sum of this upper bound and the cost of approximating ft with bft. On the other hand, Dekel et al. [2015] showed that if we used FTRL with averaged smoothed gradients instead, then the upper bound in this lemma can be bounded as 2⌘ T X t=1 k¯gtk2 xt,⇤+ 1 ⌘R(x) 2⌘T ✓32C2d2 δ2(k + 1) + 2D2L2 ◆ + 1 ⌘R(x). The extra factor (k + 1) in the denominator, at the cost of now approximating ft with ¯ft, is what contributes to their improved regret result. In general, finding surrogate losses that can both be approximated accurately and admit only a mild variance is a delicate task, and it is not clear how the constructions presented above can be improved. 4 Algorithm 4.1 Predicting the predictable Rather than designing a newer and better surrogate loss, our strategy will be to exploit the structure of the current state-of-the-art method. Specifically, we draw upon the technique of predictable sequences from [Rakhlin and Sridharan, 2013]. The idea here is to allow the learner to preemptively “guess” the 4 gradient at the next step and optimize for this in the FTRL update. Specifically, if egt+1 is an estimate of the time t + 1 gradient gt+1 based on information up to time t, then the learner should play: xt+1 = argmin x2K (g1:t + egt+1)>x + R(x). This optimistic FTRL algorithm admits the following guarantee: Lemma 4 (Lemma 1 [Rakhlin and Sridharan, 2013]). Let K be a closed convex set in Rd, and let R be a ⌫-self-concordant barrier for K. Let {gt}T t=1 ⇢Rd and ⌘> 0 such that ⌘kgt −egtkxt,⇤1/4 8t 2 [1, T]. Then the FTRL update xt+1 = argminx2K(g1:t + egt+1)>x+R(x) admits the following guarantee: 8x 2 K, T X t=1 g> t (xt −x) 2⌘ T X t=1 kgt −egtk2 xt,⇤+ 1 ⌘R(x). In general, it is not clear what would be a good prediction candidate. Indeed, this is why Rakhlin and Sridharan [2013] called this algorithm an “optimistic” FTRL. However, notice that if we elect to play the averaged smoothed losses as in [Dekel et al., 2015], then the update at each time is ¯gt = 1 k+1 Pk i=0 bgt−i. This implies that the time t + 1 gradient is ¯gt+1 = 1 k+1 Pk i=0 bgt+1−i, which includes the smoothed gradients from time t + 1 down to time t −(k −1). The key insight here is that at time t, all but the (t + 1)-th gradient are known! This means that if we predict egt+1 = 1 k + 1 k X i=0 bgt+1−i − 1 k + 1bgt+1 = 1 k + 1 k X i=1 bgt+1−i, then the first term in the bound of Lemma 4 will be in terms of gt −egt = 1 k + 1 k X i=0 bgt−i − 1 k + 1 k X i=1 bgt−i = 1 k + 1bgt. In other words, all but the time t smoothed gradient will cancel out. Essentially, we are predicting the predictable portion of the averaged gradient and guaranteeing that the optimism will pay off. Moreover, where we gained a factor of 1 k+1 in the averaged loss case, we should expect to gain a factor of 1 (k+1)2 by using this optimistic prediction. Note that this technique of optimistically predicting the variance reduction is widely applicable. As alluded to with the reference to [Schmidt et al., 2013], many variance reduction-type techniques, particularly in stochastic optimization, use historical information in their estimates (e.g. SVRG [Johnson and Zhang, 2013], SAGA [Defazio et al., 2014]). In these cases, it is possible to “predict” the information re-use and improve the convergence rates of each algorithm. 4.2 Description and pseudocode Here, we give a detailed description of our algorithm, OPTIMISTICBCO. At each round t, the algorithm uses a sample ut from the uniform distribution over the unit sphere to define an unbiased estimate of the gradient of bft, a smoothed version of the loss function ft, as described in Section 2.2.1: bgt d δ ft(yt)(r2R(xt))−1/2ut. Next, the trailing average of these unbiased estimates over a fixed window of length k + 1 is computed: ¯gt = 1 k+1 Pk i=0 bgt−i. The remaining steps executed at each round coincide with the Follow-the-Regularized-Leader update with a self-concordant barrier used as a regularizer, augmented with an optimistic prediction of the next round’s trailing average. As described in Section 4.1, all but one of the terms in the trailing average are known and we predict their occurence: egt+1 = 1 k + 1 k X i=1 bgt+1−i, xt+1 = argmin x2K ⌘(¯g1:t + egt+1)> x + R(x). Note that Theorem 3 implies that the actual point we play, yt, is always a feasible point in K. Figure 1 presents the pseudocode of the algorithm. 5 OPTIMISTICBCO(R, δ, ⌘, k, x1) 1 for t 1 to T do 2 ut SAMPLE(U(@B1(0))) 3 yt xt + δ(r2R(xt))−1 2 ut 4 PLAY(yt) 5 ft(yt) RECEIVELOSS(yt) 6 bgt d δ ft(yt)(r2R(xt))−1 2 ut 7 ¯gt 1 k+1 Pk i=0 bgt−i 8 egt+1 1 k+1 Pk i=1 bgt+1−i 9 xt+1 argminx2K ⌘(¯g1:t + egt+1)>x + R(x) 10 return PT t=1 ft(yt) Figure 1: Pseudocode of OPTIMISTICBCO, with R: int(K) ! R, δ 2 (0, 1], ⌘> 0, k 2 Z, and x1 2 K. 5 Regret guarantees In this section, we state our main results, which are regret guarantees for OPTIMISTICBCO in the C0,1 and C1,1 cases. We also highlight the analysis and proofs for each regime. 5.1 Main results The following is our main result for the C0,1 case. Theorem 1 (C0,1 Regret). Let K ⇢Rd be a convex set with diameter D and (ft)T t=1 a sequence of loss functions with each ft : K ! R+ C-bounded and L-Lipschitz. Let R be a ⌫-self-concordant barrier for K. Then, for ⌘k δ 12Cd, the regret of OPTIMISTICBCO can be bounded as follows: RegT (OPTIMISTICBCO) ✏LT + LδDT + Ck 2 + 2Cd2⌘T δ2(k + 1)2 + 1 ⌘log(1/✏) + LT2⌘D " p 3L1/2 + p 2DLk + p 48d p k δ # . In particular, for ⌘= T −11/16d−3/8, δ = T −5/16d3/8, k = T 1/8d1/4, the following guarantee holds for the regret of the algorithm: RegT (OPTIMISTICBCO) = eO ⇣ T 11/16d3/8⌘ . The above result is the first improvement on the regret of Lipschitz losses in terms of T since the original algorithm of Flaxman et al. [2005] that is realizable from a concrete algorithm as well as polynomial in both dimension and time (both computationally and in terms of regret). Theorem 2 (C1,1 Bound). Let K ⇢Rd be a convex set with diameter D and (ft)T t=1 a sequence of loss functions with each ft : K ! R+ C-bounded, L-Lipschitz and H-smooth. Let R be a ⌫-selfconcordant barrier for K. Then, for ⌘k δ 12d, the regret of OPTIMISTICBCO can be bounded as follows: RegT (OPTIMISTICBCO) ✏LT + Hδ2D2T + (TL + DHT)2⌘kD "p 3L1/2 k + p 2DL + p 48d p kδ # + 1 ⌘log(1/✏) + Ck + ⌘ d2T δ2(k + 1)2 . In particular, for ⌘= T −8/13d−5/6, δ = T −5/26d1/3, k = T 1/13d5/3, the following guarantee holds for the regret of the algorithm: RegT (OPTIMISTICBCO) = eO ⇣ T 8/13d5/3⌘ . 6 This result is currently the best polynomial-in-time regret bound that is also polynomial in the dimension of the action space (both computationally and in terms of regret). It improves upon the work of Saha and Tewari [2011] and Dekel et al. [2015]. We now explain the analysis of both results, starting with Theorem 1 for C0,1 losses. 5.2 C0,1 analysis Our analysis proceeds in two steps. We first modularize the cost of approximating the original losses ft(yt) incurred with the averaged smoothed losses that we treat as surrogate losses. Then we show that the algorithm minimizes the regret against the surrogate losses effectively. The proofs of all lemmas in this section are presented in Appendix 7.2. Lemma 5 (C0,1 Structural bound on true losses in terms of smoothed losses). Let (ft)T t=1 be a sequence of loss functions, and assume that ft : K ! R+ is C-bounded and L-Lipschitz, where K ⇢Rd. Denote bft(x) = E u⇠U(@B1(0))[ft(x + δAtu)], bgt = d δ ft(yt)A−1 t ut, yt = xt + δAtut for arbitrary At, δ, and ut. Let x⇤ = argminx2K PT t=1 ft(x), and let x⇤ ✏ 2 argminy2K,dist(y,@K)>✏ky −x⇤k. Assume that we play yt at every round. Then the following structural estimate holds: RegT (A) = E[ T X t=1 ft(yt) −ft(x⇤)] ✏LT + 2LδDT + T X t=1 E[ bft(xt) −bft(x⇤ ✏)]. Thus, at the price of ✏LT + 2LδDT, it suffices to look at the performance of the averaged losses for the algorithm. Notice that the only assumptions we have made so far are that we play points sampled on an ellipsoid around the desired point scaled by δ and that the loss functions are Lipschitz. Lemma 6 (C0,1 Structural bound on smoothed losses in terms of averaged losses). Let (ft)T t=1 be a sequence of loss functions, and assume that ft : K ! R+ is C-bounded and L-Lipschitz, where K ⇢Rd. Denote bft(x) = E u⇠U(@B1(0))[ft(x + δAtu)], bgt = d δ ft(yt)A−1 t ut, yt = xt + δAtut for arbitrary At, δ, and ut. Let x⇤ = argminx2K PT t=1 ft(x), and let x⇤ ✏ 2 argminy2K,dist(y,@K)>✏ky −x⇤k. Furthermore, denote ¯ft(x) = 1 k + 1 k X i=0 bft−i(x), ¯gt = 1 k + 1 k X i=0 bgt−i. Assume that we play yt at every round. Then we have the structural estimate: T X t=1 E bft(xt) −bft(x⇤ ✏) , Ck 2 + LT sup t2[1,T ],i2[0,k^t] E[kxt−i −xtk2] + T X t=1 E ⇥ ¯g> t (xt −x⇤ ✏) ⇤ . While we use averaged smoothed losses as in [Dekel et al., 2015], the analysis in this lemma is actually somewhat different. Because Dekel et al. [2015] always assume that the loss functions are in C1,1, they elect to use the following decomposition: bft(xt) −bft(x⇤ ✏) = bft(xt) −¯ft(xt) + ¯ft(xt) −¯ft(x⇤ ✏) + ¯ft(x⇤ ✏) −bft(x⇤ ✏). This is because they can relate r ¯ft(x) = 1 k+1 Pk i=0 r bft−i(x✏) to ¯gt = 1 k+1 Pk i=0 r bft−i(xt−i) using the fact that the gradients are Lipschitz. Since the gradients of C0,1 functions are not Lipschitz, we cannot use the same analysis. Instead, we use the decomposition bft(xt) −bft(x⇤ ✏) = bft(xt) −bft−i(xt−i) + bft−i(xt−i) −¯ft(x⇤ ✏) + ¯ft(x⇤ ✏) −bft(x⇤ ✏). The next lemma affirms that we do indeed get the improved 1 (k+1)2 factor from predicting the predictable component of the average gradient. 7 Lemma 7 (C0,1 Algorithmic bound on the averaged losses). Let (ft)T t=1 be a sequence of loss functions, and assume that ft : K ! R+ is C-bounded and L-Lipschitz, where K ⇢Rd. Let x⇤= argminx2K PT t=1 ft(x), and let x⇤ ✏2 argminy2K,dist(y,@K)>✏ky −x⇤k. Assume that we play according to the algorithm with ⌘k δ 12Cd. Then we maintain the following guarantee: T X t=1 E ⇥ ¯g> t (xt −x⇤ ✏) ⇤ 2Cd2⌘T δ2(k + 1)2 + 1 ⌘R(x⇤ ✏). So far, we have demonstrated a bound on the regret of the form: RegT (A) ✏LT + 2LδDT + Ck 2 + LT sup t2[T ],i2[k^t] E[kxt−i −xtk2] + 2Cd2⌘T δ2(k + 1)2 + 1 ⌘R(x✏). Thus, it remains to find a tight bound on supt2[1,T ],i2[0,k^t] E[kxt−i −xtk2], which measures the stability of the actions across the history that we average over. This result is similar to that of Dekel et al. [2015], except that we additionally need to account for the optimistic gradient prediction used. Lemma 8 (C0,1 Algorithmic bound on the stability of actions). Let (ft)T t=1 be a sequence of loss functions, and assume that ft : K ! R+ is C-bounded and L-Lipschitz, where K ⇢Rd. Assume that we play according to the algorithm with ⌘k δ 12Cd. Then the following estimate holds: E[kxt−i −xtk2] 2⌘kD p 3L1/2 k + p 2DL + p 48Cd p kδ ! . Proof. [of Theorem 1] Putting all the pieces together from Lemmas 5, 6, 7, 8, shows that RegT (A)✏LT+LδDT+Ck 2 + 2Cd2⌘T δ2(k + 1)2 +1 ⌘R(x✏)+LT2⌘D p 3L1/2+ p 2DLk+ p 48Cd p k δ , . Since x✏is at least ✏away from the boundary, it follows from [Abernethy and Rakhlin, 2009] that R(x✏) ⌫log(1/✏). Plugging in the stated quantities for ⌘, k, and δ yields the result. 5.3 C1,1 analysis The analysis of the C1,1 regret bound is similar to the C0,1 case. The only difference is that we leverage the higher regularity of the losses to provide a more refined estimate on the cost of approximating ft with ¯ft. Apart from that, we will reuse the bounds derived in Lemmas 6, 7, and 8. The proof of the following lemma, along with that of Theorem 2, is provided in Appendix 7.3. Lemma 9 (C1,1 Structural bound on true losses in terms of smoothed losses). Let (ft)T t=1 be a sequence of loss functions, and assume that ft : K ! R+ is C-bounded, L-Lipschitz, and H-smooth, where K ⇢Rd. Denote bft(x) = E u⇠U(@B1(0))[ft(x + δAtu)], bgt = d δ ft(yt)A−1 t ut, yt = xt + δAtut for arbitrary At, δ, and ut. Let x⇤ = argminx2K PT t=1 ft(x), and let x⇤ ✏ 2 argminy2K,dist(y,@K)>✏ky −x⇤k. Assume that we play yt at every round. Then the following structural estimate holds: RegT (A) = E[ T X t=1 ft(yt) −ft(x⇤)] ✏LT + 2Hδ2D2T + T X t=1 E[ bft(xt) −bft(x⇤ ✏)]. 6 Conclusion We designed a computationally efficient algorithm for bandit convex optimization admitting stateof-the-art guarantees for C0,1 and C1,1 loss functions. This was achieved using the general and powerful technique of predicting predictable information re-use. The ideas we describe here are directly applicable to other areas of optimization, in particular stochastic optimization. Acknowledgements This work was partly funded by NSF CCF-1535987 and IIS-1618662 and NSF GRFP DGE-1342536. 8 References J. Abernethy and A. Rakhlin. Beating the adaptive bandit with high probability. In COLT, 2009. J. Abernethy, E. Hazan, and A. Rakhlin. Competing in the dark: An efficient algorithm for bandit linear optimization. In COLT, pages 263–274, 2008. A. Agarwal, O. Dekel, and L. Xiao. Optimal algorithms for online convex optimization with multi-point bandit feedback. In COLT, pages 28–40, 2010. S. Bubeck and R. Eldan. Multi-scale exploration of convex functions and bandit convex optimization. CoRR, abs/1507.06580, 2015. S. Bubeck, O. Dekel, T. Koren, and Y. Peres. Bandit convex optimization: sqrt {T} regret in one dimension. CoRR, abs/1502.06398, 2015. S. Bubeck, R. Eldan, and Y. T. Lee. Kernel-based methods for bandit convex optimization. CoRR, abs/1607.03084, 2016. V. Dani, T. P. Hayes, and S. M. Kakade. Stochastic linear optimization under bandit feedback. A. Defazio, F. Bach, and S. Lacoste-Julien. Saga: A fast incremental gradient method with support for non-strongly convex composite objectives. In NIPS, pages 1646–1654, 2014. O. Dekel, R. Eldan, and T. Koren. Bandit smooth convex optimization: Improving the bias-variance tradeoff. In NIPS, pages 2908–2916, 2015. A. D. Flaxman, A. T. Kalai, and H. B. McMahan. Online convex optimization in the bandit setting: Gradient descent without a gradient. In SODA, pages 385–394, 2005. E. Hazan and Y. Li. An optimal algorithm for bandit convex optimization. CoRR, abs/1603.04350, 2016. R. Johnson and T. Zhang. Accelerating stochastic gradient descent using predictive variance reduction. In NIPS, pages 315–323, 2013. R. D. Kleinberg. Nearly tight bounds for the continuum-armed bandit problem. In Advances in Neural Information Processing Systems, pages 697–704, 2004. Y. Nesterov. Introductory Lectures on Convex Optimization: A Basic Course. Springer, New York, NY, USA, 2004. Y. Nesterov and A. Nemirovskii. Interior-point Polynomial Algorithms in Convex Programming. Studies in Applied Mathematics. Society for Industrial and Applied Mathematics, 1994. ISBN 9781611970791. A. Rakhlin and K. Sridharan. Online learning with predictable sequences. In COLT, pages 993–1019, 2013. A. Saha and A. Tewari. Improved regret guarantees for online smooth convex optimization with bandit feedback. In AISTATS, pages 636–642, 2011. M. W. Schmidt, N. L. Roux, and F. R. Bach. Minimizing finite sums with the stochastic average gradient. CoRR, abs/1309.2388, 2013. 9 | 2016 | 413 |
6,343 | Interpretable Nonlinear Dynamic Modeling of Neural Trajectories Yuan Zhao and Il Memming Park Department of Neurobiology and Behavior Department of Applied Mathematics and Statistics Institute for Advanced Computational Science Stony Brook University, NY 11794 {yuan.zhao, memming.park}@stonybrook.edu Abstract A central challenge in neuroscience is understanding how neural system implements computation through its dynamics. We propose a nonlinear time series model aimed at characterizing interpretable dynamics from neural trajectories. Our model assumes low-dimensional continuous dynamics in a finite volume. It incorporates a prior assumption about globally contractional dynamics to avoid overly enthusiastic extrapolation outside of the support of observed trajectories. We show that our model can recover qualitative features of the phase portrait such as attractors, slow points, and bifurcations, while also producing reliable longterm future predictions in a variety of dynamical models and in real neural data. 1 Introduction Continuous dynamical systems theory lends itself as a framework for both qualitative and quantitative understanding of neural models [1, 2, 3, 4]. For example, models of neural computation are often implemented as attractor dynamics where the convergence to one of the attractors represents the result of computation. Despite the wide adoption of dynamical systems theory in theoretical neuroscience, solving the inverse problem, that is, reconstructing meaningful dynamics from neural time series, has been challenging. Popular neural trajectory inference algorithms often assume linear dynamical systems [5, 6] which lack nonlinear features ubiquitous in neural computation, and typical approaches of using nonlinear autoregressive models [7, 8] sometimes produce wild extrapolations which are not suitable for scientific study aimed at confidently recovering features of the dynamics that reflects the nature of the underlying computation. In this paper, we aim to build an interpretable dynamics model to reverse-engineer the neural implementation of computation. We assume slow continuous dynamics such that the sampled nonlinear trajectory is locally linear, thus, allowing us to propose a flexible nonlinear time series model that directly learns the velocity field. Our particular parameterization yields to better interpretations: identifying fixed points and ghost points are easy, and so is the linearization of the dynamics around those points for stability and manifold analyses. We further parameterize the velocity field using a finite number of basis functions, in addition to a global contractional component. These features encourage the model to focus on interpolating dynamics within the support of the training trajectories. 2 Model Consider a general d-dimensional continuous nonlinear dynamical system driven by external input, ˙x = F(x, u) (1) 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. where x ∈Rd represent the dynamic trajectory, and F : Rd × Rdi →Rd fully defines the dynamics in the presence of input drive u ∈Rdi. We aim to learn the essential part of the dynamics F from a collection of trajectories sampled at frequency 1/∆. Our work builds on extensive literature in nonlinear time series modeling. Assuming a separable, linear input interaction, F(x, u) = Fx(x)+Fu(x)u, a natural nonlinear extension of an autoregressive model is to use a locally linear expansion of (1) [7, 9]: xt+1 = xt + A(xt)xt + b(xt) + B(xt)ut + ϵt (2) where b(x) = Fx(x)∆, A(x) : Rd →Rd×d is the Jacobian matrix of Fx at x scaled by time step ∆, B(x) : Rd →Rd×di is the linearization of Fu around x, and ϵt denotes model mismatch noise of order O(∆2). For example, {A, B} are parametrized with a radial basis function (RBF) network in the multivariate RBF-ARX model of [10, 7], and {A, b, B} are parametrized with sigmoid neural networks in [9]. Note that A(·) is not guaranteed to be the Jacobian of the dynamical system (1) since A and b also change with x. In fact, the functional form for A(·) is not unique, and a powerful function approximator for b(·) makes A(·) redundant and over parameterizes the dynamics. Note that (2) is a subclass of a general nonlinear model: xt+1 = f(xt) + B(xt)ut + ϵt, (3) where f, B are the discrete time solution of Fx, Fu. This form is widely used, and called nonlinear autoregressive with eXogenous inputs (NARX) model where f assumes various function forms (e.g. neural network, RBF network [11], or Volterra series [8]). We propose to use a specific parameterization, xt+1 = xt + g(xt) + B(xt)ut + ϵt g(xt) = Wgφ(xt) −e−τ 2xt vec(B(xt)) = WBφ(xt) (4) where φ(·) is a vector of r continuous basis functions, φ(·) = (φ1(·), . . . , φr(·))⊤. (5) Note the inclusion of a global leak towards the origin whose rate is controlled by τ 2. The further away from the origin (and as τ →0), the larger the effect of the global contraction. This encodes our prior knowledge that the neural dynamics are limited to a finite volume of phase space, and prevents solutions with nonsensical runaway trajectories. The function g(x) directly represents the velocity field of an underlying smooth dynamics (1), unlike f(x) in (3) which can have convoluted jumps. We can even run the dynamics backwards in time, since the time evolution for small ∆is reversible (by taking g(xt) ≈g(xt+1)), which is not possible for (3), since f(x) is not necessarily an invertible function. Fixed points x∗satisfy g(x∗) + B(x∗)u = 0 for a constant input u. Far away from the fixed points, dynamics are locally just a flow (rectification theorem) and largely uninteresting. The Jacobian in the absence of input, J = ∂g(x) ∂x provides linearization of the dynamics around the fixed points (via the Hartman-Grobman theorem), and the corresponding fixed point is stable if all eigenvalues of J are negative. We can further identify fixed points, and ghost points (resulting from disappearance of fixed points due to bifurcation) from local minima of ∥g∥with small magnitude. The flow around the ghost points can be extremely slow [4], and can exhibit signatures of computation through meta-stable dynamics [12]. Continuous attractors (such as limit cycles) are also important features of neural dynamics which exhibit spontaneous oscillatory modes. We can easily identify attractors by simulating the model. 3 Estimation We define the mean squared error as the loss function L(Wg, WB, c1...r, σ1...r) = 1 T T −1 ! t=0 ∥g(xt) + B(xt)ut + xt −xt+1∥2 2, (6) 2 where we use normalized squared exponential radial basis functions φi(z) = exp " −∥z−ci∥2 2 2σ2 i # ϵ + $r i=1 exp " −∥z−ci∥2 2 2σ2 i #, (7) with centers ci and corresponding kernel width σi. The small constant ϵ = 10−7 is to avoid numerical 0 in the denominator. We estimate the parameters {Wg, WB, τ, c, σ} by minimizing the loss function through gradient descent (Adam [13]) implemented within TensorFlow [14]. We initialize the matrices Wg and WB by truncated standard normal distribution, the centers {ci} by the centroids of the K-means clustering on the training set, and the kernel width σ by the average euclidean distance between the centers. 4 Inferring Theoretical Models of Neural Computation We apply the proposed method to a variety of low-dimensional neural models in theoretical neuroscience. Each theoretical model is chosen to represent a different mode of computation. 4.1 Fixed point attractor and bifurcation for binary decision-making Perceptual decision-making and working memory tasks are widely used behavioral tasks where the tasks typically involve a low-dimensional decision variable, and subjects are close to optimal in their performance. To understand how the brain implements such neural computation, many competing theories have been proposed [15, 16, 17, 18, 19, 20, 21]. We implemented the two dimensional dynamical system from [20] where the final decision is represented by two stable fixed points corresponding to each choice. The stimulus strength (coherence) nonlinearly interacts with the dynamics (see appendix for details), and biases the choice by increasing the basin of attraction (Fig. 1). We encode the stimulus strength as a single variable held constant throughout each trajectory as in [20]. The model with 10 basis functions learned the dynamics from 90 training trajectories (30 per coherence c = 0, 0.5, −0.5). We visualize the log-speed as colored contours, and the direction component of the velocity field as arrows in Fig. 1. The fixed/ghost points are shown as red dots, which ideally should be at the crossing of the model nullclines given by solid lines. For each coherence, two novel starting points were simulated from the true model and the estimated model in Fig. 1. Although the model was trained with only low or moderate coherence levels where there are 2 stable and 1 unstable fixed points, it predicts bifurcation at higher coherence and it identifies the ghost point (lower right panel). We compare the model (4) to the following “locally linear” (LL) model, xt+1 =A(xt)xt + B(xt)ut + xt vec(A(xt)) =WAφ(xt) vec(B(xt)) =WBφ(xt) (8) in terms of training and prediction errors in Table 1. Note that there is no contractional term. We train both models on the same trajectories described above. Then we simulate 30 trajectories from the true system and trained models for coherence c = 1 with the same random initial states within the unit square and calculate the mean squared error between the true trajectories and model-simulated ones as prediction error. The other parameters are set to the same value as training. The LL model Table 1: Model errors Model Training error Prediction error: mean (std) (4) 4.06E-08 0.002 (0.008) (8) 2.04E-08 0.244 (0.816) has poor prediction on the test set. This is due to unbounded flow out of the phase space where the training data lies (see Fig. 6 in the supplement). 3 Figure 1: Wong and Wang’s 2D dynamics model for perceptual decision-making [20]. We train the model with 90 trajectories (uniformly random initial points within the unit square, 0.5 s duration, 1 ms time step) with different input coherence levels c = {0, 0.5, −0.5} (30 trajectories per coherence). The yellow and green lines are the true nullclines. The black arrows represent the true velocity fields (direction only) and the red arrows are model-predicted ones. The black and gray circles are the true stable and unstable fixed points, while the red ones are local minima of model-prediction (includes fixed points and slow points). The background contours are model-predicted log∥d s d t ∥2. We simulated two 1 s trajectories each for true and learned model dynamics. The trajectories start from the cyan circles. The blue lines are from the true model and the cyan ones are simulated from trained models. Note that we do not train our model on trajectories from the bottom right condition (c = 1). 4 (a) (b) (c) (d) Figure 2: FitzHugh-Nagumo model. (a) Direction (black arrow) and log-speed (contour) of true velocity field. Two blue trajectories starting at the blue circles are simulated from the true system. The yellow and green lines are nullclines of v and w. The diamond is a spiral point. (b) 2-dimensional embedding of v model-predicted velocity field (red arrow and background contour). The black arrows are true velocity field. There are a few model-predicted slow points in light red. The blue lines are the same trajectories as the ones in (a). The cyan ones are simulated from trained model withe the same initial states of the blue ones. (c) 100-step prediction every 100 steps using a test trajectory generated with the same setting as training. (d) 200-step prediction every 200 steps using a test trajectory driven by sinusoid input with 0.5 standard deviation white Gaussian noise. 4.2 Nonlinear oscillator model One of the most successful application of dynamical systems in neuroscience is in the biophysical model of a single neuron. We study the FitzHugh-Nagumo (FHN) model which is a 2-dimensional reduction of the Hodgkin-Huxley model [3]: ˙v = v −v3 3 −w + I, (9) ˙w = 0.08(v + 0.7 −0.8w), (10) where v is the membrane potential, w is a recovery variable and I is the magnitude of stimulus current. The FHN has been used to model the up-down states observed in the neural time series of anesthetized auditory cortex [22]. We train the model with 50 basis functions on 100 simulated trajectories with uniformly random initial states within the unit square [0, 1] × [0, 1] and driven by injected current generated from a 0.3 mean and 0.2 standard deviation white Gaussian noise. The duration is 200 and the time step is 0.1. 5 (a) (b) Figure 3: (a) Velocity field (true: black arrows, model-predicted: red arrows) for both direction and log-speed; model-predicted fixed points (red circles, solid: stable, transparent: unstable). (b) One trajectory from the true model (x, y), and one trajectory from the fitted model (ˆx, ˆy). The trajectory remains on the circle for both. Both are driven by the same input, and starts at same initial state. In electrophysiological experiments, we only have access to v(t), and do not observe the slow recovery variable w. Delay embedding allows reconstruction of the phase space under mild conditions [23]. We build a 2D model by embedding v(t) as (v(t), v(t −10)), and fit the dynamical model (Fig. 2b). The phase space is distorted, but the overall prediction of the model is good given a fixed current (Fig. 2b). Furthermore, the temporal simulation of v(t) for white noise injection shows reliable long-term prediction (Fig. 2c). We also test the model in a regime far from the training trajectories, and the dynamics does not diverge away from reasonable region of the phase space (Fig. 2d). 4.3 Ring attractor dynamics for head direction network Continuous attractors such as line and ring attractors are often used as models for neural representation of continuous variables [17, 4]. For example, the head direction neurons are tuned for the angle of the animal’s head direction, and a bump attractor network with ring topology is proposed as the dynamics underlying the persistently active set of neurons [24]. Here we use the following 2 variable reduction of the ring attractor system: τr ˙r = r0 −r, (11) τθ ˙θ = I(t), (12) where θ represents the head direction driven by input I(t), and r is the radial component representing the overall activity in the bump. The computational role of this ring attractor is to be insensitive to the noise in the r direction, while integrating the differential input in the θ direction. In the absence of input, the head direction θ does a random walk around the ring attractor. The ring attractor consists of a continuum of stable fixed points with a center manifold. We train the model with 50 basis functions on 150 trajectories. The duration is 5 and the time step is 0.01. The parameters are set as r0 = 2, τr = 1 and τθ = 1. The initial states are uniformly random within (x, y) ∈[−3, 3] × [−3, 3]. The inputs are constant angles evenly spaced in [−π, π] with Gaussian noises (µ = 0, σ = 5) added (see Fig. 7 in online supplement). From the trained model, we can identify a number of fixed points arranged around the ring attractor (Fig. 3a). The true ring dynamics model has one negative eigenvalue, and one zero-eigenvalue in the Jacobian. Most of the model-predicted fixed points are stable (two negative real parts of eigenvalues) and the rest are unstable (two positive real parts of eigenvalues). 6 Figure 4: (a) Vector plot of 1-step-ahead prediction on one Lorenz trajectory (test). (b) 50-step prediction every 50 steps on one Lorenz trajectory (test). (c) A 200-step window of (b) (100-300). The dashed lines are the true trajectory, the solid lines are the prediction and the circles are the start points of prediction. 4.4 Chaotic dynamics Chaotic dynamics (or near chaos) has been postulated to support asynchronous states in the cortex [1], and neural computation over time by generating rich temporal patterns [2, 25]. We consider the 3D Lorenz attractor as an example chaotic system. We simulate 20 trajectories from, ˙x = 10(y −x), ˙y = x(28 −z) −y, ˙z = xy −8 3z. (13) The initial state of each trajectory is standard normal. The duration is 200 and the time step is 0.04. The first 300 transient states of each trajectory are discarded. We use 19 trajectories for training and the last one for testing. We train a model with 10 basis functions. Figure 4a shows the direction of prediction. The vectors represented by the arrows start from current states and point at the next future state. The predicted vectors (red) overlap the true vectors (blue) implying the one-step-ahead predictions are close to the true values in both speed and direction. Panel (b) gives an overview that the prediction resembles the true trajectory. Panel (c) shows that the prediction is close to the true value up to 200 steps. 5 Learning V1 neural dynamics To test the model on data obtained from cortex, we use a set of trajectories obtained from the variational Gaussian latent process (vLGP) model [26]. The latent trajectory model infers a 5dimensional trajectory that describes a large scale V1 population recording (see [26] for details). The recording was from an anesthetized monkey where 72 different equally spaced directional drifting gratings were presented for 50 trials each. We used 63 well tuned neurons out of 148 simultaneously recorded single units. Each trial lasts for 2.56 s and the stimulus was presented only during the first half. We train our model with 50 basis functions on the trial-averaged trajectories for 71 directions, and use 1 direction for testing. The input was 3 dimensional: two boxcars indicating the stimulus direction (sin θ, cos θ), and one corresponding to a low-pass filtered stimulus onset indicator. Figure 5 shows the prediction of the best linear dynamical system (LDS) for the 71 directions, and the nonlinear prediction from our model. LDS is given as xt+1 = Axt + But + xt with parameters A and B found by least squares. Although the LDS is widely used for smoothing the latent trajectories, it clearly is not a good predictor for the nonlinear trajectory of V1 (Fig. 5a). In comparison, our model does a better job at capturing the oscillations much better, however, it fails to capture the fine details of the oscillation and the stimulus-off period dynamics. 7 (a) LDS prediction (b) Proposed model prediction Figure 5: V1 latent dynamics prediction. Models trained on 71 average trajectories for each directional motion are tested on the 1 unseen direction. We divide the average trajectory at 0◦into 200 ms segments and predict each whole segment from the starting point of the segment. Note the poor predictive performance of linear dynamical system (LDS) model. 6 Discussion To connect dynamical theories of neural computation with neural time series data, we need to be able to fit an expressive model to the data that robustly predicts well. The model then needs to be interpretable such that signatures of neural computation from the theories can be identified by its qualitative features. We show that our method successfully learns low-dimensional dynamics in contrast to fitting a high-dimensional recurrent neural network models in previous approaches [17, 4, 25]. We demonstrated that our proposed model works well for well known dynamical models of neural computation with various features: chaotic attractor, fixed point dynamics, bifurcation, line/ring attractor, and a nonlinear oscillator. In addition, we also showed that it can model nonlinear latent trajectories extracted from high-dimensional neural time series. Critically, we assumed that the dynamics consists of a continuous and slow flow. This allowed us to parameterize the velocity field directly, reducing the complexity of the nonlinear function approximation, and making it easy to identify the fixed/slow points. An additional structural assumption was the existence of a global contractional dynamics. This regularizes and encourages the dynamics to occupy a finite phase volume around the origin. Previous strategies of visualizing arbitrary trajectories from a nonlinear system such as recurrence plots were often difficult to understand. We visualized the dynamics using the velocity field decomposed into speed and direction, and overlaid fixed/slow points found numerically as local minima of the speed. This is obviously more difficult for higher-dimensional dynamics, and dimensionality reduction and visualization that preserves essential dynamic features are left for future directions. The current method is a two-step procedure for analyzing neural dynamics: first infer the latent trajectories, and then infer the dynamic laws. This is clearly not an inefficient inference, and the next step would be to combine vLGP observation model and inference algorithm with the interpretable dynamic model and develop a unified inference system. In summary, we present a novel complementary approach to studying the neural dynamics of neural computation. Applications of the proposed method are not limited to neuroscience, but should be useful for studying other slow low-dimensional nonlinear dynamical systems from observations [27]. Acknowledgment We thank the reviewers for their constructive feedback. This work was partially supported by the Thomas Hartman Foundation for Parkinson’s Research. 8 References [1] D. Hansel and H. Sompolinsky. Synchronization and computation in a chaotic neural network. Physical Review Letters, 68(5):718–721, Feb 1992. [2] W. Maass, T. Natschläger, and H. Markram. Real-time computing without stable states: A new framework for neural computation based on perturbations. Neural Computation, 14:2531–2560, 2002. [3] E. M. Izhikevich. Dynamical systems in neuroscience : the geometry of excitability and bursting. Computational neuroscience. MIT Press, 2007. [4] D. Sussillo and O. Barak. Opening the black box: Low-Dimensional dynamics in High-Dimensional recurrent neural networks. Neural Computation, 25(3):626–649, December 2012. [5] L. Paninski, Y. Ahmadian, D. G. G. Ferreira, et al. A new look at state-space models for neural data. Journal of computational neuroscience, 29(1-2):107–126, August 2010. [6] J. P. Cunningham and B. M. Yu. Dimensionality reduction for large-scale neural recordings. Nat Neurosci, 17(11):1500–1509, November 2014. [7] T. Ozaki. Time Series Modeling of Neuroscience Data. CRC Press, January 2012. [8] S. Eikenberry and V. Marmarelis. A nonlinear autoregressive volterra model of the HodgkinHuxley equations. Journal of Computational Neuroscience, 34(1):163–183, August 2013. [9] M. Watter, J. Springenberg, J. Boedecker, and M. Riedmiller. Embed to control: A locally linear latent dynamics model for control from raw images. In C. Cortes, N. D. Lawrence, D. D. Lee, M. Sugiyama, and R. Garnett, editors, Advances in Neural Information Processing Systems 28, pages 2746–2754. Curran Associates, Inc., 2015. [10] M. Gan, H. Peng, X. Peng, X. Chen, and G. Inoussa. A locally linear RBF network-based state-dependent AR model for nonlinear time series modeling. Information Sciences, 180(22):4370–4383, November 2010. [11] S. Chen, S. A. Billings, C. F. N. Cowan, and P. M. Grant. Practical identification of NARMAX models using radial basis functions. International Journal of Control, 52(6):1327–1350, December 1990. [12] M. I. Rabinovich, R. Huerta, P. Varona, and V. S. Afraimovich. Transient cognitive dynamics, metastability, and decision making. PLoS Computational Biology, 4(5):e1000072+, May 2008. [13] D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. [14] M. Abadi, A. Agarwal, P. Barham, et al. TensorFlow: Large-scale machine learning on heterogeneous systems, 2015. Software available from tensorflow.org. [15] O. Barak, D. Sussillo, R. Romo, M. Tsodyks, and L. F. Abbott. From fixed points to chaos: three models of delayed discrimination. Progress in neurobiology, 103:214–222, April 2013. [16] C. K. Machens, R. Romo, and C. D. Brody. Flexible control of mutual inhibition: A neural model of Two-Interval discrimination. Science, 307(5712):1121–1124, February 2005. [17] V. Mante, D. Sussillo, K. V. Shenoy, and W. T. Newsome. Context-dependent computation by recurrent dynamics in prefrontal cortex. Nature, 503(7474):78–84, November 2013. [18] S. Ganguli, J. W. Bisley, J. D. Roitman, et al. One-dimensional dynamics of attention and decision making in LIP. Neuron, 58(1):15–25, April 2008. [19] M. E. Mazurek, J. D. Roitman, J. Ditterich, and M. N. Shadlen. A role for neural integrators in perceptual decision making. Cerebral Cortex, 13(11):1257–1269, November 2003. [20] K.-F. Wong and X.-J. Wang. A recurrent network mechanism of time integration in perceptual decisions. The Journal of Neuroscience, 26(4):1314–1328, January 2006. [21] M. S. Goldman. Memory without feedback in a neural network. Neuron, 61(4):621–634, February 2009. [22] C. Curto, S. Sakata, S. Marguet, V. Itskov, and K. D. Harris. A simple model of cortical dynamics explains variability and state dependence of sensory responses in Urethane-Anesthetized auditory cortex. The Journal of Neuroscience, 29(34):10600–10612, August 2009. [23] H. Kantz and T. Schreiber. Nonlinear Time Series Analysis. Cambridge University Press, 2003. [24] A. Peyrache, M. M. Lacroix, P. C. Petersen, and G. Buzsaki. Internally organized mechanisms of the head direction sense. Nature Neuroscience, 18(4):569–575, March 2015. [25] R. Laje and D. V. Buonomano. Robust timing and motor patterns by taming chaos in recurrent neural networks. Nat Neurosci, 16(7):925–933, July 2013. [26] Y. Zhao and I. M. Park. Variational latent Gaussian process for recovering single-trial dynamics from population spike trains. ArXiv e-prints, April 2016. [27] B. C. Daniels and I. Nemenman. Automated adaptive inference of phenomenological dynamical models. Nature Communications, 6:8133+, August 2015. 9 | 2016 | 414 |
6,344 | Stein Variational Gradient Descent: A General Purpose Bayesian Inference Algorithm Qiang Liu Dilin Wang Department of Computer Science Dartmouth College Hanover, NH 03755 {qiang.liu, dilin.wang.gr}@dartmouth.edu Abstract We propose a general purpose variational inference algorithm that forms a natural counterpart of gradient descent for optimization. Our method iteratively transports a set of particles to match the target distribution, by applying a form of functional gradient descent that minimizes the KL divergence. Empirical studies are performed on various real world models and datasets, on which our method is competitive with existing state-of-the-art methods. The derivation of our method is based on a new theoretical result that connects the derivative of KL divergence under smooth transforms with Stein’s identity and a recently proposed kernelized Stein discrepancy, which is of independent interest. 1 Introduction Bayesian inference provides a powerful tool for modeling complex data and reasoning under uncertainty, but casts a long standing challenge on computing intractable posterior distributions. Markov chain Monte Carlo (MCMC) has been widely used to draw approximate posterior samples, but is often slow and has difficulty accessing the convergence. Variational inference instead frames the Bayesian inference problem into a deterministic optimization that approximates the target distribution with a simpler distribution by minimizing their KL divergence. This makes variational methods efficiently solvable by using off-the-shelf optimization techniques, and easily applicable to large datasets (i.e., "big data") using the stochastic gradient descent trick [e.g., 1]. In contrast, it is much more challenging to scale up MCMC to big data settings [see e.g., 2, 3]. Meanwhile, both the accuracy and computational cost of variational inference critically depend on the set of distributions in which the approximation is defined. Simple approximation sets, such as these used in the traditional mean field methods, are too restrictive to resemble the true posterior distributions, while more advanced choices cast more difficulties on the subsequent optimization tasks. For this reason, efficient variational methods often need to be derived on a model-by-model basis, causing is a major barrier for developing general purpose, user-friendly variational tools applicable for different kinds of models, and accessible to non-ML experts in application domains. This case is in contrast with the maximum a posteriori (MAP) optimization tasks for finding the posterior mode (sometimes known as the poor man’s Bayesian estimator, in contrast with the full Bayesian inference for approximating the full posterior distribution), for which variants of (stochastic) gradient descent serve as a simple, generic, yet extremely powerful toolbox. There has been a recent growth of interest in creating user-friendly variational inference tools [e.g., 4–7], but more efforts are still needed to develop more efficient general purpose algorithms. In this work, we propose a new general purpose variational inference algorithm which can be treated as a natural counterpart of gradient descent for full Bayesian inference (see Algorithm 1). Our 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. algorithm uses a set of particles for approximation, on which a form of (functional) gradient descent is performed to minimize the KL divergence and drive the particles to fit the true posterior distribution. Our algorithm has a simple form, and can be applied whenever gradient descent can be applied. In fact, it reduces to gradient descent for MAP when using only a single particle, while automatically turns into a full Bayesian sampling approach with more particles. Underlying our algorithm is a new theoretical result that connects the derivative of KL divergence w.r.t. smooth variable transforms and a recently introduced kernelized Stein discrepancy [8–10], which allows us to derive a closed form solution for the optimal smooth perturbation direction that gives the steepest descent on the KL divergence within the unit ball of a reproducing kernel Hilbert space (RKHS). This new result is of independent interest, and can find wide application in machine learning and statistics beyond variational inference. 2 Background Preliminary Let x be a continuous random variable or parameter of interest taking values in X ⊂Rd, and {Dk} is a set of i.i.d. observation. With prior p0(x), Bayesian inference of x involves reasoning with the posterior distribution p(x) := ¯p(x)/Z with ¯p(x) := p0(x) QN k=1 p(Dk|x), where Z = R ¯p(x)dx is the troublesome normalization constant. We have dropped the conditioning on data {Dk} in p(x) for convenience. Let k(x, x′): X × X →R be a positive definite kernel. The reproducing kernel Hilbert space (RKHS) H of k(x, x′) is the closure of linear span {f : f(x) = Pm i=1 aik(x, xi), ai ∈R, m ∈ N, xi ∈X}, equipped with inner products ⟨f, g⟩H = P ij aibjk(xi, xj) for g(x) = P i bik(x, xi). Denote by Hd the space of vector functions f = [f1, . . . , fd]⊤with fi ∈H, equipped with inner product ⟨f, g⟩Hd = Pd i=1⟨fi, gi⟩H. We assume all the vectors are column vectors. Let ∇xf = [∇xf1, . . . , ∇xfd]. Stein’s Identity and Kernelized Stein Discrepancy Stein’s identity plays a fundamental role in our framework. Let p(x) be a continuously differentiable (also called smooth) density supported on X ⊆Rd, and φ(x) = [φ1(x), · · · , φd(x)]⊤a smooth vector function. Stein’s identity states that for sufficiently regular φ, we have Ex∼p[Apφ(x)] = 0, where Apφ(x) = ∇x log p(x)φ(x)⊤+ ∇xφ(x), (1) where Ap is called the Stein operator, which acts on function φ and yields a zero mean function Apφ(x) under x ∼p. This identity can be easily checked using integration by parts by assuming mild zero boundary conditions on φ: either p(x)φ(x) = 0, ∀x ∈∂X when X is compact, or limr→∞ H Br p(x)φ(x)⊤n(x)dS = 0 when X = Rd, where H Br is the surface integral on the sphere Br of radius r centered at the origin and n(x) is the unit normal to Br. We call that φ is in the Stein class of p if Stein’s identity (1) holds. Now let q(x) be a different smooth density also supported in X, and consider the expectation of Apφ(x) under x ∼q, then Ex∼q[Apφ(x)] would no longer equal zero for general φ. Instead, the magnitude of Ex∼q[Apφ(x)] relates to how different p and q are, and can be leveraged to define a discrepancy measure, known as Stein discrepancy, by considering the “maximum violation of Stein’s identity” for φ in some proper function set F: D(q, p) = max φ∈F Ex∼q[trace(Apφ(x))] , Here the choice of this function set F is critical, and decides the discriminative power and computational tractability of Stein discrepancy. Traditionally, F is taken to be sets of functions with bounded Lipschitz norms, which unfortunately casts a challenging functional optimization problem that is computationally intractable or requires special considerations (see Gorham and Mackey [11] and reference therein). Kernelized Stein discrepancy (KSD) bypasses this difficulty by maximizing φ in the unit ball of a reproducing kernel Hilbert space (RKHS) for which the optimization has a closed form solution. KSD is defined as D(q, p) = max φ∈Hd Ex∼q[trace(Apφ(x))], s.t. ||φ||Hd ≤1 , (2) 2 where we assume the kernel k(x, x′) of RKHS H is in the Stein class of p as a function of x for any fixed x′ ∈X. The optimal solution of (2) has been shown to be φ(x) = φ∗ q,p(x)/||φ∗ q,p||Hd [8–10], where φ∗ q,p(·) = Ex∼q[Apk(x, ·)], for which we have D(q, p) = ||φ∗ q,p||Hd. (3) One can further show that D(q, p) equals zero (and equivalently φ∗ q,p(x) ≡0) if and only if p = q once k(x, x′) is strictly positive definite in a proper sense [See 8, 10], which is satisfied by commonly used kernels such as the RBF kernel k(x, x′) = exp(−1 h||x −x′||2 2). Note that the RBF kernel is also in the Stein class of smooth densities supported in X = Rd because of its decaying property. Both Stein operator and KSD depend on p only through the score function ∇x log p(x), which can be calculated without knowing the normalization constant of p, because we have ∇x log p(x) = ∇x log ¯p(x) when p(x) = ¯p(x)/Z. This property makes Stein’s identity a powerful tool for handling unnormalized distributions that appear widely in machine learning and statistics. 3 Variational Inference Using Smooth Transforms Variational inference approximates the target distribution p(x) using a simpler distribution q∗(x) found in a predefined set Q = {q(x)} of distributions by minimizing the KL divergence, that is, q∗= arg min q∈Q KL(q || p) ≡Eq[log q(x)] −Eq[log ¯p(x)] + log Z , (4) where we do not need to calculate the constant log Z for solving the optimization. The choice of set Q is critical and defines different types of variational inference methods. The best set Q should strike a balance between i) accuracy, broad enough to closely approximate a large class of target distributions, ii) tractability, consisting of simple distributions that are easy for inference, and iii) solvability so that the subsequent KL minimization problem can be efficiently solved. In this work, we focus on the sets Q consisting of distributions obtained by smooth transforms from a tractable reference distribution, that is, we take Q to be the set of distributions of random variables of form z = T (x) where T : X →X is a smooth one-to-one transform, and x is drawn from a tractable reference distribution q0(x). By the change of variables formula, the density of z is q[T ](z) = q(T −1(z)) · | det(∇zT −1(z))|, where T −1 denotes the inverse map of T and ∇zT −1 the Jacobian matrix of T −1. Such distributions are computationally tractable, in the sense that the expectation under q[T ] can be easily evaluated by averaging {zi} when zi = T (xi) and xi ∼q0. Such Q can also in principle closely approximate almost arbitrary distributions: it can be shown that there always exists a measurable transform T between any two distributions without atoms (i.e. no single point carries a positive mass); in addition, for Lipschitz continuous densities p and q, there always exist transforms between them that are least as smooth as both p and q. We refer the readers to Villani [12] for in-depth discussion on this topic. In practice, however, we need to restrict the set of transforms T properly to make the corresponding variational optimization in (4) practically solvable. One approach is to consider T with certain parametric form and optimize the corresponding parameters [e.g., 13, 14]. However, this introduces a difficult problem on selecting the proper parametric family to balance the accuracy, tractability and solvability, especially considering that T has to be an one-to-one map and has to have an efficiently computable Jacobian matrix. Instead, we propose a new algorithm that iteratively constructs incremental transforms that effectively perform steepest descent on T in RKHS. Our algorithm does not require to explicitly specify parametric forms, nor to calculate the Jacobian matrix, and has a particularly simple form that mimics the typical gradient descent algorithm, making it easily implementable even for non-experts in variational inference. 3.1 Stein Operator as the Derivative of KL Divergence To explain how we minimize the KL divergence in (4), we consider an incremental transform formed by a small perturbation of the identity map: T (x) = x + ϵφ(x), where φ(x) is a smooth function 3 that characterizes the perturbation direction and the scalar ϵ represents the perturbation magnitude. When |ϵ| is sufficiently small, the Jacobian of T is full rank (close to the identity matrix), and hence T is guaranteed to be an one-to-one map by the inverse function theorem. The following result, which forms the foundation of our method, draws an insightful connection between Stein operator and the derivative of KL divergence w.r.t. the perturbation magnitude ϵ. Theorem 3.1. Let T (x) = x + ϵφ(x) and q[T ](z) the density of z = T (x) when x ∼q(x), we have ∇ϵKL(q[T ] || p) ϵ=0 = −Ex∼q[trace(Apφ(x))], (5) where Apφ(x) = ∇x log p(x)φ(x)⊤+ ∇xφ(x) is the Stein operator. Relating this to the definition of KSD in (2), we can identify the φ∗ q,p in (3) as the optimal perturbation direction that gives the steepest descent on the KL divergence in zero-centered balls of Hd. Lemma 3.2. Assume the conditions in Theorem 3.1. Consider all the perturbation directions φ in the ball B = {φ ∈Hd : ||φ||Hd ≤D(q, p)} of vector-valued RKHS Hd, the direction of steepest descent that maximizes the negative gradient in (5) is the φ∗ q,p in (3), i.e., φ∗ q,p(·) = Ex∼q[∇x log p(x)k(x, ·) + ∇xk(x, ·)], (6) for which (5) equals the square of KSD, that is, ∇ϵKL(q[T ] || p) ϵ=0 = −D2(q, p). The result in Lemma (3.2) suggests an iterative procedure that transforms an initial reference distribution q0 to the target distribution p: we start with applying transform T ∗ 0(x) = x + ϵ0 · φ∗ q0,p(x) on q0 which decreases the KL divergence by an amount of ϵ0 · D2(q0, p), where ϵ0 is a small step size; this would give a new distribution q1(x) = q0[T 0](x), on which a further transform T ∗ 1(x) = x + ϵ1 · φ∗ q1,p(x) can further decrease the KL divergence by ϵ1 · D2(q1, p). Repeating this process one constructs a path of distributions {qℓ}n ℓ=1 between q0 and p via qℓ+1 = qℓ[T ∗ ℓ], where T ∗ ℓ(x) = x + ϵℓ· φ∗ qℓ,p(x). (7) This would eventually converge to the target p with sufficiently small step-size {ϵℓ}, under which φ∗ p,q∞(x) ≡0 and T ∗ ∞reduces to the identity map. Recall that q∞= p if and only if φ∗ p,q∞(x) ≡0. Functional Gradient To gain further intuition on this process, we now reinterpret (6) as a functional gradient in RKHS. For any functional F[f] of f ∈Hd, its (functional) gradient ∇fF[f] is a function in Hd such that F[f + ϵg(x)] = F[f] + ϵ ⟨∇fF[f], g⟩Hd + O(ϵ2) for any g ∈Hd and ϵ ∈R. Theorem 3.3. Let T (x) = x + f(x), where f ∈Hd, and q[T ] the density of z = T (x) when x ∼q, ∇fKL(q[T ] || p) f=0 = −φ∗ q,p(x), whose RKHS norm is ||φ∗ q,p||Hd = D(q, p). This suggests that T ∗(x) = x + ϵ · φ∗ q,p(x) is equivalent to a step of functional gradient descent in RKHS. However, what is critical in the iterative procedure (7) is that we also iteratively apply the variable transform so that every time we would only need to evaluate the functional gradient descent at zero perturbation f = 0 on the identity map T (x) = x. This brings a critical advantage since the gradient at f ̸= 0 is more complex and would require to calculate the inverse Jacobian matrix [∇xT (x)]−1 that casts computational or implementation hurdles. 3.2 Stein Variational Gradient Descent To implement the iterative procedure (7) in practice, one would need to approximate the expectation for calculating φ∗ q,p(x) in (6). To do this, we can first draw a set of particles {x0 i }n i=1 from the initial distribution q0, and then iteratively update the particles with an empirical version of the transform in (7) in which the expectation under qℓin φ∗ qℓ,p is approximated by the empirical mean of particles {xℓ i}n i=1 at the ℓ-th iteration. This procedure is summarized in Algorithm 1, which allows us to (deterministically) transport a set of points to match our target distribution p(x), effectively providing 4 Algorithm 1 Bayesian Inference via Variational Gradient Descent Input: A target distribution with density function p(x) and a set of initial particles {x0 i }n i=1. Output: A set of particles {xi}n i=1 that approximates the target distribution p(x). for iteration ℓdo xℓ+1 i ←xℓ i + ϵℓˆφ∗(xℓ i) where ˆφ∗(x) = 1 n n X j=1 k(xℓ j, x)∇xℓ j log p(xℓ j) + ∇xℓ jk(xℓ j, x) , (8) where ϵℓis the step size at the ℓ-th iteration. end for a sampling method for p(x). We can see that the implementation of this procedure does not depend on the initial distribution q0 at all, and in practice we can start with a set of arbitrary points {xi}n i=1, possibly generated by a complex (randomly or deterministic) black-box procedure. We can expect that {xℓ i}n i=1 forms increasingly better approximation for qℓas n increases. To see this, denote by Φ the nonlinear map that takes the measure of qℓand outputs that of qℓ+1 in (7), that is, qℓ+1 = Φℓ(qℓ), where qℓenters the map through both qℓ[T ∗ ℓ] and φ∗ qℓ,p. Then, the updates in Algorithm 1 can be seen as applying the same map Φ on the empirical measure ˆqℓof particles {xℓ i} to get the empirical measure ˆqℓ+1 of particles {xℓ+1 i } at the next iteration, that is, ˆqℓ+1 = Φℓ(ˆqℓ). Since ˆq0 converges to q0 as n increases, ˆqℓshould also converge to qℓwhen the map Φ is “continuous” in a proper sense. Rigorous theoretical results on such convergence have been established in the mean field theory of interacting particle systems [e.g., 15], which in general guarantee that Pn i=1 h(xℓ i)/n −Eqℓ[h(x)] = O(1/√n) for bounded testing functions h. In addition, the distribution of each particle xℓ i0, for any fixed i0, also tends to qℓ, and is independent with any other finite subset of particles as n →∞, a phenomenon called propagation of chaos [16]. We leave concrete theoretical analysis for future work. Algorithm 1 mimics a gradient dynamics at the particle level, where the two terms in ˆφ∗(x) in (8) play different roles: the first term drives the particles towards the high probability areas of p(x) by following a smoothed gradient direction, which is the weighted sum of the gradients of all the points weighted by the kernel function. The second term acts as a repulsive force that prevents all the points to collapse together into local modes of p(x); to see this, consider the RBF kernel k(x, x′) = exp(−1 h||x −x′||2), the second term reduces to P j 2 h(x −xj)k(xj, x), which drives x away from its neighboring points xj that have large k(xj, x). If we let bandwidth h →0, the repulsive term vanishes, and update (8) reduces to a set of independent chains of typical gradient ascent for maximizing log p(x) (i.e., MAP) and all the particles would collapse into the local modes. Another interesting case is when we use only a single particle (n = 1), in which case Algorithm 1 reduces to a single chain of typical gradient ascent for MAP for any kernel that satisfies ∇xk(x, x) = 0 (for which RBF holds). This suggests that our algorithm can generalize well for supervised learning tasks even with a very small number n of particles, since gradient ascent for MAP (n = 1) has been shown to be very successful in practice. This property distinguishes our particle method with the typical Monte Carlo methods that requires to average over many points. The key difference here is that we use a deterministic repulsive force, other than Monte Carlo randomness, to get diverse points for distributional approximation. Complexity and Efficient Implementation The major computation bottleneck in (8) lies on calculating the gradient ∇x log p(x) for all the points {xi}n i=1; this is especially the case in big data settings when p(x) ∝p0(x) Q N k=1p(Dk|x) with a very large N. We can conveniently address this problem by approximating ∇x log p(x) with subsampled mini-batches Ω⊂{1, . . . , N} of the data ∇x log p(x) ≈log p0(x) + N |Ω| X k∈Ω log p(Dk | x). (9) Additional speedup can be obtained by parallelizing the gradient evaluation of the n particles. The update (8) also requires to compute the kernel matrix {k(xi, xj)} which costs O n2 ; in practice, this cost can be relatively small compared with the cost of gradient evaluation, since it can be sufficient to use a relatively small n (e.g., several hundreds) in practice. If there is a need for very large n, one 5 can approximate the summation Pn i=1 in (8) by subsampling the particles, or using a random feature expansion of the kernel k(x, x′) [17]. 4 Related Works Our work is mostly related to Rezende and Mohamed [13], which also considers variational inference over the set of transformed random variables, but focuses on transforms of parametric form T(x) = fℓ(· · · (f1(f0(x)))) where fi(·) is a predefined simple parametric transform and ℓa predefined length; this essentially creates a feedforward neural network with ℓlayers, whose invertibility requires further conditions on the parameters and needs to be established case by case. The similar idea is also discussed in Marzouk et al. [14], which also considers transforms parameterized in special ways to ensure the invertible and the computational tractability of the Jacobian matrix. Recently, Tran et al. [18] constructed a variational family that achieves universal approximation based on Gaussian process (equivalent to a single-layer, infinitely-wide neural network), which does not have a Jacobian matrix but needs to calculate the inverse of the kernel matrix of the Gaussian process. Our algorithm has a simpler form, and does not require to calculate any matrix determinant or inversion. Several other works also leverage variable transforms in variational inference, but with more limited forms; examples include affine transforms [19, 20], and recently the copula models that correspond to element-wise transforms over the individual variables [21, 22]. Our algorithm maintains and updates a set of particles, and is of similar style with the Gaussian mixture variation inference methods whose mean parameters can be treated as a set of particles. [23–26, 5]. Optimizing such mixture KL objectives often requires certain approximation, and this was done most recently in Gershman et al. [5] by approximating the entropy using Jensen’s inequality and the expectation term using Taylor approximation. There is also a large set of particle-based Monte Carlo methods, including variants of sequential Monte Carlo [e.g., 27, 28], as well as a recent particle mirror descent for optimizing the variational objective function [7]; compared with these methods, our method does not have the weight degeneration problem, and is much more “particle-efficient” in that we reduce to MAP with only one single particle. 5 Experiments We test our algorithm on both toy and real world examples, on which we find our method tends to outperform a variety of baseline methods. Our code is available at https://github.com/DartML/ Stein-Variational-Gradient-Descent. For all our experiments, we use RBF kernel k(x, x′) = exp(−1 h||x −x′||2 2), and take the bandwidth to be h = med2/ log n, where med is the median of the pairwise distance between the current points {xi}n i=1; this is based on the intuition that we would have P j k(xi, xj) ≈n exp(−1 hmed2) = 1, so that for each xi the contribution from its own gradient and the influence from the other points balance with each other. Note that in this way, the bandwidth h actually changes adaptively across the iterations. We use AdaGrad for step size and initialize the particles using the prior distribution unless otherwise specified. Toy Example on 1D Gaussian Mixture We set our target distribution to be p(x) = 1/3N(x; − 2, 1) + 2/3N(x; 2, 1), and initialize the particles using q0(x) = N(x; −10, 1). This creates a challenging situation since the probability mass of p(x) and q0(x) are far away each other (with almost zero overlap). Figure 1 shows how the distribution of the particles (n = 1) of our method evolve at different iterations. We see that despite the small overlap between q0(x) and p(x), our method can push the particles towards the target distribution, and even recover the mode that is further away from the initial point. We found that other particle based algorithms, such as Dai et al. [7], tend to experience weight degeneracy on this toy example due to the ill choice of q0(x). Figure 2 compares our method with Monte Carlo sampling when using the obtained particles to estimate expectation Ep(h(x)) with different test functions h(·). We see that the MSE of our method tends to perform similarly or better than the exact Monte Carlo sampling. This may be because our particles are more spread out than i.i.d. samples due to the repulsive force, and hence give higher estimation accuracy. It remains an open question to formally establish the error rate of our method. 6 -10 0 10 0.1 0.2 0.3 0.4 0th Iteration -10 0 10 0.1 0.2 0.3 0.4 50th Iteration -10 0 10 0.1 0.2 0.3 0.4 75th Iteration -10 0 10 0.1 0.2 0.3 0.4 100th Iteration -10 0 10 0.1 0.2 0.3 0.4 150th Iteration -10 0 10 0.1 0.2 0.3 0.4 500th Iteration Figure 1: Toy example with 1D Gaussian mixture. The red dashed lines are the target density function and the solid green lines are the densities of the particles at different iterations of our algorithm (estimated using kernel density estimator) . Note that the initial distribution is set to have almost zero overlap with the target distribution, and our method demonstrates the ability of escaping the local mode on the left to recover the mode on the left that is further away. We use n = 100 particles. Sample Size (n) 10 50 250 Log10 MSE -1.5 -1 -0.5 Sample Size (n) 10 50 250 Log10 MSE -3 -2 -1 0 Sample Size (n) 10 50 250 Log10 MSE -3.5 -3 -2.5 -2 Monte Carlo Stein Variational Gradient Descent (a) Estimating E(x) (b) Estimating E(x2) (c) Estimating E(cos(ωx + b)) Figure 2: We use the same setting as Figure 1, except varying the number n of particles. (a)-(c) show the mean square errors when using the obtained particles to estimate expectation Ep(h(x)) for h(x) = x, x2, and cos(ωx + b); for cos(ωx + b), we draw ω ∼N(0, 1) and b ∼Uniform([0, 2π]) and report the average MSE over 20 random draws of ω and b. Bayesian Logistic Regression We consider Bayesian logistic regression for binary classification using the same setting as Gershman et al. [5], which assigns the regression weights w with a Gaussian prior p0(w|α) = N(w, α−1) and p0(α) = Gamma(α, 1, 0.01). The inference is applied on posterior p(x|D) with x = [w, log α]. We compared our algorithm with the no-U-turn sampler (NUTS)1 [29] and non-parametric variational inference (NPV)2 [5] on the 8 datasets (N > 500) used in Gershman et al. [5], and find they tend to give very similar results on these (relatively simple) datasets; see Appendix for more details. We further test the binary Covertype dataset3 with 581,012 data points and 54 features. This dataset is too large, and a stochastic gradient descent is needed for speed. Because NUTS and NPV do not have mini-batch option in their code, we instead compare with the stochastic gradient Langevin dynamics (SGLD) by Welling and Teh [2], the particle mirror descent (PMD) by Dai et al. [7], and the doubly stochastic variational inference (DSVI) by Titsias and Lázaro-Gredilla [19].4 We also compare with a parallel version of SGLD that runs n parallel chains and take the last point of each chain as the result. This parallel SGLD is similar with our method and we use the same step-size of ϵℓ= a/(t + 1).55 for both as suggested by Welling and Teh [2] for fair comparison; 5 we select a using a validation set within the training set. For PMD, we use a step size of a N /(100 + √ t), and RBF kernel k(x, x′) = exp(−||x −x′||2/h) with bandwidth h = 0.002 × med2 which is based on the guidance of Dai et al. [7] which we find works most efficiently for PMD. Figure 3(a)-(b) shows the results when we initialize our method and both versions of SGLD using the prior p0(α)p0(w|α); we find that PMD tends to be unstable with this initialization because it generates weights w with large magnitudes, so we divided the initialized weights by 10 for PMD; as shown in Figure 3(a), this gives some advantage to PMD in the initial stage. We find our method generally performs the best, followed with the parallel SGLD, which is much better than its sequential counterpart; this comparison is of course in favor of parallel SGLD, since each iteration of it requires n = 100 times of likelihood evaluations compared with sequential SGLD. However, by leveraging the matrix operation in MATLAB, we find that each iteration of parallel SGLD is only 3 times more expensive than sequential SGLD. 1code: http://www.cs.princeton.edu/ mdhoffma/ 2code: http://gershmanlab.webfactional.com/pubs/npv.v1.zip 3https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary.html 4code: http://www.aueb.gr/users/mtitsias/code/dsvi_matlabv1.zip. 5We scale the gradient of SGLD by a factor of 1/n to make it match with the scale of our gradient in (8). 7 0.1 1 2 Number of Epoches 0.65 0.7 0.75 Testing Accuracy 1 10 50 250 Particle Size (n) 0.65 0.7 0.75 Testing Accuracy Stein Variational Gradient Descent (Our Method) Stochastic Langevin (Parallel SGLD) Particle Mirror Descent (PMD) Doubly Stochastic (DSVI) Stochastic Langevin (Sequential SGLD) (a) Particle size n = 100 (b) Results at 3000 iteration (≈0.32 epoches) Figure 3: Results on Bayesian logistic regression on Covertype dataset w.r.t. epochs and the particle size n. We use n = 100 particles for our method, parallel SGLD and PMD, and average the last 100 points for the sequential SGLD. The “particle-based” methods (solid lines) in principle require 100 times of likelihood evaluations compare with DVSI and sequential SGLD (dash lines) per iteration, but are implemented efficiently using Matlab matrix operation (e.g., each iteration of parallel SGLD is about 3 times slower than sequential SGLD). We partition the data into 80% for training and 20% for testing and average on 50 random trials. A mini-batch size of 50 is used for all the algorithms. Bayesian Neural Network We compare our algorithm with the probabilistic back-propagation (PBP) algorithm by Hernández-Lobato and Adams [30] on Bayesian neural networks. Our experiment settings are almost identity, except that we use a Gamma(1, 0.1) prior for the inverse covariances and do not use the trick of scaling the input of the output layer. We use neural networks with one hidden layers, and take 50 hidden units for most datasets, except that we take 100 units for Protein and Year which are relatively large; all the datasets are randomly partitioned into 90% for training and 10% for testing, and the results are averaged over 20 random trials, except for Protein and Year on which 5 and 1 trials are repeated, respectively. We use RELU(x) = max(0, x) as the active function, whose weak derivative is I[x > 0] (Stein’s identity also holds for weak derivatives; see Stein et al. [31]). PBP is repeated using the default setting of the authors’ code6. For our algorithm, we only use 20 particles, and use AdaGrad with momentum as what is standard in deep learning. The mini-batch size is 100 except for Year on which we use 1000. We find our algorithm consistently improves over PBP both in terms of the accuracy and speed; this is encouraging since PBP were specifically designed for Bayesian neural network. We also find that our results are comparable with the more recent results reported on the same datasets [e.g., 32–34] which leverage some advanced techniques that we can also benefit from. Avg. Test RMSE Avg. Test LL Avg. Time (Secs) Dataset PBP Our Method PBP Our Method PBP Ours Boston 2.977 ± 0.093 2.957 ± 0.099 2.957 ± 0.099 2.957 ± 0.099 −2.579 ± 0.052 −2.504 ± 0.029 −2.504 ± 0.029 −2.504 ± 0.029 18 16 16 16 Concrete 5.506 ± 0.103 5.324 ± 0.104 5.324 ± 0.104 5.324 ± 0.104 −3.137 ± 0.021 −3.082 ± 0.018 −3.082 ± 0.018 −3.082 ± 0.018 33 24 24 24 Energy 1.734 ± 0.051 1.374 ± 0.045 1.374 ± 0.045 1.374 ± 0.045 −1.981 ± 0.028 −1.767 ± 0.024 −1.767 ± 0.024 −1.767 ± 0.024 25 21 21 21 Kin8nm 0.098 ± 0.001 0.090 ± 0.001 0.090 ± 0.001 0.090 ± 0.001 0.901 ± 0.010 0.984 ± 0.008 0.984 ± 0.008 0.984 ± 0.008 118 41 41 41 Naval 0.006 ± 0.000 0.004 ± 0.000 0.004 ± 0.000 0.004 ± 0.000 3.735 ± 0.004 4.089 ± 0.012 4.089 ± 0.012 4.089 ± 0.012 173 49 49 49 Combined 4.052 ± 0.031 4.033 ± 0.033 4.033 ± 0.033 4.033 ± 0.033 −2.819 ± 0.008 −2.815 ± 0.008 −2.815 ± 0.008 −2.815 ± 0.008 136 51 51 51 Protein 4.623 ± 0.009 4.606 ± 0.013 4.606 ± 0.013 4.606 ± 0.013 −2.950 ± 0.002 −2.947 ± 0.003 −2.947 ± 0.003 −2.947 ± 0.003 682 68 68 68 Wine 0.614 ± 0.008 0.609 ± 0.010 0.609 ± 0.010 0.609 ± 0.010 −0.931 ± 0.014 −0.925 ± 0.014 −0.925 ± 0.014 −0.925 ± 0.014 26 22 22 22 Yacht 0.778 ± 0.042 0.778 ± 0.042 0.778 ± 0.042 0.864 ± 0.052 −1.211 ± 0.044 −1.211 ± 0.044 −1.211 ± 0.044 −1.225 ± 0.042 25 25 Year 8.733 ± NA 8.684 ± NA 8.684 ± NA 8.684 ± NA −3.586 ± NA −3.580 ± NA −3.580 ± NA −3.580 ± NA 7777 684 684 684 6 Conclusion We propose a simple general purpose variational inference algorithm for fast and scalable Bayesian inference. Future directions include more theoretical understanding on our method, more practical applications in deep learning models, and other potential applications of our basic Theorem in Section 3.1. Acknowledgement This work is supported in part by NSF CRII 1565796. 6https://github.com/HIPS/Probabilistic-Backpropagation 8 References [1] M. D. Hoffman, D. M. Blei, C. Wang, and J. Paisley. Stochastic variational inference. JMLR, 2013. [2] M. Welling and Y. W. Teh. Bayesian learning via stochastic gradient Langevin dynamics. In ICML, 2011. [3] D. Maclaurin and R. P. Adams. Firefly Monte Carlo: Exact MCMC with subsets of data. In UAI, 2014. [4] R. Ranganath, S. Gerrish, and D. M. Blei. Black box variational inference. In AISTATS, 2014. [5] S. Gershman, M. Hoffman, and D. Blei. Nonparametric variational inference. In ICML, 2012. [6] A. Kucukelbir, R. Ranganath, A. Gelman, and D. Blei. Automatic variational inference in STAN. In NIPS, 2015. [7] B. Dai, N. He, H. Dai, and L. Song. Provable Bayesian inference via particle mirror descent. In AISTATS, 2016. [8] Q. Liu, J. D. Lee, and M. I. Jordan. A kernelized Stein discrepancy for goodness-of-fit tests and model evaluation. arXiv preprint arXiv:1602.03253, 2016. [9] C. J. Oates, M. Girolami, and N. Chopin. Control functionals for Monte Carlo integration. Journal of the Royal Statistical Society, Series B, 2017. [10] K. Chwialkowski, H. Strathmann, and A. Gretton. A kernel test of goodness-of-fit. arXiv preprint arXiv:1602.02964, 2016. [11] J. Gorham and L. Mackey. Measuring sample quality with Stein’s method. In NIPS, pages 226–234, 2015. [12] C. Villani. Optimal transport: old and new, volume 338. Springer Science & Business Media, 2008. [13] D. J. Rezende and S. Mohamed. Variational inference with normalizing flows. In ICML, 2015. [14] Y. Marzouk, T. Moselhy, M. Parno, and A. Spantini. An introduction to sampling via measure transport. arXiv preprint arXiv:1602.05023, 2016. [15] P. Del Moral. Mean field simulation for Monte Carlo integration. CRC Press, 2013. [16] M. Kac. Probability and related topics in physical sciences, volume 1. American Mathematical Soc., 1959. [17] A. Rahimi and B. Recht. Random features for large-scale kernel machines. In NIPS, pages 1177–1184, 2007. [18] D. Tran, R. Ranganath, and D. M. Blei. Variational Gaussian process. In ICLR, 2016. [19] M. Titsias and M. Lázaro-Gredilla. Doubly stochastic variational Bayes for non-conjugate inference. In ICML, pages 1971–1979, 2014. [20] E. Challis and D. Barber. Affine independent variational inference. In NIPS, 2012. [21] S. Han, X. Liao, D. B. Dunson, and L. Carin. Variational Gaussian copula inference. In AISTATS, 2016. [22] D. Tran, D. M. Blei, and E. M. Airoldi. Copula variational inference. In NIPS, 2015. [23] C. M. B. N. Lawrence and T. J. M. I. Jordan. Approximating posterior distributions in belief networks using mixtures. In NIPS, 1998. [24] T. S. Jaakkola and M. I. Jordon. Improving the mean field approximation via the use of mixture distributions. In Learning in graphical models, pages 163–173. MIT Press, 1999. [25] N. D. Lawrence. Variational inference in probabilistic models. PhD thesis, University of Cambridge, 2001. [26] T. D. Kulkarni, A. Saeedi, and S. Gershman. Variational particle approximations. arXiv preprint arXiv:1402.5715, 2014. [27] C. Robert and G. Casella. Monte Carlo statistical methods. Springer Science & Business Media, 2013. [28] A. Smith, A. Doucet, N. de Freitas, and N. Gordon. Sequential Monte Carlo methods in practice. Springer Science & Business Media, 2013. [29] M. D. Hoffman and A. Gelman. The No-U-Turn sampler: Adaptively setting path lengths in Hamiltonian Monte Carlo. The Journal of Machine Learning Research, 15(1):1593–1623, 2014. [30] J. M. Hernández-Lobato and R. P. Adams. Probabilistic backpropagation for scalable learning of Bayesian neural networks. In ICML, 2015. [31] C. Stein, P. Diaconis, S. Holmes, G. Reinert, et al. Use of exchangeable pairs in the analysis of simulations. In Stein’s Method, pages 1–25. Institute of Mathematical Statistics, 2004. [32] Y. Li, J. M. Hernández-Lobato, and R. E. Turner. Stochastic expectation propagation. In NIPS, 2015. [33] Y. Li and R. E. Turner. Variational inference with Renyi divergence. arXiv preprint arXiv:1602.02311, 2016. [34] Y. Gal and Z. Ghahramani. Dropout as a Bayesian approximation: Representing model uncertainty in deep learning. arXiv preprint arXiv:1506.02142, 2015. 9 | 2016 | 415 |
6,345 | Learning in Games: Robustness of Fast Convergence Dylan J. Foster⇤ Zhiyuan Li† Thodoris Lykouris⇤ Karthik Sridharan⇤ Éva Tardos⇤ Abstract We show that learning algorithms satisfying a low approximate regret property experience fast convergence to approximate optimality in a large class of repeated games. Our property, which simply requires that each learner has small regret compared to a (1 + ✏)-multiplicative approximation to the best action in hindsight, is ubiquitous among learning algorithms; it is satisfied even by the vanilla Hedge forecaster. Our results improve upon recent work of Syrgkanis et al. [28] in a number of ways. We require only that players observe payoffs under other players’ realized actions, as opposed to expected payoffs. We further show that convergence occurs with high probability, and show convergence under bandit feedback. Finally, we improve upon the speed of convergence by a factor of n, the number of players. Both the scope of settings and the class of algorithms for which our analysis provides fast convergence are considerably broader than in previous work. Our framework applies to dynamic population games via a low approximate regret property for shifting experts. Here we strengthen the results of Lykouris et al. [19] in two ways: We allow players to select learning algorithms from a larger class, which includes a minor variant of the basic Hedge algorithm, and we increase the maximum churn in players for which approximate optimality is achieved. In the bandit setting we present a new algorithm which provides a “small loss”-type bound with improved dependence on the number of actions in utility settings, and is both simple and efficient. This result may be of independent interest. 1 Introduction Consider players repeatedly playing a game, all acting independently to minimize their cost or maximize their utility. It is natural in this setting for each player to use a learning algorithm that guarantees small regret to decide on their strategy, as the environment is constantly changing due to each player’s choice of strategy. It is well known that such decentralized no-regret dynamics are guaranteed to converge to a form of equilibrium for the game. Furthermore, in a large class of games known as smooth games [23] they converge to outcomes with approximately optimal social welfare matching the worst-case efficiency loss of Nash equilibria (the price of anarchy). In smooth cost minimization games the overall cost is λ/(1 −µ) times the minimum cost, while in smooth mechanisms [29] such as auctions it is λ/ max(1, µ) times the maximum total utility (where λ and µ are parameters of the smoothness condition). Examples of smooth games and mechanisms include routing games and many forms of auction games (see e.g. [23, 29, 24]). The speed at which the game outcome converges to this approximately optimal welfare is governed by individual players’ regret bounds. There are a large number of simple regret minimization algorithms (Hedge/Multiplicative Weights, Mirror Decent, Follow the Regularized Leader; see e.g. [12]) that ⇤Cornell University {djfoster,teddlyk,sridharan,eva}@cs.cornell.edu. Work supported in part under NSF grants CDS&E-MSS 1521544, CCF-1563714, ONR grant N00014-08-1-0031, a Google faculty research award, and an NDSEG fellowship. †Tsinghua University, lizhiyuan13@mails.tsinghua.edu.cn. Research performed while author was visiting Cornell University. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. guarantee that the average regret goes down as O(1/ p T) with time T, which is tight in adversarial settings. Taking advantage of the fact that playing a game against opponents who themselves are also using regret minimization is not a truly adversarial setting, a sequence of papers [9, 22, 28] showed that by using specific learning algorithms, the dependence on T of the convergence rate can be improved to O(1/T) (“fast convergence”). Concretely, Syrgkanis et al. [28] show that all algorithms satisfying the so-called RVU property (Regret by Variation in Utilities), which include Optimistic Mirror Descent [22], converge at a O(1/T) rate with a fixed number of players. One issue with the works of [9, 22, 28] is that they use expected cost as their feedback model for the players. In each round every player receives the expected cost for each of their available actions, in expectation over the current action distributions of all other players. This clearly represents more information than is realistically available to players in games — at most each player sees the cost of each of their actions given the actions taken by the other players (realized feedback). In fact, even if each player had access to the action distributions of the other players, simply computing this expectation is generally intractable when n, the number of players, is large. We improve the result of [28] on the convergence to approximate optimality in smooth games in a number of different aspects. To achieve this, we relax the quality of approximation from the bound guaranteed by smoothness. Typical smoothness bounds on the price of anarchy in auctions are small constants, such a factor of 1.58 or 2 in item auctions. Increasing the approximation factor by an arbitrarily small constant ✏> 0 enables the following results: • We show that learning algorithms obtaining fast convergence are ubiquitous. • We improve the speed of convergence by a factor of n, the number of players. • For all our results, players only need feedback based on realized outcomes, instead of expected outcomes. • We show that convergence occurs with high probability in most settings. • We extend the results to show that it is enough for the players to observe realized bandit feedback, only seeing the outcome of the action they play. • Our results apply to settings where the set of players in the game changes over time [19]. We strengthen previous results by showing that a broader class of algorithms achieve approximate efficiency under significant churn. We achieve these results using a property we term Low Approximate Regret, which simply states that an online learning algorithm achieves good regret against a multiplicative approximation of the best action in hindsight. This property is satisfied by many known algorithms including even the vanilla Hedge algorithm, as well as Optimistic Hedge [21, 28] (via a new analysis). The crux of our analysis technique is the simple observation that for many types of data-dependent regret bounds we can fold part of the regret bound into the comparator term, allowing us to explore the trade-off between additive and multiplicative approximation. In Section 3, we show that Low Approximate Regret implies fast convergence to the social welfare guaranteed by the price of anarchy via the smoothness property. This convergence only requires feedback from the realized actions played by other players, not their action distribution or the expectation over their actions. We further show that this convergence occurs with high probability in most settings. For games with a large number of players we also improve the speed of convergence. [28] shows that players using Optimistic Hedge in a repeated game with n players converge to the approximately optimal outcome guaranteed by smoothness at a rate of O(n2/T). They also offer an analysis guaranteeing convergence of O(n/T) , at the expense of a constant factor decrease in the quality of approximation (e.g., a factor of 4 in atomic congestion games with affine congestion). We achieve the convergence bound of O(n/T) with only an arbitrarily small loss in the approximation. Algorithms that satisfy the Low Approximate Regret property are ubiquitous and include simple, efficient algorithms such as Hedge and variants. The observation that this broad class of algorithms enjoys fast convergence in realistic settings suggests that fast convergence occurs in practice. Comparing our work to [28] with regard to feedback, Low Approximate Regret algorithms require only realized feedback, while the analysis of the RVU property in [28] requires expected feedback. To see the contrast, consider the load balancing game introduced in [17] with two players and two bins, where each player selects a bin and observes cost given by the number of players in that bin. Initialized at the uniform distribution, any learning algorithm with expectation feedback (e.g. those in [28]) will stay at the uniform distribution forever, because the expected cost vector distributes 2 cost equally across the two bins. This gives low regret under expected costs, but suppose we were interested in realized costs: The only “black box” way to lift [28] to this case would be to simply evaluate the regret bound above under realized costs, but here players will experience ⇥(1/ p T) variation because they select bins uniformly at random, ruining the fast convergence. Our analysis sidesteps this issue because players achieve Low Approximate Regret with high probability. In Section 4 we consider games where players can only observe the cost of the action they played given the actions taken by the other players, and receive no feedback for actions not played (bandit feedback). [22] analyzed zero-sum games with bandit feedback, but assumed that players receive expected cost over the strategies of all other players. In contrast, the Low Approximate Regret property can be satisfied by just observing realizations, even with bandit feedback. We propose a new bandit algorithm based on log-barrier regularization with importance sampling that guarantees fast convergence of O(d log T/✏) where d is the number of actions. Known techniques would either result in a convergence rate of O(d3 log T) (e.g. adaptations of SCRiBLe [21]) or would not extend to utility maximization settings (e.g. GREEN [2]). Our technique is of independent interest since it improves the dependence of approximate regret bounds on the number of experts while applying to both cost minimization and utility maximization settings. Finally, in Section 5, we consider the dynamic population game setting of [19], where players enter and leave the game over time. [19] showed that regret bounds for shifting experts directly influence the rate at which players can turn over and still guarantee close to optimal solutions on average. We show that a number of learning algorithms have the Low Approximate Regret property in the shifting experts setting, allowing us to extend the fast convergence result to dynamic games. Such learning algorithms include a noisy version of Hedge as well as AdaNormalHedge [18], which was previously studied in the dynamic setting in [19]. Low Approximate Regret allows us to increase the turnover rate from the one in [19], while also widening and simplifying the class of learning algorithms that players can use to guarantee the close to optimal average welfare. 2 Repeated Games and Learning Dynamics We consider a game G among a set of n players. Each player i has an action space Si and a cost function costi : S1 ⇥· · · ⇥Sn ! [0, 1] that maps an action profile s = (s1, . . . , sn) to the cost costi(s) that player experiences1. We assume that the action space of each player has cardinality d, i.e. |Si| = d. We let w = (w1, . . . , wn) denote a list of probability distributions over all players’ actions, where wi 2 ∆(Si) and wi,x is the probability of action x 2 Si. The game is repeated for T rounds. At each round t each player i picks a probability distribution wt i 2 ∆(Si) over actions and draws their action st i from this distribution. Depending on the game playing environment under consideration, players will receive different types of feedback after each round. In Sections 3 and 5 we consider feedback where at the end of the round each player i observes the utility they would have received had they played any possible action x 2 Si given the actions taken by the other players. More formally let ct i,x = costi(x, st −i), where st −i is the set of strategies of all but the ith player at round t, and let ct i = (ct i,x)x2Si. Note that the expected cost of player i at round t (conditioned on the other players’ actions) is simply the inner product hwt i, ct ii. We refer to this form of feedback as realized feedback since it only depends on the realized actions st −i sampled by the opponents; it does not directly depend on their distributions wt −i. This should be contrasted with the expectation feedback used by [28, 9, 22], where player i observes Est −i⇠wt −i[costi(x, st −i)] for each x. Sections 4 and 5 consider extensions of our repeated game model. In Section 4 we examine partial information (“bandit”) feedback, where players observe only the cost of their own realized actions. In Section 5 we consider a setting where the player set is evolving over time. Here we use the dynamic population model of [19], where at each round t each player i is replaced (“turns over”) with some probability p. The new player has cost function costt i(·) and action space St i which may change arbitrarily subject to certain constraints. We will formalize this notion later on. Learning Dynamics We assume that players select their actions using learning algorithms satisfying a property we call Low Approximate Regret, which simply requires that the cumulative cost of the learner multiplicatively approximates the cost of the best action they could have chosen in hindsight. 1See Appendix D for analogous definitions for utility maximization games. 3 We will see in subsequent sections that this property is ubiquitous and leads to fast convergence in a robust range of settings. Definition 1. (Low Approximate Regret) A learning algorithm for player i satisfies the Low Approximate Regret property for parameter ✏> 0 and function A(d, T) if for all action distributions f 2 ∆(Si), (1 −✏) T X t=1 hwt i, ct ii T X t=1 hf, ct ii + A(d, T) ✏ . (1) A learning algorithm satisfies Low Approximate Regret against shifting experts if for all sequences f 1, . . . , f T 2 ∆(Si), letting K = |{i > 2 : f t−1 6= f t}| be the number of shifts, (1 −✏) T X t=1 hwt i, ct ii T X t=1 hf t, ct ii + (1 + K)A(d, T) ✏ . (2) In the bandit feedback setting, we require (1) to hold in expectation over the realized strategies of player i for any f 2 ∆(Si) fixed before the game begins. We use the version of the Low Approximate Regret property with shifting experts when considering players in dynamic population games in Section 5. In this case, the game environment is constantly changing due to churn in the population, and we need the players to have low approximate regret with shifting experts to guarantee high social welfare despite the churn. We emphasize that all algorithms we are aware of that satisfy Low Approximate Regret can be made to do so for any fixed choice of the approximation factor ✏via an appropriate selection of parameters. Many algorithms have an even stronger property: They satisfy (1) or (2) for all ✏> 0 simultaneously. We say that such algorithms satisfy the Strong Low Approximate Regret property. This property has favorable consequences in the context of repeated games. The Low Approximate Regret property differs from previous properties such as RVU in that it only requires that the learner’s cost be close to a multiplicative approximation to the cost of the best action in hindsight. Consequently, it is always smaller than the regret. For instance, if we consider only uniform (i.e. not data-dependent) regret bounds the Hedge algorithm can only achieve O(pT log d) exact regret, but can achieve Low Approximate Regret with parameters ✏and A(d, T) = O(log d) for any ✏> 0. Low Approximate Regret is analogous to the notion of ↵-regret from [15], with ↵= (1 + ✏). In Appendix D we show that the Low Approximate Regret property and our subsequent results naturally extend to utility maximization games. Smooth Games It is well-known that in a large class of games, termed smooth games by Roughgarden [23], traditional learning dynamics converge to approximately optimal social welfare. In subsequent sections we analyze the convergence of Low Approximate Regret learning dynamics in such smooth games. We will see that Low Approximate Regret (for sufficiently small A(d, T)) coupled with smoothness of the game implies fast convergence of learning dynamics to desirable social welfare under a variety of conditions. Before proving this result we review social welfare and smooth games. For a given action profile s, the social cost is C(s) = Pn i=1 costi(s). To bound the efficiency loss due to the selfish behavior of the players we define OPT = min so n X i=1 costi(so). Definition 2. (Smooth game [23]) A cost minimization game is called (λ, µ)-smooth if for all strategy profiles s and s⇤: P i costi(s⇤ i , s−i) λ · costi(s⇤) + µ · costi(s). This property is typically applied using a (close to) optimal action profile s⇤= so. For this case the property implies that if s is an action profile with very high cost, then some player deviating to her share of the optimal profile s⇤ i will improve her cost. For smooth games, the price of anarchy is at most λ/(1 −µ), meaning that Nash equilibria of the game, as well as no-regret learning outcomes in the limit, have social cost at most a factor of λ/(1 −µ) above the optimum. Smooth cost minimization games include congestion games such 4 as routing or load balancing. For example, atomic congestion games with affine cost functions are ( 5 3, 1 3)-smooth [8], non-atomic games are (1, 0.25) smooth [25], implying a price of anarchy of 2.5 and 1.33 respectively. While we focus on cost-minimization games for simplicity of exposition, an analogous definition also applies for utility maximization, including smooth mechanisms [29], which we elaborate on in Appendix D. Smooth mechanisms include most simple auctions. For example, the first price item auction is (1 −1/e, 1)-smooth and all-pay actions are (1/2, 1)-smooth, implying a price of anarchy of 1.58 and 2 respectively. All of our results extend to such mechanisms. 3 Learning in Games with Full Information Feedback We now analyze the efficiency of algorithms with the Low Approximate Regret property in the full information setting. Our first proposition shows that, for smooth games with full information feedback, learners with the Low Approximate Regret property converge to efficient outcomes. Proposition 1. In any (λ, µ)-smooth game, if all players use Low Approximate Regret algorithms satisfying Eq. (1) with parameters ✏and A(d, T), then for the action profiles st drawn on round t from the corresponding mixed actions of the players, 1 T X t E ⇥ C(st) ⇤ λ 1 −µ −✏OPT + n T · 1 1 −µ −✏· A(d, T) ✏ . Proof. This proof is a straightforward modification of the usual price of anarchy proof for smooth games. We obtain the claimed bound by writing P t E[C(st)] = P i P t E[costi(st)], using the Low Approximate Regret property with f = s⇤ i for each player i for the optimal solution s⇤, then using the smoothness property for each time t to bound P i costi(s⇤ i , st −i), and finally rearranging terms. For ✏<< (1 −µ) the approximation factor of λ/(1 −µ −✏) is very close to the price of anarchy λ/(1−µ). This shows that Low Approximate Regret learning dynamics quickly converge to outcomes with social welfare arbitrarily close to the welfare guaranteed for exact Nash equilibria by the price of anarchy. A simple corollary of this proposition is that, when players use learning algorithms that satisfy the Strong Low Approximate Regret property, the bound above can be taken to depend on OPT even though this value is unknown to the players. Whenever the Low Approximate Regret property is satisfied, a high probability version of the property with similar dependence on ✏and A(d, T) is also satisfied. This implies that in addition to quickly converging to efficient outcomes in expectation, Low Approximate Regret learners experience fast convergence with high probability. Proposition 2. In any (λ, µ)-smooth game, if all players use Low Approximate Regret algorithms satisfying Eq. (1) for parameters ✏and A(d, T), then for the action profile st drawn on round t from the players’ mixed actions and γ = 2✏/(1 + ✏), we have that 8δ > 0, with probability at least 1 −δ, 1 T X t C(st) λ 1 −µ −γ OPT + n T · 1 1 −µ −γ · 4A(d, T) γ + 12 log(n log2(T)/δ)) γ % , Examples of Simple Low Approximate Regret Algorithms Propositions 1 and 2 are informative when applied with algorithms for which A(d, T) is sufficiently small. One would hope that such algorithms are relatively simple and easy to find. We show now that the well-known Hedge algorithm as well as basic variants such as Optimistic Hedge and Hedge with online learning rate tuning satisfy the property with A(d, T) = O(log d), which will lead to fast convergence both in terms of n and T. For these algorithms and indeed all that we consider in this paper, we can achieve the Low Approximate Regret property for any fixed ✏> 0 via an appropriate parameter setting. In Appendix A.2, we provide full descriptions and proofs for these algorithms. Example 1. Hedge satisfies the Low Approximate Regret property with A(d, T) = log(d). In particular one can achieve the property for any fixed ✏> 0 by using ✏as the learning rate. Example 2. Hedge with online learning rate tuning satisfies the Strong Low Approximate Regret property with A(d, T) = O(log d). Example 3. Optimistic Hedge satisfies the Low Approximate Regret property with A(d, T) = 8 log(d). As with vanilla Hedge, we can choose the learning rate to achieve the property with any ✏. 5 Example 4. Any algorithm satisfying a “small loss” regret bound of the form p (Learner’s cost) · A or p (Cost of best action) · A satisfies Strong Low Approximate Regret via the AM-GM inequality, i.e. p (Learner’s cost) · A / inf✏>0[✏· (Learner’s cost) + A/✏]. In particular, this implies that the following algorithms have Strong Low Approximate Regret: Canonical small loss and self-confident algorithms, e.g. [11, 4, 30], Algorithm of [7], Variation MW [13], AEG-Path [26], AdaNormalHedge [18], Squint [16], and Optimistic PAC-Bayes [10]. Example 4 shows that the Strong Low Approximate Regret property in fact is ubiquitous, as it is satisfied by any algorithm that provides small loss regret bounds or one of many variants on this type of bound. Moreover, all algorithms that satisfy the Low Approximate Regret property for all fixed ✏ can be made to satisfy the strong property using the doubling trick. Main Result for Full Information Games: Theorem 3. In any (λ, µ)-smooth game, if all players use Low Approximate Regret algorithms satisfying (1) for parameter ✏2 and A(d, T) = O(log d), then 1 T X t E ⇥ C(st) ⇤ λ 1 −µ −✏OPT + n T · 1 1 −µ −✏· O(log d) ✏ , and furthermore, 8δ > 0, with probability at least 1 −δ, 1 T X t E ⇥ C(st) ⇤ λ 1 −µ −✏OPT + n T · 1 1 −µ −✏· O(log d) ✏ + O(log(n log2(T)/δ)) ✏ % . Corollary 4. If all players use Strong Low Approximate Regret algorithms then: 1. The above results hold for all ✏> 0 simultaneously. 2. Individual players have regret bounded by O(T −1/2), even in adversarial settings. 3. The players approach a coarse correlated equilibrium asymptotically. Comparison with Syrgkanis et al. [28]. By relaxing the standard λ/(1 −µ) price of anarchy bound, Theorem 3 substantially broadens the class of algorithms that experience fast convergence to include even the common Hedge algorithm. The main result of [28] shows that learning algorithms that satisfy their RVU property converge to the price of anarchy bound λ/(1 −µ) at rate n2 log d/T. They further achieve a worse approximation of λ(1 + µ)/(µ(1 −µ)) at the improved (in terms of n) rate of n log d/T. We converge to an approximation arbitrarily close to λ/(1 + µ) at a rate of n log d/T. Note that in atomic congestion games with affine congestion function µ = 1/3, so their bound of λ(1 + µ)/µ(1 −µ) loses a factor of 4 compared to the price of anarchy. Strong Low Approximate Regret algorithms such as Hedge with online learning rate tuning simultaneously experience both fast O(n/T) convergence in games and an O(1/ p T) bound on individual regret in adversarial settings. In contrast, [28] only shows O(n/ p T) individual regret and O(n3/T) convergence to price of anarchy simultaneously. Low Approximate Regret algorithms only need realized feedback, whereas [28] require expectation feedback. Having players receive expectation feedback is unrealistic in terms of both information and computation. Indeed, even if the necessary information was available, computing expectations over discrete probability distributions is not tractable unless n is taken to be constant. Our results imply that Optimistic Hedge enjoys the best of two worlds: It enjoys fast convergence to the exact λ/(1 −µ) price of anarchy using expectation feedback as well as fast convergence to the ✏-approximate price of anarchy using realized feedback. Our new analysis of Optimistic Hedge (Appendix A.2.2) sheds light on another desirable property of this algorithm: Its regret is bounded in terms of the net cost incurred by Hedge. Figure 1 summarizes the differences between our results. Feedback POA Rate Time comp. RVU property [28] Expected costs exact O(n2 log d/T) dO(n) per round LAR property (section 2) Realized costs ✏-approx O(n log d/(✏T)) O(d) per round Figure 1: Comparison of Low Approximate Regret and RVU properties. 2We can also show that the theorem holds if players satisfy the property for different values of ✏, but with a dependence on the worst case value of ✏across all players. 6 4 Bandit Feedback In many realistic scenarios, the players of a game might not even know what they would have lost or gained if they had deviated from the action they played. We model this lack of information with bandit feedback, in which each player observes a single scalar, costi(st) = hst i, ct ii, per round.3 When the game considered is smooth, one can use the Low Approximate Regret property as in the full information setting to show that players quickly converge to efficient outcomes. Our results here hold with the same generality as in the full information setting: As long as learners satisfy the Low Approximate Regret property (1), an efficiency result analogous to Proposition 1 holds. Proposition 5. Consider a (λ, µ)-smooth game. If all players use bandit learning algorithms with Low Approximate Regret A(d, T) then 1 T E "X t C(st) # λ 1 −µ −✏OPT + n T · 1 1 −µ −✏· A(d, T) ✏ . Bandit Algorithms with Low Approximate Regret The bandit Low Approximate Regret property requires that (1) holds in expectation against any sequence of adaptive and potentially adversarially chosen costs, but only for an obliviously chosen comparator f.4 This is weaker than requiring that an algorithm achieve a true expected regret bound; it is closer to pseudo-regret. The Exp3Light algorithm [27] satisfies Low Approximate Regret with A(d, T) = d2 log T. The SCRiBLe algorithm introduced in [1] (via the analysis in [21]) enjoys the Low Approximate Regret property with A(d, T) = d3 log(dT). The GREEN algorithm [2] achieves the Low Approximate Regret property with A(d, T) = d log(T), but only works with costs and not gains. This prevents it from being used in utility settings such as auctions, as in Appendix D. We present a new bandit algorithm (Algorithm 3) that achieves Low Approximate Regret with A(d, T) = d log(T/d) and thus matches the performance of GREEN, but works in both cost minimization and utility maximization settings. This method is based on Online Mirror Descent with a logarithmic barrier for the positive orthant, but differs from earlier algorithms based on the logarithmic barrier (e.g. [21]) in that it uses the classical importance-weighted estimator for costs instead of sampling based on the Dikin elipsoid. It can be implemented in ˜O(d) time per round, using line search to find γ. We provide proofs and further discussion of Algorithm 3 in Appendix B. Algorithm 3: Initialize w1 to the uniform distribution. On each round t, perform update: Algorithm 3 update: wt st−1 = wt−1 st−1 1 + ⌘ct st−1 + γwt−1 st−1 and 8j 6= st−1 wt j = wt−1 j 1 + γwt−1 j , (3) where γ 0 is chosen so that wt is a valid probability distribution. Lemma 6. Algorithm 3 with ⌘= ✏/(1+✏) has Low Approximate Regret with A(d, T) = O(d log T). Comparison to Other Algorithms In contrast to the full information setting where the most common algorithm, Hedge, achieves Low Approximate Regret with competitive parameters, the most common adversarial bandit algorithm Exp3 does not seem to satisfy Low Approximate Regret. [3] provide a small loss bound for bandits which would be sufficient for Low Approximate Regret, but their algorithm requires prior knowledge on the loss of the best action (or a bound on it), which is not appropriate in our game setting. Similarly, the small loss bound in [20] is not applicable in our setting as the work assumes an oblivious adversary and so does not apply to the games we consider. 5 Dynamic Population Games In this section we consider the dynamic population repeated game setting introduced in [19]. Detailed discussion and proofs are deferred to Appendix C. Given a game G as described in Section 2, a dynamic population game with stage game G is a repeated game where at each round t game G is played and every player i is replaced by a new player with a turnover probability p. Concretely, when a player turns over, their strategy set and cost function are changed arbitrarily subject to the rules 3With slight abuse of notation, st i denotes the identity vector associated to the strategy player i used at time t. 4This is because we only need to evaluate (1) with the game’s optimal solution s? to prove efficiency results. 7 of the game. This models a repeated game setting where players have to adapt to an adversarially changing environment. We denote the cost function of player i at round t as costt i(·). As in Section 3, we assume that the players receive full information feedback. At the end of each round they observe the entire cost vector ct i = costt i(·, st −i), but are not aware of the costs of other players in the game. Learning in Dynamic Population Games and the Price of Anarchy To guarantee small overall cost using the smoothness analysis from Section 2, players need to exhibit low regret against a shifting benchmark s⇤t i of socially optimal strategies achieving OPTt = mins⇤t P i costt i(s⇤t). Even with a small probability p of change, the sequence of optimal solutions can have too many changes to be able to achieve low regret. In spite of this apparent difficulty, [19] prove that at least a ⇢λ/(1 −µ −✏) fraction of the optimal welfare is guaranteed if 1. players are using low adaptive regret algorithms (see [14, 18]) and 2. for the underlying optimization problem there exists a relatively stable sequence of solutions which at each step approximate the optimal solution by a factor of ⇢. This holds as long as the turnover probability p is upper bounded by a function of ✏(and of certain other properties of the game, such as the stability of the close to optimal solution). We consider dynamic population games where each player uses a learning algorithm satisfying Low Approximate Regret for shifting experts (2). This shifting version of Low Approximate Regret implies a dynamic game analog of our main efficiency result, Proposition 1. Algorithms with Low Approximate Regret for Shifting Experts A simple variant of Hedge we term Noisy Hedge, which mixes the Hedge update at each round with a small amount of uniform noise, satisfies the Low Approximate Regret property for shifting experts with A(d, T) = O(log(dT)). Moreover, algorithms that satisfy a small loss version of the adaptive regret property [14] used in [19] satisfy the Strong Low Approximate Regret property. Proposition 7. Noisy Hedge with learning rate ⌘= ✏satisfies the Low Approximate Regret property for shifting experts with A(d, T) = 2 log(dT). Extending Proposition 1 to the Dynamic Population Game Setting Let s⇤1:T denote a stable sequence of near-optimal solutions s⇤t with P i costt i(s⇤t) ⇢· OPTt for all rounds t. As discussed in [19], such stable sequences can come from simple greedy algorithms (where each change in the input of one player affects the output of few other players) or via differentially private algorithms (where each change in the input of one player affects the output of all other players with small probability); in the latter case the sequence is randomized. For a deterministic sequence s⇤1:T i of player i’s actions, we let the random variable Ki denote the number of changes in the sequence. For a randomized sequence s⇤1:T i , we let Ki be the sum of total variation distances between subsequent pairs s⇤t−1 i and s⇤t i . The stability of a sequence of solutions is determined by E[P i Ki]. Proposition 8. (PoA with Dynamic Population) If all players use Low Approximate Regret algorithms satisfying (2) in a dynamic population game, where the stage game is (λ, µ)-smooth, and Ki as defined above then 1 T X t E ⇥ C(st) ⇤ 1 T λ · ⇢ 1 −µ −✏ X t E ⇥ OPTt⇤ + n + E ⇥P i Ki ⇤ T · 1 1 −µ −✏· A(d, T) ✏ . (4) Here the expectation is taken over the random turnover in the population playing the game, as well as the random choices of the players on the left hand side. To claim a price of anarchy bound, we need to ensure that the additive term in (4) is a small fraction of the optimal cost. The challenge is that high turnover probability reduces stability, increasing E[P i Ki]. By using algorithms with smaller A(d, T), we can allow for higher E[P i Ki] and hence higher turnover probability. Combining Noisy Hedge with Proposition 8 strengthens the results in [19] by both weakening the behavioral assumption on the players, allowing them to use simpler learning algorithms, and allowing a higher turnover probability. Comparison to Previous Results [19] use the more complex AdaNormalHedge algorithm of [18], which satisfies the adaptive regret property of [14], but has O(dT) space complexity. In contrast, Noisy Hedge only requires space complexity of just O(d). Moreover, a broader class of algorithms satisfy the Low Approximate Regret property which makes the efficiency guarantees more prescriptive since this property serves as a behavioral assumption. Finally, the our guarantees we provide improve on the turnover probability that can be accommodated as discussed in Appendix C.1. Acknowledgements We thank Vasilis Syrgkanis for sharing his simulation software and the NIPS reviewers for pointing out the GREEN algorithm [2]. 8 References [1] Jacob Abernethy, Elad Hazan, and Alexander Rakhlin. Competing in the dark: An efficient algorithm for bandit linear optimization. In Proc. of the 21st Annual Conference on Learning Theory (COLT), 2008. [2] Chamy Allenberg, Peter Auer, László Györfi, and György Ottucsák. Hannan Consistency in On-Line Learning in Case of Unbounded Losses Under Partial Monitoring, pages 229–243. Springer Berlin Heidelberg, Berlin, Heidelberg, 2006. [3] Jean-Yves Audibert and Sébastien Bubeck. Regret bounds and minimax policies under partial monitoring. The Journal of Machine Learning Research, 11:2785–2836, 2010. [4] Peter Auer, Nicolo Cesa-Bianchi, and Claudio Gentile. Adaptive and self-confident on-line learning algorithms. Journal of Computer and System Sciences, 64(1):48–75, 2002. [5] Peter L Bartlett, Varsha Dani, Thomas Hayes, Sham Kakade, Alexander Rakhlin, and Ambuj Tewari. High-probability regret bounds for bandit online linear optimization. In Proceedings of 21st Annual Conference on Learning Theory (COLT), pages 335–342, 2008. [6] Nicolo Cesa-Bianchi and Gabor Lugosi. Prediction, Learning, and Games. Cambridge University Press, New York, NY, USA, 2006. [7] Nicolo Cesa-Bianchi, Yishay Mansour, and Gilles Stoltz. Improved second-order bounds for prediction with expert advice. Machine Learning, 66(2-3):321–352, 2007. [8] Giorgos Christodoulou and Elias Koutsoupias. The price of anarchy of finite congestion games. In Proceedings of the 37th Annual ACM Symposium on Theory of Computing (STOC), pages 67 – 73, 2005. [9] Constantinos Daskalakis, Alan Deckelbaum, and Anthony Kim. Near-optimal no-regret algorithms for zero-sum games. Games and Economic Behavior, 92:327–348, 2015. [10] Dylan J Foster, Alexander Rakhlin, and Karthik Sridharan. Adaptive online learning. In Advances in Neural Information Processing Systems, pages 3357–3365, 2015. [11] 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, August 1997. [12] Elad Hazan. Introduction to Online Convex Optimization. Foundations and Trends in Optimization, 2016. [13] Elad Hazan and Satyen Kale. Extracting certainty from uncertainty: Regret bounded by variation in costs. Machine learning, 80(2-3):165–188, 2010. [14] Elad Hazan and C. Seshadhri. Efficient learning algorithms for changing environments. In Proceedings of the 26th Annual International Conference on Machine Learning (ICML), pages 393–400, 2009. [15] Sham M. Kakade, Adam Tauman Kalai, and Katrina Ligett. Playing games with approximation algorithms. SIAM J. Comput., 39:1088 – 1106, 2009. [16] Wouter M Koolen and Tim Van Erven. Second-order quantile methods for experts and combinatorial games. In Proceedings of The 28th Conference on Learning Theory (COLT), pages 1155–1175, 2015. [17] Elias Koutsoupias and Christos Papadimitriou. Worst-case equilibria. Comp. sci. review, 3(2):65–69, 2009. [18] Haipeng Luo and Robert E Schapire. Achieving all with no parameters: Adanormalhedge. In Proceedings of The 28th Conference on Learning Theory (COLT), pages 1286–1304, 2015. [19] Thodoris Lykouris, Vasilis Syrgkanis, and Éva Tardos. Learning and efficiency in games with dynamic population. In Proceedings of the Twenty-Seventh Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 120–129. SIAM, 2016. [20] Gergely Neu. First-order regret bounds for combinatorial semi-bandits. In Proceedings of the 27th Annual Conference on Learning Theory (COLT), pages 1360–1375, 2015. [21] Alexander Rakhlin and Karthik Sridharan. Online learning with predictable sequences. In Conference on Learning Theory (COLT), pages 993–1019, 2013. [22] Alexander Rakhlin and Karthik Sridharan. Optimization, learning, and games with predictable sequences. In Advances in Neural Information Processing Systems (NIPS), pages 3066–3074, 2013. [23] Tim Roughgarden. Intrinsic robustness of the price of anarchy. Journal of the ACM, 2015. [24] Tim Roughgarden, Vasilis Syrgkanis, and Eva Tardos. The price of anarchy in auctions. Available at https://arxiv.org/abs/1607.07684, 2016. [25] Tim Roughgarden and Eva Tardos. How bad is selfish routing? Journal of the ACM, 49:236 – 259, 2002. [26] Jacob Steinhardt and Percy Liang. Adaptivity and optimism: An improved exponentiated gradient algorithm. In Proceedings of the 31st International Conference on Machine Learning (ICML), pages 1593–1601, 2014. [27] Gilles Stoltz. Incomplete information and internal regret in prediction of individual sequences. PhD thesis, Universite Paris-Sud, 2005. [28] Vasilis Syrgkanis, Alekh Agarwal, Haipeng Luo, and Robert E Schapire. Fast convergence of regularized learning in games. In Advances in Neural Information Processing Systems (NIPS), pages 2989–2997, 2015. [29] Vasilis Syrgkanis and Éva Tardos. Composable and efficient mechanisms. In ACM Symposium on Theory of Computing (STOC), pages 211–220, 2013. [30] Rani Yaroshinsky, Ran El-Yaniv, and Steven S. Seiden. How to better use expert advice. Machine Learning, 55(3):271–309, 2004. 9 | 2016 | 416 |
6,346 | Causal Bandits: Learning Good Interventions via Causal Inference Finnian Lattimore Australian National University and Data61/NICTA finn.lattimore@gmail.com Tor Lattimore Indiana University, Bloomington tor.lattimore@gmail.com Mark D. Reid Australian National University and Data61/NICTA mark.reid@anu.edu.au Abstract We study the problem of using causal models to improve the rate at which good interventions can be learned online in a stochastic environment. Our formalism combines multi-arm bandits and causal inference to model a novel type of bandit feedback that is not exploited by existing approaches. We propose a new algorithm that exploits the causal feedback and prove a bound on its simple regret that is strictly better (in all quantities) than algorithms that do not use the additional causal information. 1 Introduction Medical drug testing, policy setting, and other scientific processes are commonly framed and analysed in the language of sequential experimental design and, in special cases, as bandit problems (Robbins, 1952; Chernoff, 1959). In this framework, single actions (also referred to as interventions) from a pre-determined set are repeatedly performed in order to evaluate their effectiveness via feedback from a single, real-valued reward signal. We propose a generalisation of the standard model by assuming that, in addition to the reward signal, the learner observes the values of a number of covariates drawn from a probabilistic causal model (Pearl, 2000). Causal models are commonly used in disciplines where explicit experimentation may be difficult such as social science, demography and economics. For example, when predicting the effect of changes to childcare subsidies on workforce participation, or school choice on grades. Results from causal inference relate observational distributions to interventional ones, allowing the outcome of an intervention to be predicted without explicitly performing it. By exploiting the causal information we show, theoretically and empirically, how non-interventional observations can be used to improve the rate at which high-reward actions can be identified. The type of problem we are concerned with is best illustrated with an example. Consider a farmer wishing to optimise the yield of her crop. She knows that crop yield is only affected by temperature, a particular soil nutrient, and moisture level but the precise effect of their combination is unknown. In each season the farmer has enough time and money to intervene and control at most one of these variables: deploying shade or heat lamps will set the temperature to be low or high; the nutrient can be added or removed through a choice of fertilizer; and irrigation or rain-proof covers will keep the soil wet or dry. When not intervened upon, the temperature, soil, and moisture vary naturally from season to season due to weather conditions and these are all observed along with the final crop yield at the end of each season. How might the farmer best experiment to identify the single, highest yielding intervention in a limited number of seasons? 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Contributions We take the first step towards formalising and solving problems such as the one above. In §2 we formally introduce causal bandit problems in which interventions are treated as arms in a bandit problem but their influence on the reward — along with any other observations — is assumed to conform to a known causal graph. We show that our causal bandit framework subsumes the classical bandits (no additional observations) and contextual stochastic bandit problems (observations are revealed before an intervention is chosen) before focusing on the case where, like the above example, observations occur after each intervention is made. Our focus is on the simple regret, which measures the difference between the return of the optimal action and that of the action chosen by the algorithm after T rounds. In §3 we analyse a specific family of causal bandit problems that we call parallel bandit problems in which N factors affect the reward independently and there are 2N possible interventions. We propose a simple causal best arm identification algorithm for this problem and show that up to logarithmic factors it enjoys minimax optimal simple regret guarantees of ˜Θ( p m/T) where m depends on the causal model and may be much smaller than N. In contrast, existing best arm identification algorithms suffer Ω( p N/T) simple regret (Thm. 4 by Audibert and Bubeck (2010)). This shows theoretically the value of our framework over the traditional bandit problem. Experiments in §5 further demonstrate the value of causal models in this framework. In the general casual bandit problem interventions and observations may have a complex relationship. In §4 we propose a new algorithm inspired by importance-sampling that a) enjoys sub-linear regret equivalent to the optimal rate in the parallel bandit setting and b) captures many of the intricacies of sharing information in a causal graph in the general case. As in the parallel bandit case, the regret guarantee scales like O( p m/T) where m depends on the underlying causal structure, with smaller values corresponding to structures that are easier to learn. The value of m is always less than the number of interventions N and in the special case of the parallel bandit (where we have lower bounds) the notions are equivalent. Related Work As alluded to above, causal bandit problems can be treated as classical multi-armed bandit problems by simply ignoring the causal model and extra observations and applying an existing best-arm identification algorithm with well understood simple regret guarantees (Jamieson et al., 2014). However, as we show in §3, ignoring the extra information available in the non-intervened variables yields sub-optimal performance. A well-studied class of bandit problems with side information are “contextual bandits” Langford and Zhang (2008); Agarwal et al. (2014). Our framework bears a superficial similarity to contextual bandit problems since the extra observations on non-intervened variables might be viewed as context for selecting an intervention. However, a crucial difference is that in our model the extra observations are only revealed after selecting an intervention and hence cannot be used as context. There have been several proposals for bandit problems where extra feedback is received after an action is taken. Most recently, Alon et al. (2015), Kocák et al. (2014) have considered very general models related to partial monitoring games (Bartók et al., 2014) where rewards on unplayed actions are revealed according to a feedback graph. As we discuss in §6, the parallel bandit problem can be captured in this framework, however the regret bounds are not optimal in our setting. They also focus on cumulative regret, which cannot be used to guarantee low simple regret (Bubeck et al., 2009). The partial monitoring approach taken by Wu et al. (2015) could be applied (up to modifications for the simple regret) to the parallel bandit, but the resulting strategy would need to know the likelihood of each factor in advance, while our strategy learns this online. Yu and Mannor (2009) utilize extra observations to detect changes in the reward distribution, whereas we assume fixed reward distributions and use extra observations to improve arm selection. Avner et al. (2012) analyse bandit problems where the choice of arm to pull and arm to receive feedback on are decoupled. The main difference from our present work is our focus on simple regret and the more complex information linking rewards for different arms via causal graphs. To the best of our knowledge, our paper is the first to analyse simple regret in bandit problems with extra post-action feedback. Two pieces of recent work also consider applying ideas from causal inference to bandit problems. Bareinboim et al. (2015) demonstrate that in the presence of confounding variables the value that a variable would have taken had it not been intervened on can provide important contextual information. Their work differs in many ways. For example, the focus is on the cumulative regret and the context is observed before the action is taken and cannot be controlled by the learning agent. 2 Ortega and Braun (2014) present an analysis and extension of Thompson sampling assuming actions are causal interventions. Their focus is on causal induction (i.e., learning an unknown causal model) instead of exploiting a known causal model. Combining their handling of causal induction with our analysis is left as future work. The truncated importance weighted estimators used in §4 have been studied before in a causal framework by Bottou et al. (2013), where the focus is on learning from observational data, but not controlling the sampling process. They also briefly discuss some of the issues encountered in sequential design, but do not give an algorithm or theoretical results for this case. 2 Problem Setup We now introduce a novel class of stochastic sequential decision problems which we call causal bandit problems. In these problems, rewards are given for repeated interventions on a fixed causal model Pearl (2000). Following the terminology and notation in Koller and Friedman (2009), a causal model is given by a directed acyclic graph G over a set of random variables X = {X1, . . . , XN} and a joint distribution P over X that factorises over G. We will assume each variable only takes on a finite number of distinct values. An edge from variable Xi to Xj is interpreted to mean that a change in the value of Xi may directly cause a change to the value of Xj. The parents of a variable Xi, denoted PaXi, is the set of all variables Xj such that there is an edge from Xj to Xi in G. An intervention or action (of size n), denoted do(X = x), assigns the values x = {x1, . . . , xn} to the corresponding variables X = {X1, . . . , Xn} ⊂X with the empty intervention (where no variable is set) denoted do(). The intervention also “mutilates” the graph G by removing all edges from Pai to Xi for each Xi ∈X. The resulting graph defines a probability distribution P {Xc|do(X = x)} over Xc := X −X. Details can be found in Chapter 21 of Koller and Friedman (2009). A learner for a casual bandit problem is given the casual model’s graph G and a set of allowed actions A. One variable Y ∈X is designated as the reward variable and takes on values in {0, 1}. We denote the expected reward for the action a = do(X = x) by µa := E [Y |do(X = x)] and the optimal expected reward by µ∗:= maxa∈A µa. The causal bandit game proceeds over T rounds. In round t, the learner intervenes by choosing at = do(Xt = xt) ∈A based on previous observations. It then observes sampled values for all non-intervened variables Xc t drawn from P {Xc t|do(Xt = xt)}, including the reward Yt ∈{0, 1}. After T observations the learner outputs an estimate of the optimal action ˆa∗ T ∈A based on its prior observations. The objective of the learner is to minimise the simple regret RT = µ∗−E µˆa∗ T . This is sometimes refered to as a “pure exploration” (Bubeck et al., 2009) or “best-arm identification” problem (Gabillon et al., 2012) and is most appropriate when, as in drug and policy testing, the learner has a fixed experimental budget after which its policy will be fixed indefinitely. Although we will focus on the intervene-then-observe ordering of events within each round, other scenarios are possible. If the non-intervened variables are observed before an intervention is selected our framework reduces to stochastic contextual bandits, which are already reasonably well understood (Agarwal et al., 2014). Even if no observations are made during the rounds, the causal model may still allow offline pruning of the set of allowable interventions thereby reducing the complexity. We note that classical K-armed stochastic bandit problem can be recovered in our framework by considering a simple causal model with one edge connecting a single variable X that can take on K values to a reward variable Y ∈{0, 1} where P {Y = 1|X} = r(X) for some arbitrary but unknown, real-valued function r. The set of allowed actions in this case is A = {do(X = k): k ∈{1, . . . , K}}. Conversely, any causal bandit problem can be reduced to a classical stochastic |A|-armed bandit problem by treating each possible intervention as an independent arm and ignoring all sampled values for the observed variables except for the reward. Intuitively though, one would expect to perform better by making use of the extra structure and observations. 3 Regret Bounds for Parallel Bandit In this section we propose and analyse an algorithm for achieving the optimal regret in a natural special case of the causal bandit problem which we call the parallel bandit. It is simple enough to admit a thorough analysis but rich enough to model the type of problem discussed in §1, including 3 X1 X2 ... XN Y (a) Parallel graph X1 X2 Y (b) Confounded graph X1 X2 ... XN Y (c) Chain graph Figure 1: Causal Models the farming example. It also suffices to witness the regret gap between algorithms that make use of causal models and those which do not. The causal model for this class of problems has N binary variables {X1, . . . , XN} where each Xi ∈{0, 1} are independent causes of a reward variable Y ∈{0, 1}, as shown in Figure 1a. All variables are observable and the set of allowable actions are all size 0 and size 1 interventions: A = {do()} ∪{do(Xi = j): 1 ≤i ≤N and j ∈{0, 1}} In the farming example from the introduction, X1 might represent temperature (e.g., X1 = 0 for low and X1 = 1 for high). The interventions do(X1 = 0) and do(X1 = 1) indicate the use of shades or heat lamps to keep the temperature low or high, respectively. In each round the learner either purely observes by selecting do() or sets the value of a single variable. The remaining variables are simultaneously set by independently biased coin flips. The value of all variables are then used to determine the distribution of rewards for that round. Formally, when not intervened upon we assume that each Xi ∼Bernoulli(qi) where q = (q1, . . . , qN) ∈[0, 1]N so that qi = P {Xi = 1}. The value of the reward variable is distributed as P {Y = 1|X} = r(X) where r : {0, 1}N →[0, 1] is an arbitrary, fixed, and unknown function. In the farming example, this choice of Y models the success or failure of a seasons crop, which depends stochastically on the various environment variables. The Parallel Bandit Algorithm The algorithm operates as follows. For the first T/2 rounds it chooses do() to collect observational data. As the only link from each X1, . . . , XN to Y is a direct, causal one, P {Y |do(Xi = j)} = P {Y |Xi = j}. Thus we can create good estimators for the returns of the actions do(Xi = j) for which P {Xi = j} is large. The actions for which P {Xi = j} is small may not be observed (often) so estimates of their returns could be poor. To address this, the remaining T/2 rounds are evenly split to estimate the rewards for these infrequently observed actions. The difficulty of the problem depends on q and, in particular, how many of the variables are unbalanced (i.e., small qi or (1 −qi)). For τ ∈[2...N] let Iτ = i : min {qi, 1 −qi} < 1 τ . Define m(q) = min {τ : |Iτ| ≤τ} . Algorithm 1 Parallel Bandit Algorithm 1: Input: Total rounds T and N. 2: for t ∈1, . . . , T/2 do 3: Perform empty intervention do() 4: Observe Xt and Yt 5: for a = do(Xi = x) ∈A do 6: Count times Xi = x seen: Ta = PT/2 t=1 1{Xt,i = x} 7: Estimate reward: ˆµa = 1 Ta PT/2 t=1 1{Xt,i = x} Yt 8: Estimate probabilities: ˆpa = 2Ta T , ˆqi = ˆpdo(Xi=1) 9: Compute ˆm = m(ˆq) and A = a ∈A: ˆpa ≤1 ˆm . 10: Let TA := T 2|A| be times to sample each a ∈A. 11: for a = do(Xi = x) ∈A do 12: for t ∈1, . . . , TA do 13: Intervene with a and observe Yt 14: Re-estimate ˆµa = 1 TA PTA t=1 Yt 15: return estimated optimal ˆa∗ T ∈arg maxa∈A ˆµa Iτ is the set of variables considered unbalanced and we tune τ to trade off identifying the low probability actions against not having too many of them, so as to minimize the worst-case simple regret. When q = ( 1 2, . . . , 1 2) we have m(q) = 2 and when q = (0, . . . , 0) we have m(q) = N. We do not assume that q is known, thus Algorithm 1 also utilizes the samples captured during the observational phase to estimate m(q). Although very simple, the following two theorems show that this algorithm is effectively optimal. Theorem 1. Algorithm 1 satisfies RT ∈O s m(q) T log NT m(q) ! . Theorem 2. For all strategies and T, q, there exist rewards such that RT ∈Ω r m(q) T ! . 4 The proofs of Theorems 1 and 2 follow by carefully analysing the concentration of ˆpa and ˆm about their true values and may be found in the supplementary material. By utilizing knowledge of the causal structure, Algorithm 1 effectively only has to explore the m(q) ’difficult’ actions. Standard multi-armed bandit algorithms must explore all 2N actions and thus achieve regret Ω( p N/T). Since m is typically much smaller than N, the new algorithm can significantly outperform classical bandit algorithms in this setting. In practice, you would combine the data from both phases to estimate rewards for the low probability actions. We do not do so here as it slightly complicates the proofs and does not improve the worst case regret. 4 Regret Bounds for General Graphs We now consider the more general problem where the graph structure is known, but arbitrary. For general graphs, P {Y |Xi = j} ̸= P {Y |do(Xi = j)} (correlation is not causation). However, if all the variables are observable, any causal distribution P {X1...XN|do(Xi = j)} can be expressed in terms of observational distributions via the truncated factorization formula (Pearl, 2000). P {X1...XN|do(Xi = j)} = Y k̸=i P {Xk| PaXk} δ(Xi −j) , where PaXk denotes the parents of Xk and δ is the dirac delta function. We could naively generalize our approach for parallel bandits by observing for T/2 rounds, applying the truncated product factorization to write an expression for each P {Y |a} in terms of observational quantities and explicitly playing the actions for which the observational estimates were poor. However, it is no longer optimal to ignore the information we can learn about the reward for intervening on one variable from rounds in which we act on a different variable. Consider the graph in Figure 1c and suppose each variable deterministically takes the value of its parent, Xk = Xk−1 for k ∈2, . . . , N and P {X1} = 0. We can learn the reward for all the interventions do(Xi = 1) simultaneously by selecting do(X1 = 1), but not from do(). In addition, variance of the observational estimator for a = do(Xi = j) can be high even if P {Xi = j} is large. Given the causal graph in Figure 1b, P {Y |do(X2 = j)} = P X1 P {X1} P {Y |X1, X2 = j}. Suppose X2 = X1 deterministically, no matter how large P {X2 = 1} is we will never observe (X2 = 1, X1 = 0) and so cannot get a good estimate for P {Y |do(X2 = 1)}. To solve the general problem we need an estimator for each action that incorporates information obtained from every other action and a way to optimally allocate samples to actions. To address this difficult problem, we assume the conditional interventional distributions P {PaY |a} (but not P {Y |a}) are known. These could be estimated from experimental data on the same covariates but where the outcome of interest differed, such that Y was not included, or similarly from observational data subject to identifiability constraints. Of course this is a somewhat limiting assumption, but seems like a natural place to start. The challenge of estimating the conditional distributions for all variables in an optimal way is left as an interesting future direction. Let η be a distribution on available interventions a ∈A so ηa ≥0 and P a∈A ηa = 1. Define Q = P a∈A ηa P {PaY |a} to be the mixture distribution over the interventions with respect to η. Algorithm 2 General Algorithm Input: T, η ∈[0, 1]A, B ∈[0, ∞)A for t ∈{1, . . . , T} do Sample action at from η Do action at and observe Xt and Yt for a ∈A do ˆµa = 1 T T X t=1 YtRa(Xt)1{Ra(Xt) ≤Ba} return ˆa∗ T = arg maxa ˆµa Our algorithm samples T actions from η and uses them to estimate the returns µa for all a ∈ A simultaneously via a truncated importance weighted estimator. Let PaY (X) denote the realization of the variables in X that are parents of Y and define Ra(X) = P{PaY (X)|a} Q{PaY (X)} ˆµa = 1 T T X t=1 YtRa(Xt)1{Ra(Xt) ≤Ba} , where Ba ≥0 is a constant that tunes the level of truncation to be chosen subsequently. The truncation introduces a bias in the estimator, but simultaneously chops the potentially heavy tail that is so detrimental to its concentration guarantees. 5 The distribution over actions, η plays the role of allocating samples to actions and is optimized to minimize the worst-case simple regret. Abusing notation we define m(η) by m(η) = max a∈A Ea P {PaY (X)|a} Q {PaY (X)} , where Ea is the expectation with respect to P {.|a} We will show shortly that m(η) is a measure of the difficulty of the problem that approximately coincides with the version for parallel bandits, justifying the name overloading. Theorem 3. If Algorithm 2 is run with B ∈RA given by Ba = q m(η)T log(2T |A|) . RT ∈O r m(η) T log (2T|A|) ! . The proof is in the supplementary materials. Note the regret has the same form as that obtained for Algorithm 1, with m(η) replacing m(q). Algorithm 1 assumes only the graph structure and not knowledge of the conditional distributions on X. Thus it has broader applicability to the parallel graph than the generic algorithm given here. We believe that Algorithm 2 with the optimal choice of η is close to minimax optimal, but leave lower bounds for future work. Choosing the Sampling Distribution Algorithm 2 depends on a choice of sampling distribution Q that is determined by η. In light of Theorem 3 a natural choice of η is the minimiser of m(η). η∗= arg min η m(η) = arg min η max a∈A Ea P {PaY (X)|a} P b∈A ηb P {PaY (X)|b} | {z } m(η) . Since the mixture of convex functions is convex and the maximum of a set of convex functions is convex, we see that m(η) is convex (in η). Therefore the minimisation problem may be tackled using standard techniques from convex optimisation. The quantity m(η∗) may be interpreted as the minimum achievable worst-case variance of the importance weighted estimator. In the experimental section we present some special cases, but for now we give two simple results. The first shows that |A| serves as an upper bound on m(η∗). Proposition 4. m(η∗) ≤|A|. Proof. By definition, m(η∗) ≤m(η) for all η. Let ηa = 1/|A| ∀a. m(η) = max a Ea P {PaY (X)|a} Q {PaY (X)} ≤max a Ea P {PaY (X)|a} ηa P {PaY (X)|a} = max a Ea 1 ηa = |A| The second observation is that, in the parallel bandit setting, m(η∗) ≤2m(q). This is easy to see by letting ηa = 1/2 for a = do() and ηa = 1{P {Xi = j} ≤1/m(q)} /2m(q) for the actions corresponding to do(Xi = j), and applying an argument like that for Proposition 4. The proof is in the supplementary materials. Remark 5. The choice of Ba given in Theorem 3 is not the only possibility. As we shall see in the experiments, it is often possible to choose Ba significantly larger when there is no heavy tail and this can drastically improve performance by eliminating the bias. This is especially true when the ratio Ra is never too large and Bernstein’s inequality could be used directly without the truncation. For another discussion see the article by Bottou et al. (2013) who also use importance weighted estimators to learn from observational data. 5 Experiments We compare Algorithms 1 and 2 with the Successive Reject algorithm of Audibert and Bubeck (2010), Thompson Sampling and UCB under a variety of conditions. Thomson sampling and UCB are optimized to minimize cumulative regret. We apply them in the fixed horizon, best arm identification setting by running them upto horizon T and then selecting the arm with the highest empirical mean. The importance weighted estimator used by Algorithm 2 is not truncated, which is justified in this setting by Remark 5. 6 0 10 20 30 40 m 0.00 0.05 0.10 0.15 0.20 0.25 0.30 Regret Algorithm 2 Algorithm 1 Successive Reject UCB Thompson Sampling (a) Simple regret vs m(q) for fixed horizon T = 400 and number of variables N = 50 0 200 400 600 800 T 0.0 0.1 0.2 0.3 0.4 0.5 Regret (b) Simple regret vs horizon, T, with N = 50, m = 2 and ε = q N 8T 0 100 200 300 400 500 T 0.00 0.05 0.10 0.15 0.20 0.25 0.30 Regret (c) Simple regret vs horizon, T, with N = 50, m = 2 and fixed ε = .3 Figure 2: Experimental results Throughout we use a model in which Y depends only on a single variable X1 (this is unknown to the algorithms). Yt ∼Bernoulli( 1 2 + ε) if X1 = 1 and Yt ∼Bernoulli( 1 2 −ε′) otherwise, where ε′ = q1ε/(1−q1). This leads to an expected reward of 1 2 +ε for do(X1 = 1), 1 2 −ε′ for do(X1 = 0) and 1 2 for all other actions. We set qi = 0 for i ≤m and 1 2 otherwise. Note that changing m and thus q has no effect on the reward distribution. For each experiment, we show the average regret over 10,000 simulations with error bars displaying three standard errors. The code is available from <https://github.com/finnhacks42/causal_bandits> In Figure 2a we fix the number of variables N and the horizon T and compare the performance of the algorithms as m increases. The regret for the Successive Reject algorithm is constant as it depends only on the reward distribution and has no knowledge of the causal structure. For the causal algorithms it increases approximately with √m. As m approaches N, the gain the causal algorithms obtain from knowledge of the structure is outweighed by fact they do not leverage the observed rewards to focus sampling effort on actions with high pay-offs. Figure 2b demonstrates the performance of the algorithms in the worst case environment for standard bandits, where the gap between the optimal and sub-optimal arms, ε = p N/(8T) , is just too small to be learned. This gap is learnable by the causal algorithms, for which the worst case ε depends on m ≪N. In Figure 2c we fix N and ε and observe that, for sufficiently large T, the regret decays exponentially. The decay constant is larger for the causal algorithms as they have observed a greater effective number of samples for a given T. For the parallel bandit problem, the regression estimator used in the specific algorithm outperforms the truncated importance weighted estimator in the more general algorithm, despite the fact the specific algorithm must estimate q from the data. This is an interesting phenomenon that has been noted before in off-policy evaluation where the regression (and not the importance weighted) estimator is known to be minimax optimal asymptotically (Li et al., 2014). 6 Discussion & Future Work Algorithm 2 for general causal bandit problems estimates the reward for all allowable interventions a ∈A over T rounds by sampling and applying interventions from a distribution η. Theorem 3 shows that this algorithm has (up to log factors) simple regret that is O( p m(η)/T) where the parameter m(η) measures the difficulty of learning the causal model and is always less than N. The value of m(η) is a uniform bound on the variance of the reward estimators ˆµa and, intuitively, problems where all variables’ values in the causal model “occur naturally” when interventions are sampled from η will have low values of m(η). The main practical drawback of Algorithm 2 is that both the estimator ˆµa and the optimal sampling distribution η∗(i.e., the one that minimises m(η)) require knowledge of the conditional distributions P {PaY |a} for all a ∈A. In contrast, in the special case of parallel bandits, Algorithm 1 uses the do() action to effectively estimate m(η) and the rewards then re-samples the interventions with variances that are not bound by ˆm(η). Despite these extra estimates, Theorem 2 shows that this 7 approach is optimal (up to log factors). Finding an algorithm that only requires the causal graph and lower bounds for its simple regret in the general case is left as future work. Making Better Use of the Reward Signal Existing algorithms for best arm identification are based on “successive rejection” (SR) of arms based on UCB-like bounds on their rewards (Even-Dar et al., 2002). In contrast, our algorithms completely ignore the reward signal when developing their arm sampling policies and only use the rewards when estimating ˆµa. Incorporating the reward signal into our sampling techniques or designing more adaptive reward estimators that focus on high reward interventions is an obvious next step. This would likely improve the poor performance of our causal algorithm relative to the sucessive rejects algorithm for large m, as seen in Figure 2a. For the parallel bandit the required modifications should be quite straightforward. The idea would be to adapt the algorithm to essentially use successive elimination in the second phase so arms are eliminated as soon as they are provably no longer optimal with high probability. In the general case a similar modification is also possible by dividing the budget T into phases and optimising the sampling distribution η, eliminating arms when their confidence intervals are no longer overlapping. Note that these modifications will not improve the minimax regret, which at least for the parallel bandit is already optimal. For this reason we prefer to emphasize the main point that causal structure should be exploited when available. Another observation is that Algorithm 2 is actually using a fixed design, which in some cases may be preferred to a sequential design for logistical reasons. This is not possible for Algorithm 1, since the q vector is unknown. Cumulative Regret Although we have focused on simple regret in our analysis, it would also be natural to consider the cumulative regret. In the case of the parallel bandit problem we can slightly modify the analysis from (Wu et al., 2015) on bandits with side information to get near-optimal cumulative regret guarantees. They consider a finite-armed bandit model with side information where in reach round the learner chooses an action and receives a Gaussian reward signal for all actions, but with a known variance that depends on the chosen action. In this way the learner can gain information about actions it does not take with varying levels of accuracy. The reduction follows by substituting the importance weighted estimators in place of the Gaussian reward. In the case that q is known this would lead to a known variance and the only (insignificant) difference is the Bernoulli noise model. In the parallel bandit case we believe this would lead to near-optimal cumulative regret, at least asymptotically. The parallel bandit problem can also be viewed as an instance of a time varying graph feedback problem (Alon et al., 2015; Kocák et al., 2014), where at each timestep the feedback graph Gt is selected stochastically, dependent on q, and revealed after an action has been chosen. The feedback graph is distinct from the causal graph. A link A →B in Gt indicates that selecting the action A reveals the reward for action B. For this parallel bandit problem, Gt will always be a star graph with the action do() connected to half the remaining actions. However, Alon et al. (2015); Kocák et al. (2014) give adversarial algorithms, which when applied to the parallel bandit problem obtain the standard bandit regret. A malicious adversary can select the same graph each time, such that the rewards for half the arms are never revealed by the informative action. This is equivalent to a nominally stochastic selection of feedback graph where q = 0. Causal Models with Non-Observable Variables If we assume knowledge of the conditional interventional distributions P {PaY |a} our analysis applies unchanged to the case of causal models with non-observable variables. Some of the interventional distributions may be non-identifiable meaning we can not obtain prior estimates for P {PaY |a} from even an infinite amount of observational data. Even if all variables are observable and the graph is known, if the conditional distributions are unknown, then Algorithm 2 cannot be used. Estimating these quantities while simultaneously minimising the simple regret is an interesting and challenging open problem. Partially or Completely Unknown Causal Graph A much more difficult generalisation would be to consider causal bandit problems where the causal graph is completely unknown or known to be a member of class of models. The latter case arises naturally if we assume free access to a large observational dataset, from which the Markov equivalence class can be found via causal discovery techniques. Work on the problem of selecting experiments to discover the correct causal graph from within a Markov equivalence class Eberhardt et al. (2005); Eberhardt (2010); Hauser and Bühlmann (2014); Hu et al. (2014) could potentially be incorporated into a causal bandit algorithm. In particular, Hu et al. (2014) show that only O (log log n) multi-variable interventions are required on average to recover a causal graph over n variables once purely observational data is used to recover the “essential graph”. Simultaneously learning a completely unknown causal model while estimating the rewards of interventions without a large observational dataset would be much more challenging. 8 References Agarwal, A., Hsu, D., Kale, S., Langford, J., Li, L., and Schapire, R. E. (2014). Taming the monster: A fast and simple algorithm for contextual bandits. In ICML, pages 1638–1646. Alon, N., Cesa-Bianchi, N., Dekel, O., and Koren, T. (2015). Online learning with feedback graphs: Beyond bandits. In COLT, pages 23–35. Audibert, J.-Y. and Bubeck, S. (2010). Best arm identification in multi-armed bandits. In COLT, pages 13–p. Avner, O., Mannor, S., and Shamir, O. (2012). Decoupling exploration and exploitation in multi-armed bandits. In ICML, pages 409–416. Bareinboim, E., Forney, A., and Pearl, J. (2015). Bandits with unobserved confounders: A causal approach. In NIPS, pages 1342–1350. Bartók, G., Foster, D. P., Pál, D., Rakhlin, A., and Szepesvári, C. (2014). Partial monitoring-classification, regret bounds, and algorithms. Mathematics of Operations Research, 39(4):967–997. Bottou, L., Peters, J., Quinonero-Candela, J., Charles, D. X., Chickering, D. M., Portugaly, E., Ray, D., Simard, P., and Snelson, E. (2013). Counterfactual reasoning and learning systems: The example of computational advertising. JMLR, 14(1):3207–3260. Bubeck, S., Munos, R., and Stoltz, G. (2009). Pure exploration in multi-armed bandits problems. In ALT, pages 23–37. Chernoff, H. (1959). Sequential design of experiments. The Annals of Mathematical Statistics, pages 755–770. Eberhardt, F. (2010). Causal Discovery as a Game. In NIPS Causality: Objectives and Assessment, pages 87–96. Eberhardt, F., Glymour, C., and Scheines, R. (2005). On the number of experiments sufficient and in the worst case necessary to identify all causal relations among n variables. In UAI. Even-Dar, E., Mannor, S., and Mansour, Y. (2002). Pac bounds for multi-armed bandit and markov decision processes. In Computational Learning Theory, pages 255–270. Gabillon, V., Ghavamzadeh, M., and Lazaric, A. (2012). Best arm identification: A unified approach to fixed budget and fixed confidence. In NIPS, pages 3212–3220. Hauser, A. and Bühlmann, P. (2014). Two optimal strategies for active learning of causal models from interventional data. International Journal of Approximate Reasoning, 55(4):926–939. Hu, H., Li, Z., and Vetta, A. R. (2014). Randomized experimental design for causal graph discovery. In NIPS, pages 2339–2347. Jamieson, K., Malloy, M., Nowak, R., and Bubeck, S. (2014). lil’UCB: An optimal exploration algorithm for multi-armed bandits. In COLT, pages 423–439. Kocák, T., Neu, G., Valko, M., and Munos, R. (2014). Efficient learning by implicit exploration in bandit problems with side observations. In NIPS, pages 613–621. Koller, D. and Friedman, N. (2009). Probabilistic graphical models: principles and techniques. MIT Press. Langford, J. and Zhang, T. (2008). The epoch-greedy algorithm for multi-armed bandits with side information. In NIPS, pages 817–824. Li, L., Munos, R., and Szepesvari, C. (2014). On minimax optimal offline policy evaluation. arXiv preprint arXiv:1409.3653. Ortega, P. A. and Braun, D. A. (2014). Generalized thompson sampling for sequential decision-making and causal inference. Complex Adaptive Systems Modeling, 2(1):2. Pearl, J. (2000). Causality: models, reasoning and inference. MIT Press, Cambridge. Robbins, H. (1952). Some aspects of the sequential design of experiments. Bulletin of the American Mathematical Society, 58(5):527–536. Wu, Y., György, A., and Szepesvári, C. (2015). Online Learning with Gaussian Payoffs and Side Observations. In NIPS, pages 1360–1368. Yu, J. Y. and Mannor, S. (2009). Piecewise-stationary bandit problems with side observations. In ICML, pages 1177–1184. 9 | 2016 | 417 |
6,347 | Minimax Optimal Alternating Minimization for Kernel Nonparametric Tensor Learning Taiji Suzuki∗, Heishiro Kanagawa† ∗,†Department of Mathematical and Computing Science, Tokyo Institute of Technology ∗PRESTO, Japan Science and Technology Agency ∗Center for Advanced Integrated Intelligence Research, RIKEN s-taiji@is.titech.ac.jp, kanagawa.h.ab@m.titech.ac.jp Hayato Kobayash, Nobuyuki Shimizu, Yukihiro Tagami Yahoo Japan Corporation { hakobaya, nobushim, yutagami } @yahoo-corp.jp Abstract We investigate the statistical performance and computational efficiency of the alternating minimization procedure for nonparametric tensor learning. Tensor modeling has been widely used for capturing the higher order relations between multimodal data sources. In addition to a linear model, a nonlinear tensor model has been received much attention recently because of its high flexibility. We consider an alternating minimization procedure for a general nonlinear model where the true function consists of components in a reproducing kernel Hilbert space (RKHS). In this paper, we show that the alternating minimization method achieves linear convergence as an optimization algorithm and that the generalization error of the resultant estimator yields the minimax optimality. We apply our algorithm to some multitask learning problems and show that the method actually shows favorable performances. 1 Introduction Tensor modeling is widely used for capturing the higher order relations between several data sources. For example, it has been applied to spatiotemporal data analysis [19], multitask learning [20, 2, 14] and collaborative filtering [15]. The success of tensor modeling is usually based on the low-rank property of the target parameter. As in the matrix, the low-rank decomposition of tensors, e.g., canonical polyadic (CP) decomposition [10, 11] and Tucker decomposition [31], reduces the effective dimension of the statistical model, improves the generalization error, and gives a better understanding of the model based on an condensed representation of the target system. Among several tensor models, linear models have been extensively studied from both theoretical and practical points of views [16]. A difficulty of the tensor model analysis is that typical tensor analysis problems usually fall under a non-convex problem and it is difficult to solve the problem. To overcome the computational difficulty, several authors have proposed convex relaxation methods [18, 23, 9, 30, 29]. Unfortunately, however, convex relaxation methods lose statistical optimality in favor of computational efficiency [28]. Another promising approach is the alternating minimization procedure which alternately updates each component of the tensor with the other fixed components. The method has shown a nice performance in practice. Moreover, its theoretical analysis has also been given by several authors [1, 13, 6, 3, 21, 36, 27, 37]. These theoretical analyses indicate that the estimator given by the 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. alternating minimization procedure has a good generalization error, with a mild dependency on the size of the tensor if the initial solution is properly set. In addition to the alternating minimization procedure, it has been shown that the Bayes estimator achieves the minimax optimality under quite weak assumptions [28]. Nonparametric models have also been proposed for capturing nonlinear relations [35, 24, 22]. In particular, [24] extended the linear tensor learning to the nonparametric learning problem using a kernel method and proposed a convex regularization method and an alternating minimization method. Recently, [14, 12] showed that the Bayesian approach has good theoretical properties for the nonparametric problem. In particular, it achieves the minimax optimality under weak assumptions. However, from a practical point of view, the Bayesian approach is computationally expensive compared with the alternating minimization approach. An interesting observation is that the practical performance of the alternating minimization procedure is quite good [24] and is comparable to the Bayesian one [14], although its computational efficiency is much better than that of the Bayesian one. Despite the practical usefulness of the alternating minimization, its statistical properties have not been investigated yet in the general nonparametric model. In this paper, we theoretically analyze the alternating minimization procedure in the nonparametric model. We investigate its computational efficiency and analyze its statistical performance. It is shown that, if the true function is included in a reproducing kernel Hilbert space (RKHS), then the algorithm converges to an (a possibly local) optimal solution in linear rate, and the generalization error of the estimator achieves the minimax optimality if the initial point of the algorithm is in the O(1) distance from the true function. Roughly speaking, the theoretical analysis shows that ∥bf (t) −f ∗∥2 L2 = Op dKn− 1 1+s log(dK) + dK (3/4)t where bf (t) is the estimated nonlinear tensor at the tth iteration of the alternating minimization procedure, n is the sample size, d is the rank of the true tensor, K is the number of modes, and s is the complexity of the RKHS. This indicates that the alternating minimization procedure can produce a minimax optimal estimator after O(log(n)) iterations. 2 Problem setting: nonlinear tensor model Here, we describe the model to be analyzed. Suppose that we are given n input-output pairs {(xi, yi)}n i=1 that are generated from the following system. The input xi is a concatenation of K variables, i.e., xi = (x(1) i , · · · , x(K) i ) ∈X1 × · · · × XK = X, where each x(k) i is an element of a set Xk and is generated from a distribution Pk. We consider the regression problem where the outputs {yi}n i=1 are observed according to the nonparametric tensor model [24]: yi = d X r=1 K Y k=1 f ∗ (r,k)(x(k) i ) + ϵi, (1) where {ϵi}n i=1 represents an i.i.d. zero-mean noise and each f ∗ (r,k) is a component of the true function included in some RKHS Hr,k. In this regression problem, our objective is to estimate the true function f ∗(x) = f ∗(x(1), . . . , x(K)) = Pd r=1 QK k=1 f ∗ (r,k)(x(k)) based on the observations {(xi, yi)}n i=1. This model has been applied to several problems such as multitask learning, recommendation system and spatiotemporal data analysis. Although we focus on the squared loss regression problem, the discussion in this paper can be easily generalized to Lipschitz continuous and strongly convex losses as in [4]. Example 1: multitask learning Suppose that we have several tasks indexed by a two-dimensional index (s, t) ∈[M1] × [M2]1, and each task (s, t) is a regression problem for which there is a true function g∗ [s,t](x) that takes an input feature w ∈X3. The ith input sample is given as xi = (si, ti, wi), which is a combination of task index (si, ti) and input feature wi. By assuming that the true function g∗ [s,t] is a linear combination of a few latent factors hr as g∗ [s,t](x) = Pd r=1 αs,rβt,rhr(w) (x = (s, t, w)), (2) 1 We denote by [k] = {1, . . . , k}. 2 Algorithm 1 Alternating minimization procedure for nonlinear tensor estimation Require: Training data Dn = {(xi, yi)}n i=1, the regularization parameter λ(n), iteration number T. Ensure: bf = Pd r=1 ˆv(T ) r QK k=1 bf (T ) (r,k) as the estimator for t = 1, . . . , T do Set ˜f(r,k) = bf (t−1) (r,k) (∀(r, k)), and ˜vr = ˆv(t−1) r (∀r). for (r, k) ∈{1, . . . , d} × {1, . . . , K} do The (r, k)-element of ˜f is updated as ˜f ′ (r,k) = argmin f(r,k)∈Hr,k ( 1 n n X i=1 h yi− f(r,k) Y k′̸=k ˜f(r,k′)+ X r′̸=r ˜vr′ K Y k′=1 ˜f(r′,k′) (xi) i2 + Cn∥f∥2 Hr,k ) . (4) ˜vr ←∥˜f ′ (r,k)∥n, ˜f(r,k) ←˜f ′ (r,k)/˜vr. end for Set bf (t) (r,k) = ˜f(r,k) (∀(r, k)) and ˆv(t) r = ˜vr (∀r). end for and the output is given as yi = g∗ [si,ti](xi) + ϵi [20, 2, 14], then we can reduce the multitask learning problem for estimating {g∗ [s,t]}s,t to the tensor estimation problem, where f(r,1)(s) = αs,r, f(r,2)(t) = βt,r, f(r,3)(w) = hr(w). 3 Alternating regularized least squares algorithm To learn the nonlinear tensor factorization model (1), we propose to optimize the regularized empirical risk in an alternating way. That is, we optimize each component f(r,k) with the other fixed components {f(r′,k′)}(r′,k′)̸=(r,k). Basically, we want to execute the following optimization problem: min {f(r,k)}(r,k):f(r,k)∈Hr,k 1 n n X i=1 yi − d X r=1 K Y k=1 f(r,k)(x(k) i ) !2 + Cn d X r=1 d X k=1 ∥f(r,k)∥2 Hr,k, (3) where the first term is the loss function for measuring how our guess Pd r=1 QK k=1 f(r,k) fits the data and the second term is a regularization term for controlling the complexity of the learning function. However, this optimization problem is not convex and is difficult to exactly solve. We found that this computational difficulty could be overcome if we assume some additional assumptions and aim to achieve a better generalization error instead of exactly minimizing the training error. The optimization procedure we discuss to obtain such an estimator is the alternating minimization procedure, which minimizes the objective function (3) alternately with respect to each component f(r,k). For each component f(r,k), the objective function (3) is a convex function, and thus, it is easy to obtain the optimal solution. Actually, the subproblem is reduced to a variant of the kernel ridge regression, and the solution can be analytically obtained. The algorithm we call alternating minimization procedure (AMP) is summarized in Algorithm 1. After minimizing the objective (Eq. (4)), the obtained solution is normalized so that its empirical L2norm becomes 1 to adjust the scaling factor freedom. The parameter Cn in Eq. (4) is a regularization parameter that is appropriately chosen. For theoretical simplicity, we consider the following equivalent constraint formula instead of the penalization one (4): ˜f ′ (r,k) ∈ argmin f(r,k)∈Hr,k ∥f(r,k)∥Hr,k ≤˜ R ( 1 n n X i=1 yi −f(r,k)(x(k) i ) Y k′̸=k ˜f(r,k′)(x(k′) i ) − X r′̸=r ˜vr′ K Y k′=1 ˜f(r′,k′)(x(k′) i ) !2) (5) where the parameter ˜R is a regularization parameter for controlling the complexity of the estimated function. 3 4 Assumptions and problem settings for the convergence analysis Here, we prepare some assumptions for our theoretical analysis. First, we assume that the distribution P(X) of the input feature x ∈X is a product measure of Pk(X) on each Xk. That is, PX (dX) = P1(dX1) × · · · × PK(dXK) for X = (X1, . . . , XK) ∈X = X1 × · · · × XK. This is typically assumed in the analysis of linear tensor estimation methods [13, 6, 3, 21, 1, 36, 27, 37]. Thus, the L2-norm of a “rank-1” function f(x) = QK k=1 fk(x(k)) can be decomposed into ∥f∥2 L2(PX ) = ∥f1∥2 L2(P1) × · · · × ∥fK∥2 L2(PK). Hereafter, with a slight abuse of notations, we denote by ∥f∥L2 = ∥f∥L2(Pk) for a function f : Xk →R. The inner product in the space L2 is denoted by ⟨f, g⟩L2 := R f(X)g(X)dPX (X). Note that because of the construction of PX , it holds that ⟨f, g⟩L2 = QK k=1⟨fk, gk⟩L2 for functions f(x) = QK k=1 fk(x(k)) and g(x) = QK k=1 gk(x(k)) where x = (x(1), . . . , x(K)) ∈X. Next, we assume that the norm of the true function is bounded away from zero and from above. Let the magnitude of the rth component of the true function be vr := ∥QK k=1 f ∗ (r,k)∥L2 and the normalized components be f ∗∗ (r,k) := f ∗ (r,k)/∥f ∗ (r,k)∥L2 (∀(r, k)). Assumption 1 (Boundedness Assumption). (A1-1) There exist 0 < vmin ≤vmax such that vmin ≤vr ≤vmax (∀r = 1, . . . , d). (A1-2) The true function f ∗ (r,k) is included in the RKHS Hr,k, i.e., f ∗ (r,k) ∈Hr,k (∀(r, k)), and there exists R > 0 such that max{vr, 1}∥f ∗∗ (r,k)∥Hr,k ≤R (∀(r, k)). (A1-3) The kernel function k(r,k) associated with the RKHS Hr,k is bounded as supx∈Xk k(r,k)(x, x) ≤1 (∀(r, k)). (A1-4) There exists L > 0 such that the noise is bounded as |ϵi| ≤L (a.s.). Assumption 1 is a standard one for the analysis of the tensor model and the kernel regression model. Note that the boundedness condition of the kernel gives that ∥f∥∞= supx(k) |f(x(k))| ≤ ∥f∥Hr,k for all f ∈Hr,k because the Cauchy-Schwarz inequality gives |⟨f, k(r,k)(·, x(k))⟩Hr,k| ≤ k(r,k)(x(k), x(k))∥f∥Hr,k for all x(k). Thus, combining with (A1-2), we also have ∥f ∗∗ (r,k)∥∞≤R. The last assumption (A1-4) is a bit restrictive. However, this assumption can be replaced with a Gaussian assumption. In that situation, we may use the Gaussian concentration inequality [17] instead of Talagrand’s concentration inequality in the proof. Next, we characterize the complexity of each RKHS Hr,k by using the entropy number [33, 25]. The ϵ-covering number N(ϵ, G, L2(PX )) with respect to L2(PX ) is the minimal number of balls with radius ϵ measured by L2(PX ) needed to cover a set G ⊂L2(PX ). The ith entropy number ei(G, L2(PX )) is defined as the infimum of ϵ > 0 such that N(ϵ, G, L2) ≤2i−1 [25]. Intuitively, if the entropy number is small, the space G is “simple”; otherwise, it is “complicated.” Assumption 2 (Complexity Assumption). Let BHr,k be the unit ball of an RKHS Hr,k. There exist 0 < s < 1 and c such that ei(BHr,k, L2(PX )) ≤ci−1 2s , (6) for all 1 ≤r ≤d and 1 ≤k ≤K. The optimal rate of the ordinary kernel ridge regression on the RKHS with Assumption 2 is given as n− 1 1+s [26]. Next, we give a technical assumption about the L∞-norm. Assumption 3 (Infinity Norm Assumption). There exist 0 < s2 ≤1 and c2 such that ∥f∥∞≤c2∥f∥1−s2 L2 ∥f∥s2 Hr,k (∀f ∈Hr,k) (7) for all 1 ≤r ≤d and 1 ≤k ≤K. By Assumption 1, this assumption is always satisfied for c2 = 1 and s2 = 1. s2 < 1 is a nontrivial situation and gives a tighter bound. We would like to note that this condition with s2 < 1 is satisfied 4 by many practically used kernels such as the Gaussian kernel. In particular, it is satisfied if the kernel is smooth so that Hr,k is included in a Sobolev space W 2,s2[0, 1]. More formal characterization of this condition using the notion of a real interpolation space can be found in [26] and Proposition 2.10 of [5]. Finally, we assume an incoherence condition on {f ∗ (r,k)}r,k. Roughly speaking, the incoherence property of a set of functions {f(r,k)}r,k means that components {f(r,k)}r are linearly independent across different 1 ≤r ≤d on the same mode k. This is required to distinguish each component. An analogous assumption has been assumed also in the literature of linear models [13, 6, 3, 21, 36, 27]. Definition 1 (Incoherence). A set of functions {f(r,k)}r,k, where f(r,k) ∈L2(Pk), is µ-incoherent if, for all k = 1, . . . , K, it holds that |⟨f(r,k), f(r′,k)⟩L2| ≤µ∥f(r,k)∥L2∥f(r′,k)∥L2 (∀r ̸= r′). Assumption 4 (Incoherence Assumption). There exists 1 > µ∗≥0 such that the true function {f ∗ (r,k)}r,k is µ∗-incoherent. 5 Linear convergence of alternating minimization procedure In this section, we give the convergence analysis of the AMP algorithm. Under the assumptions presented in the previous section, it will be shown that the AMP algorithm shows linear convergence in the sense of optimization algorithm and achieves the minimax optimal rate in the sense of statistical performance. Roughly speaking, if the initial solution is sufficiently close to the true function (namely, in a distance of O(1)), then the solution generated by AMP linearly converges to the optimal solution and the estimation accuracy of the final solution is given as O(dKn− 1 1+s ) up to log(dK) factor. We analyze how close the updated estimator is to the true one when the (r, k)th component is updated from ˜f(r,k) to ˜f ′ (r,k). The tensor decomposition {f(r,k)}r,k of a nonlinear tensor model has a freedom of scaling. Thus, we need to measure the accuracy based on a normalized representation to avoid the scaling factor uncertainty. Let the normalized components of the estimator be ¯f(r′,k′) = ˜f(r′,k′)/∥˜f(r′,k′)∥L2 (∀(r′, k′) ∈[d] × [K]) and ¯vr′ = ˜vr′ QK k′=1 ∥˜f(r′,k′)∥L2 (∀r′ ∈[d]). On the other hand, the newly updated (r, k)th element is denoted by ˜f ′ (r,k) (see Eq. (4)) and we denote by ¯v′ r the updated value of ¯vr correspondingly: ¯v′ r = ∥˜f ′ (r,k)∥L2 Q k′̸=k ∥˜f(r,k′)∥L2. The normalized newly updated element is denoted by ¯f ′ (r,k) = ˜f ′ (r,k)/∥˜f ′ (r,k)∥L2. For an estimator ( ¯f, ¯v) = ({ ¯f(r′,k′)}r′,k′, {¯vr′}r′) which is a couple of the normalized component and the scaling factor, define d∞( ¯f, ¯v) := max (r′,k′){vr′∥¯f(r′,k′) −f ∗∗ (r′,k′)∥L2 + |vr′ −¯vr′|}. For any λ1,n > 0 and λ2,n > 0 and τ > 0, we let aτ := max{1, L} max{1, τ} log(dK) and define ξn = ξn(λ1,n, τ) and ξ′ n = ξ′ n(λ2,n, τ) as 2 ξn := aτ K 1+2s 2 λ −s 2 1,n √n ∨ K 1+2s 1+s λ 2s+(1−s)s2 2(1+s) 1,n n 1 1+s , ξ′ n := aτ λ −s 2 2,n √n ∨ 1 λ 1 2 2,nn 1 1+s . Theorem 2. Suppose that Assumptions 1–4 are satisfied, and the regularization parameter ˜R in Eq. (5) is set as ˜R = 2R. Let ˆR = 8 ˜R/ min{vmin, 1} and suppose that we have already obtained an estimator ˜f satisfying the following conditions: • The RKHS-norms of { ¯f(r′,k′)}r′,k′ are bounded as ∥¯f(r′,k′)∥Hr′,k′ ≤ˆR/2 (∀(r′, k′) ̸= (r, k)). • The distance from the true one is bounded as d∞( ¯f, ¯v) ≤γ. Then, for a sufficiently small µ∗and γ (independent of n), there exists an event with probability greater than 1 −3 exp(−τ) where any ( ¯f, ¯v) satisfying the above conditions gives vr∥¯f ′ (r,k) −f ∗∗ (r,k)∥L2 + |¯v′ r −vr| 2 ≤1 2d∞( ¯f, ¯v)2 + Sn ˆR2K (8) 2The symbol ∨indicates the max operation, that is, a ∨b := max{a, b}. 5 for any sufficiently large n, where Sn is defined for a constant C′ depending on s, s2, c, c2 as Sn := C′ h ξ′ nλ1/2 2,n + ξ′2 n + dξnλ1/2 1,n + ˆR2(K−1)( 1 s2 −1)(dξn)2/s2(1 + vmax)2i . Moreover, if we denote by ηn the right hand side of Eq. (8), then it holds that ∥¯f ′ (r,k)∥Hr,k ≤ 2 vr −√ηn ˜R. The proof and its detailed statement are given in the supplementary material (Theorem A.1). It is proven by using such techniques as the so-called peeling device [32] or, equivalently, the local Rademacher complexity [4], and by combining these techniques with the coordinate descent optimization argument. Theorem 2 states that, if the initial solution is sufficiently close to the true one, then the following updated estimator gets closer to the true one and its RKHS-norm is still bounded above by a constant. Importantly, it can be shown that the updated one still satisfies the conditions of Theorem 2 for large n. Since the bound given in Theorem 2 is uniform, the inequality (8) can be recursively applied to the sequence of bf (t) (t = 1, 2, . . . ). By substituting λ1,n = K−1+s 1−s d− 2 1−s n− 1 1+s and λ2,n = n− 1 1+s , we have that Sn = O n− 1 1+s ∨ n− 1 1+s −(1−s2) min{ 1−s 4(1+s) , 1 s2(1+s) }poly(d, K) log(dK), where poly(d, K) means a polynomial of d, K. Thus, if s2 < 1 and n is sufficiently large compared with d and K, then the second term is smaller than the first term and we have Sn ≤Cn− 1 1+s with a constant C. Furthermore, we can bound the L2-norm from the true one as in the following theorem. Theorem 3. Let ( bf (t), ˆv(t)) be the estimator at the tth iteration. In addition to the assumptions of Theorem 2, suppose that ( bf (1), ˆv(1)) satisfies d∞( bf (1), ˆv(1))2 ≤v2 min 8 and Sn ˆR2K ≤v2 min 8 , s2 < 1 and n ≫d, K, then ˇf (t)(x) = Pd r=1 ˆv(t) r QK k=1 bf (t) (r,k)(x(k)) satisfies ∥ˇf (t) −f ∗∥2 L2 = O dKn− 1 1+s log(dK) + dK (3/4)t . for all t ≥2 uniformly with probability 1 −3 exp(−τ). More detailed argument is given in Theorem A.3 in the supplementary material. This means that after T = O(log(n)) iterations, we obtain the estimation accuracy of O(dKn− 1 1+s log(dK)). The estimation accuracy bound O(dKn− 1 1+s log(dK)) is intuitively natural because we are estimating d × K functions {f ∗ (r,k)}r,k and the optimal sample complexity to estimate one function f ∗ (r,k) is known as n− 1 1+s [26]. Indeed, recently, it has been shown that this accuracy bound is minimax optimal up to log(dK) factor [14], that is, inf ˆ f sup f ∗E[∥bf −f ∗∥2] ≳dKn− 1 1+s where inf is taken over all estimators and sup runs over all low rank tensors f ∗with ∥f ∗ (r,k)∥Hr,k ≤R. The Bayes estimator also achieves this minimax lower bound [14]. Hence, a rough Bayes estimator would be a good initial solution satisfying the assumptions. 6 Relation to existing works In this section, we describe the relation of our work to existing works. First, our work can be seen as a nonparametric extension of the linear parametric tensor model. The AMP algorithm and related methods for the linear model has been extensively studied in the recent years, e.g. [1, 13, 6, 3, 21, 36, 27, 37]. Overall, the tensor completion problem has been mainly studied instead of a general regression problem. Among the existing works, [37] analyzed the AMP algorithm for a low-rank matrix estimation problem. It is shown that, under an incoherence condition, the AMP algorithm converges to the optimal in a linear rate. However, their analysis is limited to a matrix case. [1] analyzed an alternating minimization approach to estimate a low-rank tensor with positive entries in a noisy observation setting. [13, 6] considered an AMP algorithm for a tensor completion. 6 Their estimation method is close to our AMP algorithm. However, the analysis is for a linear tensor completion with/without noise and is a different direction from our general nonparametric regression setting. [3, 36] proposed estimation methods other than an alternating minimization one, which were specialized to a linear tensor completion problem. As for the theoretical analysis for the nonparametric tensor regression model, some Bayes estimators have been analyzed very recently by [14, 12]. They analyzed Bayes methods with Gaussian process priors and showed that the Gaussian process methods possess a good statistical performance. In particular, [14] showed that the Gaussian process method for the nonlinear tensor estimation yields the mini-max optimality as an extension of the linear model analysis [28]. However, the Bayes estimators require posterior sampling such as Gibbs sampling, which is rather computationally expensive. On the other hand, the AMP algorithm yields a linear convergence rate and satisfies the minimax optimality. An interesting observation is that the AMP algorithm requires a stronger assumption than the Bayesian one. There would be a trade-off between computational efficiency and statistical property. 7 Numerical experiments We numerically compare the following methods in multitask learning problems (Eq. (2)): • Gaussian process method (GP-MTL) [14]: The nonparametric Bayesian method with Gaussian process priors. It was shown that the generalization error of GP-MTL achieves the minimax optimal rate [14]. • Our AMP method with different kernels for the latent factors hr (see Eq. (2)); the Gaussian RBF kernel and the linear kernel. We also examined their mixture like 2 RBF kernels and 1 linear kernel among d = 3 components. They are indicated as Lin(1)+RBF(2). The tensor rank for AMP and GP-MTL was fixed d = 3 in the following two data sets. The kernel width and the regularization parameter were tuned by cross validation. We also examined the scaled latent convex regularization method [34]. However, it did not perform well and was omitted. 7.1 Restaurant data Here, we compared the methods in the Restaurant & Consumer Dataset [7]. The task was to predict consumer ratings about several aspects of different restaurants, which is a typical task of a recommendation system. The number of consumers was M1 = 138, and each consumer gave scores of about M2 = 3 different aspects (food quality, service quality, and overall quality). Each restaurant was described by M3 = 44 features as in [20], and the task was to predict the score of an aspect by a certain consumer based on the restaurant feature vector. This is a multitask learning problem consisting of M1 ×M2 = 414 (nonlinear) regression tasks where the input feature vector is M3 = 44 dimensional. The kernel function representing the task similarities among Task 1 (restaurant) and Task 2 (aspect) are set as k(p, p′) = δp,p′ + 0.8 · (1 −δp,p′) (where the pair p, p′ are restaurants or aspects) 3. Fig. 1 shows the relative MSE (the discrepancy of MSE from the best one) for different training sample sizes n computed on the validation data against the number of iterations t averaged over 10 repetitions. It can be seen that the validation error dropped rapidly to the optimal one. The best achievable validation error depended on the sample size. An interesting observation was that, until the algorithm converged to the best possible error, it dropped at a linear rate. After it reached the bottom, the error was no longer improved. Fig. 2 shows the performance comparison between the AMP method with different kernels and the Gaussian process method (GP-MTL). The performances of AMP and GP-MTL were almost identical. Although AMP is computationally quite efficient, as shown in Fig. 1, it did not deteriorate the statistical performance. This is a remarkable property of the AMP algorithm. 7.2 Online shopping data Here, we compared our AMP method with the existing method using data of Yahoo! Japan shopping. Yahoo! Japan shopping contains various types of shops. The dataset is built on the purchase history 3We also tested the delta kernel k(p, p′) = δp,p′, but its performance was worse that the presented kernel. 7 Figure 1: Convergence property of the AMP method: relative MSE against the number of iterations. Figure 2: Comparison between AMP method with different kernels and GP-MTL on the restaurant data. 8 9 10 11 12 13 4000 6000 8000 10000 12000 14000 MSE Sample size GP-MTL(cosdis) GP-MTL(cossim) AMP(cosdis) AMP(cossim) Figure 3: Comparison between AMP and GP-MTL on the online shopping data with different kernels. that describes how many times each consumer bought each product in each shop. Our objective was to predict the quantity of a product purchased by a consumer at a specific shop. Each consumer was described by 65 features based on his/her properties such as age, gender, and industry type of his/her occupation. We executed the experiments on 100 items and 508 different shops. Hence, the problem was reduced to a multitask learning problem consisting of 100 × 508 regression tasks. Similarly to [14], we put a commute-time kernel K = L† [8] on the shops based on a Laplacian matrix L on a weighted graph constructed by two similarity measures between shops (where † denotes psuedoinverse). Here, the Lapalacian on the graph is given by Li,j = P j∈V wi,j δi,j −wi,j where wi,j is the similarity between shops (i, j). We employed the cosine similarity with different parameters as the similarity measures (indicated by “cossim” and “cosdis”). Based on the above settings, we performed a comparison between AMP and GP-MTL with different similarity parameters. We used the Gaussian kernel for the latent factor hr. The result is shown in Fig. 3, which presents the validation error (MSE) against the size of the training data. We can see that, for both “cossim” and “cosdis,” AMP performed comparably well to the GP-MTL method and even better than the GP-MTL method in some situations. Here it should be noted that AMP is much more computationally efficient than GP-MTL despite its high predictive performance. This experimental result justifies our theoretical analysis. 8 Conclusion We have developed a convergence theory of the AMP method for the nonparametric tensor learning. The AMP method has been used by several authors in the literature, but its theoretical analysis has not been addressed in the nonparametric setting. We showed that the AMP algorithm converges in a linear rate as an optimization algorithm and achieves the minimax optimal statistical error if the initial point is in the O(1)-neighborhood of the true function. We may use the Bayes estimator as a rough initial solution, but it would be an important future work to explore more sophisticated determination of the initial solution. Acknowledgment This work was partially supported by MEXT kakenhi (25730013, 25120012, 26280009, 15H01678 and 15H05707), JST-PRESTO and JST-CREST. References [1] A. Aswani. Low-rank approximation and completion of positive tensors. arXiv:1412.0620, 2014. [2] M. T. Bahadori, Q. R. Yu, and Y. Liu. Fast multivariate spatio-temporal analysis via low rank tensor learning. In Advances in Neural Information Processing Systems 27. [3] B. Barak and A. Moitra. Tensor prediction, Rademacher complexity and random 3-xor. arXiv:1501.06521, 2015. [4] P. Bartlett, O. Bousquet, and S. Mendelson. Local Rademacher complexities. The Annals of Statistics, 33: 1487–1537, 2005. [5] C. Bennett and R. Sharpley. Interpolation of Operators. Academic Press, Boston, 1988. [6] S. Bhojanapalli and S. Sanghavi. A new sampling technique for tensors. arXiv:1502.05023, 2015. [7] V.-G. Blanca, G.-S. Gabriel, and P.-M. Rafael. Effects of relevant contextual features in the performance of a restaurant recommender system. In Proceedings of 3rd Workshop on Context-Aware Recommender Systems, 2011. 8 [8] F. Fouss, A. Pirotte, J.-M. Renders, and M. Saerens. Random-walk computation of similarities between nodes of a graph with application to collaborative recommendation. IEEE Trans. on Knowl. and Data Eng., 19(3):355–369, Mar. 2007. [9] S. Gandy, B. Recht, and I. Yamada. Tensor completion and low-n-rank tensor recovery via convex optimization. Inverse Problems, 27:025010, 2011. [10] F. L. Hitchcock. The expression of a tensor or a polyadic as a sum of products. Journal of Mathematics and Physics, 6:164–189, 1927. [11] F. L. Hitchcock. Multilple invariants and generalized rank of a p-way matrix or tensor. Journal of Mathematics and Physics, 7:39–79, 1927. [12] M. Imaizumi and K. Hayashi. Doubly decomposing nonparametric tensor regression. In International Conference on Machine Learning (ICML2016), page to appear, 2016. [13] P. Jain and S. Oh. Provable tensor factorization with missing data. In Advances in Neural Information Processing Systems 27, pages 1431–1439. Curran Associates, Inc., 2014. [14] H. Kanagawa, T. Suzuki, H. Kobayashi, N. Shimizu, and Y. Tagami. Gaussian process nonparametric tensor estimator and its minimax optimality. In International Conference on Machine Learning (ICML2016), pages 1632–1641, 2016. [15] A. Karatzoglou, X. Amatriain, L. Baltrunas, and N. Oliver. Multiverse recommendation: N-dimensional tensor factorization for context-aware collaborative filtering. In Proceedings of the 4th ACM Conference on Recommender Systems 2010, pages 79–86, 2010. [16] T. G. Kolda and B. W. Bader. Tensor decompositions and applications. SIAM Rev., 51(3):455–500, Aug. 2009. [17] M. Ledoux. The concentration of measure phenomenon. Number 89 in Mathematical Surveys and Monographs. American Mathematical Soc., 2005. [18] J. Liu, P. Musialski, P. Wonka, and J. Ye. Tensor completion for estimating missing values in visual data. In Proceedings of the 12th International Conference on Computer Vision (ICCV), pages 2114–2121, 2009. [19] M. Mørup. Applications of tensor (multiway array) factorizations and decompositions in data mining. Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery, 1(1):24–40, 2011. [20] B. Romera-Paredes, H. Aung, N. Bianchi-Berthouze, and M. Pontil. Multilinear multitask learning. In Proceedings of the 30th International Conference on Machine Learning (ICML2013), volume 28 of JMLR Workshop and Conference Proceedings, pages 1444–1452, 2013. [21] P. Shah, N. Rao, and G. Tang. Optimal low-rank tensor recovery from separable measurements: Four contractions suffice. arXiv:1505.04085, 2015. [22] W. Shen and S. Ghosal. Adaptive Bayesian density regression for high-dimensional data. Bernoulli, 22(1): 396–420, 02 2016. [23] M. Signoretto, L. D. Lathauwer, and J. Suykens. Nuclear norms for tensors and their use for convex multilinear estimation. Technical Report 10-186, ESAT-SISTA, K.U.Leuven, 2010. [24] M. Signoretto, L. D. Lathauwer, and J. A. K. Suykens. Learning tensors in reproducing kernel Hilbert spaces with multilinear spectral penalties. CoRR, abs/1310.4977, 2013. [25] I. Steinwart and A. Christmann. Support Vector Machines. Springer, 2008. [26] I. Steinwart, D. Hush, and C. Scovel. Optimal rates for regularized least squares regression. In Proceedings of the Annual Conference on Learning Theory, pages 79–93, 2009. [27] W. Sun, Z. Wang, H. Liu, and G. Cheng. Non-convex statistical optimization for sparse tensor graphical model. In Advances in Neural Information Processing Systems, pages 1081–1089, 2015. [28] T. Suzuki. Convergence rate of Bayesian tensor estimator and its minimax optimality. In Proceedings of the 32nd International Conference on Machine Learning (ICML2015), pages 1273–1282, 2015. [29] R. Tomioka and T. Suzuki. Convex tensor decomposition via structured schatten norm regularization. In Advances in Neural Information Processing Systems 26, pages 1331–1339, 2013. NIPS2013. [30] R. Tomioka, T. Suzuki, K. Hayashi, and H. Kashima. Statistical performance of convex tensor decomposition. In Advances in Neural Information Processing Systems 24, pages 972–980, 2011. NIPS2011. [31] L. R. Tucker. Some mathematical notes on three-mode factor analysis. Psychometrika, 31(3):279–311, 1966. [32] S. van de Geer. Empirical Processes in M-Estimation. Cambridge University Press, 2000. [33] A. W. van der Vaart and J. A. Wellner. Weak Convergence and Empirical Processes: With Applications to Statistics. Springer, New York, 1996. [34] K. Wimalawarne, M. Sugiyama, and R. Tomioka. Multitask learning meets tensor factorization: task imputation via convex optimization. In Advances in Neural Information Processing Systems 27, pages 2825–2833. 2014. NIPS2014. [35] Z. Xu, F. Yan, and Y. A. Qi. Inftucker: t-process based infinite tensor decomposition. CoRR, abs/1108.6296, 2011. [36] Z. Zhang and S. Aeron. Exact tensor completion using t-svd. arXiv:1502.04689, 2015. [37] T. Zhao, Z. Wang, and H. Liu. A nonconvex optimization framework for low rank matrix estimation. In Advances in Neural Information Processing Systems 28, pages 559–567. Curran Associates, Inc., 2015. NIPS2015. 9 | 2016 | 418 |
6,348 | Universal Correspondence Network Christopher B. Choy Stanford University chrischoy@ai.stanford.edu JunYoung Gwak Stanford University jgwak@ai.stanford.edu Silvio Savarese Stanford University ssilvio@stanford.edu Manmohan Chandraker NEC Laboratories America, Inc. manu@nec-labs.com Abstract We present a deep learning framework for accurate visual correspondences and demonstrate its effectiveness for both geometric and semantic matching, spanning across rigid motions to intra-class shape or appearance variations. In contrast to previous CNN-based approaches that optimize a surrogate patch similarity objective, we use deep metric learning to directly learn a feature space that preserves either geometric or semantic similarity. Our fully convolutional architecture, along with a novel correspondence contrastive loss allows faster training by effective reuse of computations, accurate gradient computation through the use of thousands of examples per image pair and faster testing with O(n) feed forward passes for n keypoints, instead of O(n2) for typical patch similarity methods. We propose a convolutional spatial transformer to mimic patch normalization in traditional features like SIFT, which is shown to dramatically boost accuracy for semantic correspondences across intra-class shape variations. Extensive experiments on KITTI, PASCAL, and CUB-2011 datasets demonstrate the significant advantages of our features over prior works that use either hand-constructed or learned features. 1 Introduction Correspondence estimation is the workhorse that drives several fundamental problems in computer vision, such as 3D reconstruction, image retrieval or object recognition. Applications such as structure from motion or panorama stitching that demand sub-pixel accuracy rely on sparse keypoint matches using descriptors like SIFT [22]. In other cases, dense correspondences in the form of stereo disparities, optical flow or dense trajectories are used for applications such as surface reconstruction, tracking, video analysis or stabilization. In yet other scenarios, correspondences are sought not between projections of the same 3D point in different images, but between semantic analogs across different instances within a category, such as beaks of different birds or headlights of cars. Thus, in its most general form, the notion of visual correspondence estimation spans the range from low-level feature matching to high-level object or scene understanding. Traditionally, correspondence estimation relies on hand-designed features or domain-specific priors. In recent years, there has been an increasing interest in leveraging the power of convolutional neural networks (CNNs) to estimate visual correspondences. For example, a Siamese network may take a pair of image patches and generate their similiarity as the output [1, 34, 35]. Intermediate convolution layer activations from the above CNNs are also usable as generic features. However, such intermediate activations are not optimized for the visual correspondence task. Such features are trained for a surrogate objective function (patch similarity) and do not necessarily form a metric space for visual correspondence and thus, any metric operation such as distance does not have 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Figure 1: Various types of correspondence problems have traditionally required different specialized methods: for example, SIFT or SURF for sparse structure from motion, DAISY or DSP for dense matching, SIFT Flow or FlowWeb for semantic matching. The Universal Correspondence Network accurately and efficiently learns a metric space for geometric correspondences, dense trajectories or semantic correspondences. explicit interpretation. In addition, patch similarity is inherently inefficient, since features have to be extracted even for overlapping regions within patches. Further, it requires O(n2) feed-forward passes to compare each of n patches with n other patches in a different image. In contrast, we present the Universal Correspondence Network (UCN), a CNN-based generic discriminative framework that learns both geometric and semantic visual correspondences. Unlike many previous CNNs for patch similarity, we use deep metric learning to directly learn the mapping, or feature, that preserves similarity (either geometric or semantic) for generic correspondences. The mapping is, thus, invariant to projective transformations, intra-class shape or appearance variations, or any other variations that are irrelevant to the considered similarity. We propose a novel correspondence contrastive loss that allows faster training by efficiently sharing computations and effectively encoding neighborhood relations in feature space. At test time, correspondence reduces to a nearest neighbor search in feature space, which is more efficient than evaluating pairwise patch similarities. The UCN is fully convolutional, allowing efficient generation of dense features. We propose an on-the-fly active hard-negative mining strategy for faster training. In addition, we propose a novel adaptation of the spatial transformer [13], called the convolutional spatial transformer, desgined to make our features invariant to particular families of transformations. By learning the optimal feature space that compensates for affine transformations, the convolutional spatial transformer imparts the ability to mimic patch normalization of descriptors such as SIFT. Figure 1 illustrates our framework. The capabilities of UCN are compared to a few important prior approaches in Table 1. Empirically, the correspondences obtained from the UCN are denser and more accurate than most prior approaches specialized for a particular task. We demonstrate this experimentally by showing state-of-the-art performances on sparse SFM on KITTI, as well as dense geometric or semantic correspondences on both rigid and non-rigid bodies in KITTI, PASCAL and CUB datasets. To summarize, we propose a novel end-to-end system that optimizes a general correspondence objective, independent of domain, with the following main contributions: • Deep metric learning with an efficient correspondence constrastive loss for learning a feature representation that is optimized for the given correspondence task. • Fully convolutional network for dense and efficient feature extraction, along with fast active hard negative mining. • Fully convolutional spatial transformer for patch normalization. • State-of-the-art correspondences across sparse SFM, dense matching and semantic matching, encompassing rigid bodies, non-rigid bodies and intra-class shape or appearance variations. 2 Related Works Correspondences Visual features form basic building blocks for many computer vision applications. Carefully designed features and kernel methods have influenced many fields such as structure 2 Figure 2: System overview: The network is fully convolutional, consisting of a series of convolutions, pooling, nonlinearities and a convolutional spatial transformer, followed by channel-wise L2 normalization and correspondence contrastive loss. As inputs, the network takes a pair of images and coordinates of corresponding points in these images (blue: positive, red: negative). Features that correspond to the positive points (from both images) are trained to be closer to each other, while features that correspond to negative points are trained to be a certain margin apart. Before the last L2 normalization and after the FCNN, we placed a convolutional spatial transformer to normalize patches or take larger context into account. Features Dense Geometric Corr. Semantic Corr. Trainable Efficient Metric Space SIFT [22] DAISY [28] Conv4 [21] DeepMatching [25] Patch-CNN [34] LIFT [33] Ours Table 1: Comparison of prior state-of-the-art methods with UCN (ours). The UCN generates dense and accurate correspondences for either geometric or semantic correspondence tasks. The UCN directly learns the feature space to achieve high accuracy and has distinct efficiency advantages, as discussed in Section 3. from motion, object recognition and image classification. Several hand-designed features, such as SIFT, HOG, SURF and DAISY have found widespread applications [22, 3, 28, 8]. Recently, many CNN-based similarity measures have been proposed. A Siamese network is used in [34] to measure patch similarity. A driving dataset is used to train a CNN for patch similarity in [1], while [35] also uses a Siamese network for measuring patch similarity for stereo matching. A CNN pretrained on ImageNet is analyzed for visual and semantic correspondence in [21]. Correspondences are learned in [16] across both appearance and a global shape deformation by exploiting relationships in fine-grained datasets. In contrast, we learn a metric space in which metric operations have direct interpretations, rather than optimizing the network for patch similarity and using the intermediate features. For this, we implement a fully convolutional architecture with a correspondence contrastive loss that allows faster training and testing and propose a convolutional spatial transformer for local patch normalization. Metric learning using neural networks Neural networks are used in [5] for learning a mapping where the Euclidean distance in the space preserves semantic distance. The loss function for learning similarity metric using Siamese networks is subsequently formalized by [7, 12]. Recently, a triplet loss is used by [29] for fine-grained image ranking, while the triplet loss is also used for face recognition and clustering in [26]. Mini-batches are used for efficiently training the network in [27]. CNN invariances and spatial transformations A CNN is invariant to some types of transformations such as translation and scale due to convolution and pooling layers. However, explicitly handling such invariances in forms of data augmentation or explicit network structure yields higher accuracy in many tasks [17, 15, 13]. Recently, a spatial transformer network is proposed in [13] to learn how to zoom in, rotate, or apply arbitrary transformations to an object of interest. Fully convolutional neural network Fully connected layers are converted in 1 × 1 convolutional filters in [20] to propose a fully convolutional framework for segmentation. Changing a regular CNN to a fully convolutional network for detection leads to speed and accuracy gains in [11]. Similar to these works, we gain the efficiency of a fully convolutional architecture through reusing activations 3 Figure 3: Correspondence contrastive loss takes three inputs: two dense features extracted from images and a correspondence table for positive and negative pairs. Methods # examples per # feed forwards image pair per test Siamese Network 1 O(N 2) Triplet Loss 2 O(N) Contrastive Loss 1 O(N) Corres. Contrast. Loss > 103 O(N) Table 2: Comparisons between metric learning methods for visual correspondence. Feature learning allows faster test times. Correspondence contrastive loss allows us to use many more correspondences in one pair of images than other methods. for overlapping regions. Further, since number of training instances is much larger than number of images in a batch, variance in the gradient is reduced, leading to faster training and convergence. 3 Universal Correspondence Network We now present the details of our framework. Recall that the Universal Correspondence Network is trained to directly learn a mapping that preserves similarity instead of relying on surrogate features. We discuss the fully convolutional nature of the architecture, a novel correspondence contrastive loss for faster training and testing, active hard negative mining, as well as the convolutional spatial transformer that enables patch normalization. Fully Convolutional Feature Learning To speed up training and use resources efficiently, we implement fully convolutional feature learning, which has several benefits. First, the network can reuse some of the activations computed for overlapping regions. Second, we can train several thousand correspondences for each image pair, which provides the network an accurate gradient for faster learning. Third, hard negative mining is efficient and straightforward, as discussed subsequently. Fourth, unlike patch-based methods, it can be used to extract dense features efficiently from images of arbitrary sizes. During testing, the fully convolutional network is faster as well. Patch similarity based networks such as [1, 34, 35] require O(n2) feed forward passes, where n is the number of keypoints in each image, as compared to only O(n) for our network. We note that extracting intermediate layer activations as a surrogate mapping is a comparatively suboptimal choice since those activations are not directly trained on the visual correspondence task. Correspondence Contrastive Loss Learning a metric space for visual correspondence requires encoding corresponding points (in different views) to be mapped to neighboring points in the feature space. To encode the constraints, we propose a generalization of the contrastive loss [7, 12], called correspondence contrastive loss. Let FI(x) denote the feature in image I at location x = (x, y). The loss function takes features from images I and I′, at coordinates x and x′, respectively (see Figure 3). If the coordinates x and x′ correspond to the same 3D point, we use the pair as a positive pair that are encouraged to be close in the feature space, otherwise as a negative pair that are encouraged to be at least margin m apart. We denote s = 1 for a positive pair and s = 0 for a negative pair. The full correspondence contrastive loss is given by L = 1 2N N X i si∥FI(xi) −FI′(xi ′)∥2 + (1 −si) max(0, m −∥FI(x) −FI′(xi ′)∥)2 (1) For each image pair, we sample correspondences from the training set. For instance, for KITTI dataset, if we use each laser scan point, we can train up to 100k points in a single image pair. However in practice, we used 3k correspondences to limit memory consumption. This allows more accurate gradient computations than traditional contrastive loss, which yields one example per image pair. We again note that the number of feed forward passes at test time is O(n) compared to O(n2) for Siamese network variants [1, 35, 34]. Table 2 summarizes the advantages of a fully convolutional architecture with correspondence contrastive loss. Hard Negative Mining The correspondence contrastive loss in Eq. (1) consists of two terms. The first term minimizes the distance between positive pairs and the second term pushes negative pairs to be at least margin m away from each other. Thus, the second term is only active when the distance between the features FI(xi) and FI′(x′ i) are smaller than the margin m. Such boundary defines the 4 (a) SIFT (b) Spatial transformer (c) Convolutional spatial transformer Figure 4: (a) SIFT normalizes for rotation and scaling. (b) The spatial transformer takes the whole image as an input to estimate a transformation. (c) Our convolutional spatial transformer applies an independent transformation to features. metric space, so it is crucial to find the negatives that violate the constraint and train the network to push the negatives away. However, random negative pairs do not contribute to training since they are are generally far from each other in the embedding space. Instead, we actively mine negative pairs that violate the constraints the most to dramatically speed up training. We extract features from the first image and find the nearest neighbor in the second image. If the location is far from the ground truth correspondence location, we use the pair as a negative. We compute the nearest neighbor for all ground truth points on the first image. Such mining process is time consuming since it requires O(mn) comparisons for m and n feature points in the two images, respectively. Our experiments use a few thousand points for n, with m being all the features on the second image, which is as large as 22000. We use a GPU implementation to speed up the K-NN search [10] and embed it as a Caffe layer to actively mine hard negatives on-the-fly. Convolutional Spatial Transformer CNNs are known to handle some degree of scale and rotation invariances. However, handling spatial transformations explicitly using data-augmentation or a special network structure have been shown to be more successful in many tasks [13, 15, 16, 17]. For visual correspondence, finding the right scale and rotation is crucial, which is traditionally achieved through patch normalization [23, 22]. A series of simple convolutions and poolings cannot mimic such complex spatial transformations. To mimic patch normalization, we borrow the idea of the spatial transformer layer [13]. However, instead of a global image transformation, each keypoint in the image can undergo an independent transformation. Thus, we propose a convolutional version to generate the transformed activations, called the convolutional spatial transformer. As demonstrated in our experiments, this is especially important for correspondences across large intra-class shape variations. The proposed transformer takes its input from a lower layer and for each output feature, applies an independent spatial transformation. The transformation parameters are also extracted convolutionally. Since they go through an independent transformation, the transformed activations are placed inside a larger activation without overlap and then go through a successive convolution with the stride to combine the transformed activations independently. The stride size has to be equal to the size of the spatial transformer kernel size. Figure 4 illustrates the convolutional spatial transformer module. 4 Experiments We use Caffe [14] package for implementation. Since it does not support the new layers we propose, we implement the correspondence contrastive loss layer and the convolutional spatial transformer layer, the K-NN layer based on [10] and the channel-wise L2 normalization layer. We did not use flattening layer nor the fully connected layer to make the network fully convolutional, generating features at every fourth pixel. For accurate localization, we then extract features densely using bilinear interpolation to mitigate quantization error for sparse correspondences. Please refer to the supplementary materials for the network implementation details and visualization. For each experiment setup, we train and test three variations of networks. First, the network has hard negative mining and spatial transformer (Ours-HN-ST). Second, the same network without spatial transformer (Ours-HN). Third, the same network without spatial transformer and hard negative mining, providing random negative samples that are at least certain pixels apart from the ground 5 method SIFT-NN [22] HOG-NN [8] SIFT-flow [19] DaisyFF [31] DSP [18] DM best (1/2) [25] Ours-HN Ours-HN-ST MPI-Sintel 68.4 71.2 89.0 87.3 85.3 89.2 91.5 90.7 KITTI 48.9 53.7 67.3 79.6 58.0 85.6 86.5 83.4 Table 3: Matching performance PCK@10px on KITTI Flow 2015 [24] and MPI-Sintel [6]. Note that DaisyFF, DSP, DM use global optimization whereas we only use the raw correspondences from nearest neighbor matches. (a) PCK performance for dense features NN (b) PCK performance on keypoints NN Figure 5: Comparison of PCK performance on KITTI raw dataset (a) PCK performance of the densely extracted feature nearest neighbor (b) PCK performance for keypoint features nearest neighbor and the dense CNN feature nearest neighbor (a) Original image pair and keypoints (b) SIFT [22] NN matches (c) DAISY [28] NN matches (d) Ours-HN NN matches Figure 6: Visualization of nearest neighbor (NN) matches on KITTI images (a) from top to bottom, first and second images and FAST keypoints and dense keypoints on the first image (b) NN of SIFT matches on second image. (c) NN of dense DAISY matches on second image. (d) NN of our dense UCN matches on second image. truth correspondence location instead (Ours-RN). With this configuration of networks, we verify the effectiveness of each component of Universal Correspondence Network. Datasets and Metrics We evaluate our UCN on three different tasks: geometric correspondence, semantic correspondence and accuracy of correspondences for camera localization. For geometric correspondence (matching images of same 3D point in different views), we use two optical flow datasets from KITTI 2015 Flow benchmark and MPI Sintel dataset and split their training set into a training and a validation set individually. The exact splits are available on the project website. alidation For semantic correspondences (finding the same functional part from different instances), we use the PASCAL-Berkeley dataset with keypoint annotations [9, 4] and a subset used by FlowWeb [36]. We also compare against prior state-of-the-art on the Caltech-UCSD Bird dataset[30]. To test the accuracy of correspondences for camera motion estimation, we use the raw KITTI driving sequences which include Velodyne scans, GPS and IMU measurements. Velodyne points are projected in successive frames to establish correspondences and any points on moving objects are removed. To measure performance, we use the percentage of correct keypoints (PCK) metric [21, 36, 16] (or equivalently “accuracy@T” [25]). We extract features densely or on a set of sparse keypoints (for semantic correspondence) from a query image and find the nearest neighboring feature in the second image as the predicted correspondence. The correspondence is classified as correct if the predicted keypoint is closer than T pixels to ground-truth (in short, PCK@T). Unlike many prior works, we do not apply any post-processing, such as global optimization with an MRF. This is to capture the performance of raw correspondences from UCN, which already surpasses previous methods. Geometric Correspondence We pick random 1000 correspondences in each KITTI or MPI Sintel image during training. We consider a correspondence as a hard negative if the nearest neighbor in 6 aero bike bird boat bottle bus car cat chair cow table dog horse mbike person plant sheep sofa train tv mean conv4 flow 28.2 34.1 20.4 17.1 50.6 36.7 20.9 19.6 15.7 25.4 12.7 18.7 25.9 23.1 21.4 40.2 21.1 14.5 18.3 33.3 24.9 SIFT flow 27.6 30.8 19.9 17.5 49.4 36.4 20.7 16.0 16.1 25.0 16.1 16.3 27.7 28.3 20.2 36.4 20.5 17.2 19.9 32.9 24.7 NN transfer 18.3 24.8 14.5 15.4 48.1 27.6 16.0 11.1 12.0 16.8 15.7 12.7 20.2 18.5 18.7 33.4 14.0 15.5 14.6 30.0 19.9 Ours RN 31.5 19.6 30.1 23.0 53.5 36.7 34.0 33.7 22.2 28.1 12.8 33.9 29.9 23.4 38.4 39.8 38.6 17.6 28.4 60.2 36.0 Ours HN 36.0 26.5 31.9 31.3 56.4 38.2 36.2 34.0 25.5 31.7 18.1 35.7 32.1 24.8 41.4 46.0 45.3 15.4 28.2 65.3 38.6 Ours HN-ST 37.7 30.1 42.0 31.7 62.6 35.4 38.0 41.7 27.5 34.0 17.3 41.9 38.0 24.4 47.1 52.5 47.5 18.5 40.2 70.5 44.0 Table 4: Per-class PCK on PASCAL-Berkeley correspondence dataset [4] (α = 0.1, L = max(w, h)). Query Ground Truth Ours HN-ST VGG conv4_3 NN Query Ground Truth Ours HN-ST VGG conv4_3 NN Figure 7: Qualitative semantic correspondence results on PASCAL [9] correspondences with Berkeley keypoint annotation [4] and Caltech-UCSD Bird dataset [30]. the feature space is more than 16 pixels away from the ground truth correspondence. We used the same architecture and training scheme for both datasets. Following convention [25], we measure PCK at 10 pixel threshold and compare with the state-of-the-art methods on Table 3. SIFT-flow [19], DaisyFF [31], DSP [18], and DM best [25] use additional global optimization to generate more accurate correspondences. On the other hand, just our raw correspondences outperform all the state-of-the-art methods. We note that the spatial transformer does not improve performance in this case, likely due to overfitting to a smaller training set. As we show in the next experiments, its benefits are more apparent with a larger-scale dataset and greater shape variations. Note that though we used stereo datasets to generate a large number of correspondences, the result is not directly comparable to stereo methods without a global optimization and epipolar geometry to filter out the noise and incorporate edges. We also used KITTI raw sequences to generate a large number of correspondences, and we split different sequences into train and test sets. The details of the split is on the supplementary material. We plot PCK for different thresholds for various methods with densely extracted features on the larger KITTI raw dataset in Figure 5a. The accuracy of our features outperforms all traditional features including SIFT [22], DAISY [28] and KAZE [2]. Due to dense extraction at the original image scale without rotation, SIFT does not perform well. So, we also extract all features except ours sparsely on SIFT keypoints and plot PCK curves in Figure 5b. All the prior methods improve (SIFT dramatically so), but our UCN features still perform significantly better even with dense extraction. Also note the improved performance of the convolutional spatial transformer. PCK curves for geometric correspondences on individual semantic classes such as road or car are in supplementary material. Semantic Correspondence The UCN can also learn semantic correspondences invariant to intraclass appearance or shape variations. We independently train on the PASCAL dataset [9] with various annotations [4, 36] and on the CUB dataset [30], with the same network architecture. We again use PCK as the metric [32]. To account for variable image size, we consider a predicted keypoint to be correctly matched if it lies within Euclidean distance α·L of the ground truth keypoint, where L is the size of the image and 0 < α < 1 is a variable we control. For comparison, our definition of L varies depending on the baseline. Since intraclass correspondence alignment is a difficult task, preceding works use either geometric [18] or learned [16] spatial priors. However, even our raw correspondences, without spatial priors, achieve stronger results than previous works. As shown in Table 4 and 5, our approach outperforms that of Long et al.[21] by a large margin on the PASCAL dataset with Berkeley keypoint annotation, for most classes and also overall. Note that our 7 mean α = 0.1 α = 0.05 α = 0.025 conv4 flow[21] 24.9 11.8 4.08 SIFT flow 24.7 10.9 3.55 fc7 NN 19.9 7.8 2.35 ours-RN 36.0 21.0 11.5 ours-HN 38.6 23.2 13.1 ours-HN-ST 44.0 25.9 14.4 Table 5: Mean PCK on PASCAL-Berkeley correspondence dataset [4] (L = max(w, h)). Even without any global optimization, our nearest neighbor search outperforms all methods by a large margin. Figure 8: PCK on CUB dataset [30], compared with various other approaches including WarpNet [16] (L = √ w2 + h2.) Features SIFT [22] DAISY [28] SURF [3] KAZE [2] Agrawal et al. [1] Ours-HN Ours-HN-ST Ang. Dev. (deg) 0.307 0.309 0.344 0.312 0.394 0.317 0.325 Trans. Dev.(deg) 4.749 4.516 5.790 4.584 9.293 4.147 4.728 Table 6: Essential matrix decomposition performance using various features. The performance is measured as angular deviation from the ground truth rotation and the angle between predicted translation and the ground truth translation. All features generate very accurate estimation. result is purely from nearest neighbor matching, while [21] uses global optimization too. We also train and test UCN on the CUB dataset [30], using the same cleaned test subset as WarpNet [16]. As shown in Figure 8, we outperform WarpNet by a large margin. However, please note that WarpNet is an unsupervised method. Please see Figure 7 for qualitative matches. Results on FlowWeb datasets are in supplementary material, with similar trends. Finally, we observe that there is a significant performance improvement obtained through use of the convolutional spatial transformer, in both PASCAL and CUB datasets. This shows the utility of estimating an optimal patch normalization in the presence of large shape deformations. Camera Motion Estimation We use KITTI raw sequences to get more training examples for this task. To augment the data, we randomly crop and mirror the images and to make effective use of our fully convolutional structure, we use large images to train thousands of correspondences at once. We establish correspondences with nearest neighbor matching, use RANSAC to estimate the essential matrix and decompose it to obtain the camera motion. Among the four candidate rotations, we choose the one with the most inliers as the estimate Rpred, whose angular deviation with respect to the ground truth Rgt is reported as θ = arccos (Tr (R⊤ predRgt) −1)/2 . Since translation may only be estimated up to scale, we report the angular deviation between unit vectors along the estimated and ground truth translation from GPS-IMU. In Table 6, we list decomposition errors for various features. Note that sparse features such as SIFT are designed to perform well in this setting, but our dense UCN features are still quite competitive. Note that intermediate features such as [1] learn to optimize patch similarity, thus, our UCN significantly outperforms them since it is trained directly on the correspondence task. 5 Conclusion We have proposed a novel deep metric learning approach to visual correspondence, that is shown to be advantageous over approaches that optimize a surrogate patch similarity objective. We propose several innovations, such as a correspondence contrastive loss in a fully convolutional architecture, on-the-fly active hard negative mining and a convolutional spatial transformer. These lend capabilities such as more efficient training, accurate gradient computations, faster testing and local patch normalization, which lead to improved speed or accuracy. We demonstrate in experiments that our features perform better than prior state-of-the-art on both geometric and semantic correspondence tasks, even without using any spatial priors or global optimization. In future work, we will explore applications for rigid and non-rigid motion or shape estimation as well as applying global optimization towards applications such as optical flow or dense stereo. Acknowledgments This work was part of C. Choy’s internship at NEC Labs. We acknowledge the support of Korea Foundation of Advanced Studies, Toyota Award #122282, ONR N00014-13-1-0761, and MURI WF911NF-15-1-0479. 8 References [1] P. Agrawal, J. Carreira, and J. Malik. Learning to See by Moving. In ICCV, 2015. [2] P. F. Alcantarilla, A. Bartoli, and A. J. Davison. Kaze features. In ECCV, 2012. [3] H. Bay, A. Ess, T. Tuytelaars, and L. Van Gool. Speeded-up robust features (SURF). CVIU, 2008. [4] L. Bourdev and J. Malik. Poselets: Body part detectors trained using 3d pose annotations. In ICCV, 2009. [5] J. Bromley, I. Guyon, Y. Lecun, E. Säckinger, and R. Shah. Signature verification using a Siamese time delay neural network. In NIPS, 1994. [6] D. J. Butler, J. Wulff, G. B. Stanley, and M. J. Black. A naturalistic open source movie for optical flow evaluation. In ECCV, 2012. [7] S. Chopra, R. Hadsell, and Y. LeCun. Learning a similarity metric discriminatively, with application to face verification. In CVPR, volume 1, June 2005. [8] N. Dalal and B. Triggs. Histograms of oriented gradients for human detection. In CVPR, 2005. [9] M. Everingham, L. Van Gool, C. K. I. Williams, J. Winn, and A. Zisserman. The PASCAL Visual Object Classes Challenge 2011 (VOC2011) Results. [10] V. Garcia, E. Debreuve, F. Nielsen, and M. Barlaud. K-nearest neighbor search: Fast gpu-based implementations and application to high-dimensional feature matching. In ICIP, 2010. [11] R. Girshick. Fast R-CNN. ArXiv e-prints, Apr. 2015. [12] R. Hadsell, S. Chopra, and Y. LeCun. Dimensionality reduction by learning an invariant mapping. In CVPR, 2006. [13] M. Jaderberg, K. Simonyan, A. Zisserman, and K. Kavukcuoglu. Spatial Transformer Networks. NIPS, 2015. [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] H. Kaiming, Z. Xiangyu, R. Shaoqing, and J. Sun. Spatial pyramid pooling in deep convolutional networks for visual recognition. In ECCV, 2014. [16] A. Kanazawa, D. W. Jacobs, and M. Chandraker. WarpNet: Weakly Supervised Matching for Single-view Reconstruction. ArXiv e-prints, Apr. 2016. [17] A. Kanazawa, A. Sharma, and D. Jacobs. Locally Scale-invariant Convolutional Neural Network. In Deep Learning and Representation Learning Workshop: NIPS, 2014. [18] J. Kim, C. Liu, F. Sha, and K. Grauman. Deformable spatial pyramid matching for fast dense correspondences. In CVPR. IEEE, 2013. [19] C. Liu, J. Yuen, and A. Torralba. Sift flow: Dense correspondence across scenes and its applications. PAMI, 33(5), May 2011. [20] J. Long, E. Shelhamer, and T. Darrell. Fully convolutional networks for semantic segmentation. CVPR, 2015. [21] J. Long, N. Zhang, and T. Darrell. Do convnets learn correspondence? In NIPS, 2014. [22] D. G. Lowe. Distinctive image features from scale-invariant keypoints. IJCV, 2004. [23] J. Matas, O. Chum, M. Urban, and T. Pajdla. Robust wide baseline stereo from maximally stable extremal regions. In BMVC, 2002. [24] M. Menze and A. Geiger. Object scene flow for autonomous vehicles. In CVPR, 2015. [25] J. Revaud, P. Weinzaepfel, Z. Harchaoui, and C. Schmid. DeepMatching: Hierarchical Deformable Dense Matching. Oct. 2015. [26] F. Schroff, D. Kalenichenko, and J. Philbin. Facenet: A unified embedding for face recognition and clustering. In CVPR, 2015. [27] H. O. Song, Y. Xiang, S. Jegelka, and S. Savarese. Deep metric learning via lifted structured feature embedding. In Computer Vision and Pattern Recognition (CVPR), 2016. [28] E. Tola, V. Lepetit, and P. Fua. DAISY: An Efficient Dense Descriptor Applied to Wide Baseline Stereo. PAMI, 2010. [29] J. Wang, Y. Song, T. Leung, C. Rosenberg, J. Wang, J. Philbin, B. Chen, and Y. Wu. Learning fine-grained image similarity with deep ranking. In CVPR, 2014. [30] P. Welinder, S. Branson, T. Mita, C. Wah, F. Schroff, S. Belongie, and P. Perona. Caltech-UCSD Birds 200. Technical Report CNS-TR-2010-001, California Institute of Technology, 2010. [31] H. Yang, W. Y. Lin, and J. Lu. DAISY filter flow: A generalized approach to discrete dense correspondences. In CVPR, 2014. [32] Y. Yang and D. Ramanan. Articulated human detection with flexible mixtures of parts. PAMI, 2013. [33] K. M. Yi, E. Trulls, V. Lepetit, and P. Fua. LIFT: Learned Invariant Feature Transform. In ECCV, 2016. [34] S. Zagoruyko and N. Komodakis. Learning to Compare Image Patches via Convolutional Neural Networks. CVPR, 2015. [35] J. Zbontar and Y. LeCun. Computing the stereo matching cost with a CNN. In CVPR, 2015. [36] T. Zhou, Y. Jae Lee, S. X. Yu, and A. A. Efros. Flowweb: Joint image set alignment by weaving consistent, pixel-wise correspondences. In CVPR, June 2015. 9 | 2016 | 419 |
6,349 | Efficient state-space modularization for planning: theory, behavioral and neural signatures Daniel McNamee, Daniel Wolpert, Máté Lengyel Computational and Biological Learning Lab Department of Engineering University of Cambridge Cambridge CB2 1PZ, United Kingdom {d.mcnamee|wolpert|m.lengyel}@eng.cam.ac.uk Abstract Even in state-spaces of modest size, planning is plagued by the “curse of dimensionality”. This problem is particularly acute in human and animal cognition given the limited capacity of working memory, and the time pressures under which planning often occurs in the natural environment. Hierarchically organized modular representations have long been suggested to underlie the capacity of biological systems1,2 to efficiently and flexibly plan in complex environments. However, the principles underlying efficient modularization remain obscure, making it difficult to identify its behavioral and neural signatures. Here, we develop a normative theory of efficient state-space representations which partitions an environment into distinct modules by minimizing the average (information theoretic) description length of planning within the environment, thereby optimally trading off the complexity of planning across and within modules. We show that such optimal representations provide a unifying account for a diverse range of hitherto unrelated phenomena at multiple levels of behavior and neural representation. 1 Introduction In a large and complex environment, such as a city, we often need to be able to flexibly plan so that we can reach a wide variety of goal locations from different start locations. How might this problem be solved efficiently? Model-free decision making strategies3 would either require relearning a policy, determining which actions (e.g. turn right or left) should be chosen in which state (e.g. locations in the city), each time a new start or goal location is given – a very inefficient use of experience resulting in prohibitively slow learning (but see Ref. 4). Alternatively, the state-space representation used for determining the policy can be augmented with extra dimensions representing the current goal, such that effectively multiple policies can be maintained5, or a large “look-up table” of action sequences connecting any pair of start and goal locations can be represented – again leading to inefficient use of experience and potentially excessive representational capacity requirements. In contrast, model-based decision-making strategies rely on the ability to simulate future trajectories in the state space and use this in order to flexibly plan in a goal-dependent manner. While such strategies are data- and (long term) memory-efficient, they are computationally expensive, especially in state-spaces for which the corresponding decision tree has a large branching factor and depth6. Endowing state-space representations with a hierarchical structure is an attractive approach to reducing the computational cost of model-based planning7–11 and has long been suggested to be a cornerstone of human cognition1. Indeed, recent experiments in human decision-making have gleaned evidence for the use and flexible combination of “decision fragments”12 while neuroimaging work has identified hierarchical action-value reinforcement learning in humans13 and indicated that 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. dorsolateral prefrontal cortex is involved in the passive clustering of sequentially presented stimuli when transition probabilities obey a “community” structure14. Despite such a strong theoretical rationale and empirical evidence for the existence of hierarchical state-space representations, the computational principles underpinning their formation and utilization remain obscure. In particular, previous approaches proposed algorithms in which the optimal statespace decomposition was computed based on the optimal solution in the original (non-hierarchical) representation15,16. Thus, the resulting state-space partition was designed for a specific (optimal) environment solution rather than the dynamics of the planning algorithm itself, and also required a priori knowledge of the optimal solution to the planning problem (which may be difficult to obtain in general and renders the resulting hierarchy obsolete). Here, we compute a hierarchical modularization optimized for planning directly from the transition structure of the environment, without assuming any a priori knowledge of optimal behavior. Our approach is based on minimizing the average information theoretic description length of planning trajectories in an environment, thus explicitly optimizing representations for minimal working memory requirements. The resulting representation are hierarchically modular, such that planning can first operate at a global level across modules acquiring a high-level “rough picture” of the trajectory to the goal and, subsequently, locally within each module to “fill in the details”. The structure of the paper is as follows. We first describe the mathematical framework for optimizing modular state-space representations (Section 2), and also develop an efficient coding-based approach to neural representations of modularised state spaces (Section 2.6). We then test some of the key predictions of the theory in human behavioral and neural data (Section 3), and also describe how this framework can explain several temporal and representational characteristics of “task-bracketing” and motor chunking in rodent electrophysiology (Section 4). We end by discussing future extensions and applications of the theory (Section 5). 2 Theory 2.1 Basic definitions In order to focus on situations which require flexible policy development based on dynamic goal requirements, we primarily consider discrete “multiple-goal” Markov decision processes (MDPs). Such an MDP, M := {S, A, T , G}, is composed of a set of states S, a set of actions A (a subset As of which is associated with each state s ∈S), and transition function T which determines the probability of transitioning to state sj upon executing action a in state si, p(sj|si, a) := T (si, a, sj). A task (s, g) is defined by a start state s ∈S and a goal state g ∈G and the agent’s objective is to identify a trajectory of via states v which gets the agent from s to g. We define a modularization1 M of the state-space S to be a set of Boolean matrices M := {Mi}i=1...m indicating the module membership of all states s ∈S. That is, for all s ∈S, there exists i ∈1, . . . , m such that Mi(s) = 1, Mj(s) = 0 ∀j ̸= i. We assume this to form a disjoint cover of the state-space (overlapping modular architectures will be explored in future work). We will abuse notation by using the expression s ∈M to indicate that a state s is a member of a module M. As our planning algorithm P, we consider random search as a worst-case scenario although, in principle, our approach applies to any algorithm such as dynamic programming or Q-learning3 and we expect the optimal modularization to depend on the specific algorithm utilized. We describe and analyze planning as a Markov process. For planning, the underlying state-space is the same as that of the MDP and the transition matrix T is a marginalization over a planning policy πplan (which, here, we assume is the random policy πrand(a|si) := 1 |Asi|) Tij = X a πplan(a|si) T (si, a, sj) (1) Given a modularization M, planning at the global level is a Markov process MG corresponding to a “low-resolution” representation of planning in the underlying MDP where each state corresponds 1This is an example of a “propositional representation” 17,18 and is analogous to state aggregation or “clustering” 19,20 in reinforcement learning which is typically accomplished via heuristic bottleneck discovery algorithms 21. Our method is novel in that it does not require the optimal policy as an input and is founded on a normative principle. 2 to a “local” module Mi and the transition structure TG is induced from T via marginalization and normalization22 over the internal states of the local modules Mi. 2.2 Description length of planning We use an information-theoretic framework23,24 to define a measure, the (expected) description length (DL) of planning, which can be used to quantify the complexity of planning P in the induced global L(P|MG) and local modules L(P|Mi). We will compute the DL of planning, L(P), in a non-modularized setting and outline the extension to modularized planning DL L(P|M) (elaborating further in the supplementary material). Given a task (s, g) in an MDP, a solution v(n) to this task is an n-state trajectory such that v(n) 1 = s and v(n) n = g. The description length (DL) of this trajectory is L(v(n)) := −log pplan(v(n)). A task may admit many solutions corresponding to different trajectories over the state-space thus we define the DL of the task (s, g) to be the expectation over all trajectories which solve this task, namely L(s, g) := Ev,n h L(v(n)) i = − ∞ X n=1 X v(n) p(v(n)|s, g) log p(v(n)|s, g) (2) This is the (s, g)-th entry of the trajectory entropy matrix H of M. Remarkably, this can be expressed in closed form25: [H]sg = X v̸=g [(I −Tg)−1]sv Hv (3) where T is the transition matrix of the planning Markov chain (Eq. 1), Tg is a sub-matrix corresponding to the elimination of the g-th column and row, and Hv is the local entropy Hv := H(Tv·) at state v. Finally, we define the description length L(P) of the planning process P itself over all tasks (s, g) L(P) := Es,g[L(s, g)] = X (s,g) Ps Pg L(s, g) (4) where Ps and Pg are priors of the start and goal states respectively which we assume to be factorizable P(s,g) = Ps Pg for clarity of exposition. In matrix notation, this can be expressed as L(P) = Ps H P T g where Ps is a row-vector of start state probabilities and Pg is a row-vector of goal state probabilities. The planning DL, L(P|M), of a nontrivial modularization of an MDP requires (1) the computation of the DL of the global L(P|MG) and the local planning processes L(P|Mi) for global MG and local Mi modular structures respectively, and (2) the weighting of these quantities by the correct priors. See supplementary material for further details. 2.3 Minimum modularized description length of planning Based on a modularization, planning can be first performed at the global level across modules, and then subsequently locally within the subset of modules identified by the global planning process (Fig. 1). Given a task (s, g) where s represents the start state and g represents the goal state, global search would involve finding a trajectory in MG from the induced initial module (the unique Ms such that Ms(s) = 1) to the goal module (Mg(g) = 1). The result of this search will be a global directive across modules Ms →· · · →Mg. Subsequently, local planning sub-tasks are solved within each module in order to “fill in the details”. For each module transition Mi →Mj in MG, a local search in Mi is accomplished by planning from an entrance state from the previous module, and planning until an exit state for module Mj is entered. This algorithm is illustrated in Figure 1. By minimizing the sum of the global L(P|MG) and local DLs L(P|Mi), we establish the optimal modularization M∗of a state-space for planning: M∗:= arg min M [L(P|M) + L(M)] , where L(P|M) := L(P|MG) + X i L(P|Mi) (5) Note that this formulation explicitly trades-off the complexity (measured as DL) of planning at the global level, L(P|MG), i.e. across modules, and at the local level, L(P|Mi), i.e. within individual modules (Fig. 1C-D). In principle, the representational cost of the modularization itself L(M) is also 3 part of the trade-off, but we do not consider it further here for two reasons. First, in the state-spaces considered in this paper, it is dwarfed by the the complexities of planning, L(M) ≪L(P|M) (see the supplementary material for the mathematical characterization of L(M)). Second, it taxes long-term rather than short-term memory, which is at a premium when planning26,27. Importantly, although computing the DL of a modularization seems to pose significant computational challenges by requiring the enumeration of a large number of potential trajectories in the environment (across or within modules), in the supplementary material we show that it can be computed in a relatively straightforward manner (the only nontrivial operation being a matrix inversion) using the theory of finite Markov chains22. 2.4 Planning compression The planning DL L(s, g) for a specific task (s, g) describes the expected difficulty in finding an intervening trajectory v for a task (s, g). For example, in a binary coding scheme where we assign binary sequences to each state, the expected length of string of random 0s and 1s corresponding to a trajectory will be shorter in a modularized compared to a non-modularized representation. Thus, we can examine the relative benefit of an optimal modularization, in the Shannon limit, by computing the ratio of trajectory description lengths in modularized and non-modularized representations of a task or environment28. In line with spatial cognition terminology29, we refer to this ratio as the compression factor of the trajectory. Soho Modularization L(P|M) X i L(P|Mi) L(P|MG) Planning description length (nats) Number of modules G S Flat Planning Global Local L(P) X i L(P|Mi) G Fig. 1 “Explanation” M1 M2 M3 Global Local A B Time · · · s1 g1 · · · s2 g2 · · · s3 g3 Planning
Entropy L(P|M1) L(P|M2) L(P|M3) E F Modularized Planning S/G S G S G S G L(P|MG) G London’s Soho 50m N C D L(P|MG) 0 1 2 3 Entropic centrality (bits) ×104 1 2 3 4 5 6 Degree centrality (#connected states) 4 Degree centrality Entropic centrality (knats) 0 1 2 3 1 3 2 5 6 0.5 1 1.5 2 2.5 3 Compression Factor 0 0.05 0.1 0.15 0.2 0.25 Probability Modularized Soho Trajectories .25 Fraction Soho trajectory compression factor 0 .05 .1 .15 .2 .5 1 1.5 2 2.5 3 EC Euclidean Distance (knats) Within
Modules Across
Modules 0 -1 0 1 2 Within- vs Across-Module -50 0 50 100 Rank Sum Score (larger => more similar) -1 0 1 2 Within- vs Across-Module 0 2000 4000 6000 EC Euclidean Distance Normalized Euclidean dist between EC ordered by module 0 0.5 1 Modules 2 4 6 -1 0 1 2 Within- vs Across-Module -50 0 50 Rank Sum Score (larger => more similar) -1 0 1 2 Within- vs Across-Module 0 2000 4000 6000 Absolute difference in EC Normalized Euclidean dist between EC ordered by module 0 0.5 1 Modules Optimizing Modularization Figure 1. Modularized planning. A. Schematic exhibiting how planning, which could be highly complex using a flat state space representation (left), can be reformulated into a hierarchical planning process via a modularization (center and right). Boxes (circles or squares) show states, lines are transitions (gray: potential transitions, black: transitions considered in current plan). Once the “global directive” has been established by searching in a low-resolution representation of the environment (center), the agent can then proceed to “fill in the details” by solving a series of local planning sub-tasks (right). Formulae along the bottom show the DL of the corresponding planning processes. B. Given a modularization, a serial hierarchical planning process unfolds in time beginning with a global search task followed by local sub-tasks. As each global/local planning task is initiated in series, there is a phasic increase in processing which scales with planning difficulty in the upcoming module as quantified by the local DL, L(P|Mi). C. Map of London’s Soho state-space, streets (lines, with colors coding degree centrality) correspond to states (courtesy of Hugo Spiers). D. Minimum expected planning DL of London’s Soho as a function of the number of modules (minimizing over all modularizations with the given number of modules). Red: global, blue: local, black: total DL. E. Histogram of compression factors of 200 simulated trajectories from randomly chosen start to goal locations in London’s Soho. F. Absolute entropic centrality (EC) differences within and across connected modules in the optimal modularization of the Soho state-space. G. Scatter plot of degree and entropic centralities of all states in the Soho state-space. 4 2.5 Entropic centrality The computation of the planning DL (Section 2.2) makes use of the trajectory entropy matrix H of a Markov chain. Since H is composed of weighted sums of local entropies Hv, it suggests that we can express the contribution of a particular state v to the planning DL by summing its terms for all tasks (s, g). Thus, we define the entropic centrality, Ev, of a state v via Ev = X s,g Dsvg Hv (6) where we have made use of the fundamental tensor of a Markov chain D with components Dsvg = (I −Tg)−1 sv. Note that task priors can easily be incorporated into this definition. The entropic centrality (EC) of a state measures its importance to tasks across the domain and its gradient can serve as a measure of “subgoalness” for the planning process P. Indeed, we observed in simulations that one strategy used by an optimal modularization to minimize planning complexity is to “isolate” planning DL within rather than across modules, such that EC changes more across than within modules (Fig. 1F). This suggests that changes in EC serve as a good heuristic for identifying modules. Furthermore, EC is tightly related to the graph-theoretic notion of degree centrality (DC). When transitions are undirected and are deterministically related to action, degree centrality deg(v) corresponds to the number of states which are accessible from a state v. In such circumstances and assuming a random policy, we have Ev = X s,g Dsvg 1 deg(v) log(deg(v)) (7) The ECs and DCs of all states in a state-space reflecting the topology of London’s Soho are plotted in Fig. 1G and show a strong correlation in agreement with this analysis. In Section 3.2 we test whether this tight relationship, together with the intuition developed above about changes in EC demarcating approximate module boundaries, provides a normative account of recently observed correlations between DC and human hippocampal activity during spatial navigation30. 2.6 Efficient coding in modularized state-spaces In addition to “compressing” the planning process, modularization also enables a neural channel to transmit information (for example, a desired state sequence) in a more efficient pattern of activity using a hierarchical entropy coding strategy31 whereby contextual codewords signaling the entrance to and exit from a module constrain the set of states that can be transmitted to those within a module thus allowing them to be encoded with shorter description lengths according to their relative probabilities28 (i.e. a state that forms part of many trajectory will have a shorter description length than one that does not). Assuming that neurons take advantage of these strategies in an efficient code32, several predictions can be made with regard to the representational characteristics of neuronal populations encoding components of optimally modularized state-spaces. We suggest that the phasic neural responses (known as “start” and “stop” signals) which have been observed to encase learned behavioral sequences in a wide range of control paradigms across multiple species33–36 serve this purpose in modularized control architectures. Our theory makes several predictions regarding the temporal dynamics and population characteristics of these start/stop codes. First, it determines a specific temporal pattern of phasic start/stop activity as an animal navigates using an optimally modularized representation of a state-space. Second, neural representations for the start signals should depend on the distribution of modules, while the stop codes should be sensitive to the distribution of components within a module. Considering the minimum average description length of each of these distribution, we can make predictions regarding how much neural resources (for example, the number of neurons) should be assigned to represent each of these start/stop variables. We verify these predictions in published neural data36,34 in Section 4. 3 Route compression and state-space segmentation in spatial cognition 3.1 Route compression We compared the compression afforded by optimal modularization to a recent behavioral study examining trajectory compression during mental navigation29. In this task, students at the University 5 of Toronto were asked to mentally navigate between a variety of start and goal locations on their campus and the authors computed the (inverse) ratio between the duration of this mental navigation and the typical time it would physically take to walk the same distance. Although mental navigation time was substantially smaller than physical time, it was not simply a constant fraction of it, but instead the ratio of the two (the compression factor) became higher with longer route length (Fig. 2A). In fact, while in the original study only a linear relationship between compression factor and physical route length was considered, reanalysing the data yielded a better fit by a logarithmic function (R2 = 0.69 vs. 0.46). In order to compare our theory with these data, we computed compression factors between the optimally modularized and the non-modularized version of an environment. This was because students were likely to have developed a good knowledge of the campus’ spatial structure, and so we assumed they used an approximately optimal modularization for mental navigation, while the physical walking time could not make use of this modularization and was bound to the original non-modularized topology of the campus. As we did not have access to precise geographical data about the part of the U. Toronto campus that was used in the original experiment, we ran our algorithm on a part of London Soho which had been used in previous studies of human navigation30. Based on 200 simulated trajectories over route lengths of 1 to 10 states, we found that our compression factor showed a similar dependence on route length2 (Fig. 2B) and again was better fit by a logarithmic versus a linear function (R2 = 0.82 vs. 0.72, respectively). Fig. 2 “SpatialCog” vs. Centrality Correlations Route length (states) 2 4 6 8 10 Modularized Soho Simulations R2 = 0.46 R2 = 0.72 Route length (m) 0 200 400 600 800 1000 Compression 0 5 10 15 20 25 30 35 40 Empirical Data (Bonasia et al., 2016) R2 = 0.69 R2 = 0.82 Human Navigated Trajectories Simulated Modularized Trajectories Route length (states) 0 2 4 6 8 10 Compression 0.9 1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 Modularized Soho Simulations R2 = 0.46 R2 = 0.72 Route length (m) 0 200 400 600 800 1000 Compression 0 5 10 15 20 25 30 35 40 Empirical Data (Bonasia et al., 2016) R2 = 0.69 R2 = 0.82 C B A L(P|Mi) Compression factor Compression factor ⇢ Degree Between Closeness 1 0.8 0.6 0.4 0.2 0 Figure 2. Modularized representations for spatial cognition. A. Compression factor as a function of route length for navigating the U. Toronto campus (reproduced from Ref. 29) with linear (grey) and logarithmic fits (blue). B. Compression factors for the optimal modularization in the London Soho environment. C. Spearman correlations between changes in local planning DL, L(P|Mi), and changes in different graph-theoretic measures of centrality. 3.2 Local planning entropy and degree centrality We also modeled a task in which participants, who were trained to be familiar with the environment, navigated between randomly chosen locations in a virtual reality representation of London’s Soho by pressing keys to move through the scenes30. Functional magnetic resonance imaging during this task showed that hippocampal activity during such self-planned (but not guided) navigation correlated most strongly with changes in a topological state “connectedness” measure known as degree centrality (DC, compared to other standard graph-theoretic measures of centrality such as “betweenness” and “closeness”). Although changes in DC are not directly relevant to our theory, we can show that they serve as a good proxy for a fundamental quantity in the theory, planning DL (see Eq. 7), which in turn should be reflected in neural activations. To relate the optimal modularization, the most direct prediction of our theory, to neural signals, we made the following assumptions (see also Fig. 1B). 1. Planning (and associated neural activity) occurs upon entering a new module (as once a plan is prepared, movement across the module can be automatic without the need for further planning, until transitioning to a new module). 2. The magnitude of neural activity is related to the local planning DL, L(P|Mi), of the module (as the higher the entropy, the more trajectories need to be considered, likely activating more neurons with different tunings for state transitions, or state-action combinations37, resulting in higher overall 2Note that the absolute scale of our compression factor is different from that found in the experiment because we did not account for the trivial compression that comes from the simple fact that it is just generally faster to move mentally than physically. 6 Fig. 3 “Start/stop” A T-Maze Task Simulated “Task-Responsive” Neurons LEFT LEVER EXPLORE RIGHT LEVER MAG. ENTRY LICK
FREEZE GROOM REST MAG. ENTRY LICK LEFT LEVER RIGHT LEVER LEFT LEVER RIGHT LEVER R B C D E START
SEQUENCE STOP
SEQUENCE 0 0.5 1 1.5 0 5 10 15 0 0.5 1 1.5 0 5 10 15 Gate Start Cue Turn Start Turn End Goal
Arrival 0 0.5 1 1.5 0 5 10 15 0 0.5 1 1.5 0 5 10 15 Gate Start Cue Turn Start Turn End Goal
Arrival Firing Rate (Hz) F Description length (nats) First Final 1 2 3 Start Cue Turn Start Turn End Goal
Arrival Gate Empirical Data Overtrained Before Acquisition Modularization Overtrained (Modularized) Percentage Firing Rate (Hz) Firing Rate (Hz) Figure 3. Neural activities encoding module boundaries. A. T-maze task in which tone determines the location of the reward (reproduced from Ref. 34). Inset: the model’s optimal modularization of the discretized T-maze state-space. Note that the critical junction has been extracted to form its own module which isolates the local planning DL caused by the split in the path. B. Empirical data exhibiting the temporal pattern of task-bracketing in dorsolateral striatal (DLS) neurons. Prior to learning the task, ensemble activity was highly variable both spatially and temporally throughout the behavioral trajectory. Reproduced from Ref. 34. C. Simulated firing rates of “task-responsive” neurons after and before acquiring an optimal modularization. D. The optimal modularization (colored states are in the same module) of a proposed state-space for an operant conditioning task36. Note that the lever pressing sequences form their own modules and thus require specialized start/stop codes. E. Analyses of striatal neurons suggesting that a larger percentage of neurons encoded lever sequence initiations compared to terminations, and that very few encoded both. Reproduced from Ref. 36. F. Description lengths of start/stop codes in the optimal modularization. activity in the population). Furthermore, as before, we also assume that participants were sufficiently familiar with Soho that they used the optimal modularization (as they were specifically trained in the experiment). Having established that under the optimal modularization entropic centrality (EC) tends to change more across than within modules (Fig. 1F), and also that EC is closely related to DC (Fig. 1G), the theory predicts that neural activity should be timed to changes in DC. Furthermore, the DLs of successive modules along a trajectory will in general be positively correlated with the differences between their DLs (due to the unavoidable “regression to the mean” effect3). Noting that the planning DL of a module is just the (weighted) average EC of its states (see Section 2.5), the theory thus more specifically predicts a positive correlation between neural activity (representing the DLs of modules) and changes in EC and therefore changes in DC – just as seen in experiments. We verified these predictions numerically by quantifying the correlation of changes in each centrality measure used in the experiments with transient changes in local planning complexity as computed in the model (Fig. 2C). Across simulated trajectories, we found that changes in DC had a strong correlation with changes in local planning entropy (mean ρdeg = 0.79) that was significantly higher (p < 10−5, paired t-tests) than the correlation with the other centrality measures. We predict that even higher correlations with neural activity could be achieved if planning DL according to the optimal modularization, rather than DC, was used directly as a regressor in general linear models of the fMRI data. 3Transitioning to a module with larger/smaller DL will cause, on average, a more positive/negative DL change compared to the previous module DL. 7 4 Task-bracketing and start/stop signals in striatal circuits Several studies have examined sequential action selection paradigms and identified specialized taskbracketing33,34 and “start” and “stop” neurons that are invariant to a wide range of motivational, kinematic, and environmental variables36,35. Here, we show that task-bracketing and start/stop signals arise naturally from our model framework in two well-studied tasks, one involving their temporal34 and the other their representational characteristics36. In the first study, as rodents learned to navigate a T-maze (Fig. 3A), neural activity in dorsolateral striatum and infralimbic cortex became increasingly crystallized into temporal patterns known as “task-brackets”34. For example, although neural activity was highly variable before learning; after learning the same neurons phasically fired at the start of a behavioral sequence, as the rodent turned into and out of the critical junction, and finally at the final goal position where reward was obtained. Based on the optimal modularization for the T-maze state-space (Fig. 3A inset), we examined spike trains from a simulated neurons whose firing rates scaled with local planning entropy (see supplementary material) and this showed that initially (i.e. without modularization, Fig. 3C right) the firing rate did not reflect any task-bracketing but following training (i.e. optimal modularization, Fig. 3C left) the activity exhibited clear task-bracketing driven by the initiation or completion of a local planning process. These result show a good qualitative match to the empirical data (Fig. 3B, from Ref. 34) showing that task-bracketing patterns of activity can be explained as the result of module start/stop signaling and planning according to an optimal modular decomposition of the environment. In the second study, rodents engaged in an operant conditioning paradigm in which a sequence of eight presses on a left or right lever led to the delivery of high or low rewards36. After learning, recordings from nigrostriatal circuits showed that some neurons encoded the initiation, and fewer appeared to encode the termination, of these action sequences. We used our framework to compute the optimal modularization based on an approximation to the task state-space (Fig. 3D) in which the rodent could be in many natural behavioral states (red circles) prior to the start of the task. Our model found that the lever action sequences were extracted into two separate modules (blue and green circles). Given a modularization, a hierarchical entropy coding strategy uses distinct neural codewords for the initiation and termination of each module (Section 2.6). Importantly, we found that the description lengths of start codes was longer than that of stop codes (Fig. 3F). Thus, an efficient allocation of neural resources predicts more neurons encoding start than stop signals, as seen in the empirical data (Fig. 3E). Intuitively, more bits are required to encode starts than stops in this state-space due to the relatively high level of entropic centrality of the “rest” state (where many different behaviors may be initiated, red circles) compared to the final lever press state (which is only accessible from the previous Lever press state and where the rodent can only choose to enter the magazine or return to “rest”). These results show that the start and stop codes and their representational characteristics arise naturally from an efficient representation of the optimally modularized state space. 5 Discussion We have developed the first framework in which it is possible to derive state-space modularizations that are directly optimized for the efficiency of decision making strategies and do not require prior knowledge of the optimal policy before computing the modularization. Furthermore, we have identified experimental hallmarks of the resulting modularizations, thereby unifying a range of seemingly disparate results from behavioral and neurophysiological studies within a common, principled framework. An interesting future direction would be to study how modularized policy production may be realized in neural circuits. In such cases, once a representation has been established, neural dynamics at each level of the hierarchy may be used to move along a state-space trajectory via a sequence of attractors with neural adaptation preventing backflow38, or by using fundamentally non-normal dynamics around a single attractor state39. The description length that lies at the heart of the modularization we derived was based on a specific planning algorithm, random search, which may not lead to the modularization that would be optimal for other, more powerful and realistic, planning algorithms. Nevertheless, in principle, our approach is general in that it can take any planning algorithm as the component that generates description lengths, including hybrid algorithms that combine model-based and model-free techniques that likely underlie animal and human decision making40. 8 References 1. Lashley K. In: Jeffress LA, editor. Cerebral Mechanisms in Behavior, New York: Wiley, pp 112–147. 1951. 2. Simon H, Newell A. Human Problem Solving. Longman Higher Education, 1971. 3. Sutton R, Barto A. Reinforcement Learning: An Introduction. MIT Press, 1998. 4. Stachenfeld K et al. Advances in Neural Information Processing Systems, 2014. 5. Moore AW et al. IJCAI International Joint Conference on Artificial Intelligence 2:1318–1321, 1999. 6. Lengyel M, Dayan P. Advances in Neural Information Processing Systems, 2007. 7. Dayan P, Hinton G. Advances in Neural Information Processing Systems, 1992. 8. Parr R, Russell S. Advances in Neural Information Processing Systems, 1997. 9. Sutton R et al. Artificial Intelligence 112:181 – 211, 1999. 10. Hauskrecht M et al. In: Uncertainty in Artificial Intelligence. 1998. 11. Rothkopf CA, Ballard DH. Frontiers in Psychology 1:1–13, 2010. 12. Huys QJM et al. Proceedings of the National Academy of Sciences 112:3098–3103, 2015. 13. Gershman SJ et al. Journal of Neuroscience 29:13524–31, 2009. 14. Schapiro AC et al. Nature Neuroscience 16:486–492, 2013. 15. Foster D, Dayan P. Machine Learning pp 325–346, 2002. 16. Solway A et al. PLoS Computational Biology 10:e1003779, 2014. 17. Littman ML et al. Journal of Artificial Intelligence Research 9:1–36, 1998. 18. Boutilier C et al. Journal of Artificial Intelligence Research 11:1–94, 1999. 19. Singh SP et al. Advances in Neural Information Processing Systems, 1995. 20. Kim KE, Dean T. Artificial Intelligence 147:225–251, 2003. 21. Simsek O, Barto AG. Advances in Neural Information Processing Systems, 2008. 22. Kemeny JG, Snell JL. Finite Markov Chains. Springer-Verlag, 1983. 23. Balasubramanian V. Neural Computation 9:349–368, 1996. 24. Rissanen J. Information and Complexity in Statistical Modeling. Springer, 2007. 25. Kafsi M et al. IEEE Transactions on Information Theory 59:5577–5583, 2013. 26. Todd M et al. Advances in Neural Information Processing Systems, 2008. 27. Otto AR et al. Psychological Science 24:751–61, 2013. 28. MacKay D. Information Theory, Inference, and Learning Algorithms. Cambridge University Press, 2003. 29. Bonasia K et al. Hippocampus 26:9–12, 2016. 30. Javadi AH et al. Nature Communications in press, 2016. 31. Rosvall M, Bergstrom CT. Proceedings of the National Academy of Sciences 105:1118–1123, 2008. 32. Ganguli D, Simoncelli E. Neural Computation 26:2103–2134, 2014. 33. Barnes TD et al. Nature 437:1158–61, 2005. 34. Smith KS, Graybiel AM. Neuron 79:361–374, 2013. 35. Fujii N, Graybiel AM. Science 301:1246–1249, 2003. 36. Jin X, Costa RM. Nature 466:457–462, 2010. 37. Stalnaker TA et al. Frontiers in Integrative Neuroscience 4:12, 2010. 38. Russo E et al. New Journal of Physics 10, 2008. 39. Hennequin G et al. Neuron 82:1394–406, 2014. 40. Daw ND et al. Nature Neuroscience 8:1704–11, 2005. 9 | 2016 | 42 |
6,350 | Phased Exploration with Greedy Exploitation in Stochastic Combinatorial Partial Monitoring Games Sougata Chaudhuri Department of Statistics University of Michigan Ann Arbor sougata@umich.edu Ambuj Tewari Department of Statistics and Department of EECS University of Michigan Ann Arbor tewaria@umich.edu Abstract Partial monitoring games are repeated games where the learner receives feedback that might be different from adversary’s move or even the reward gained by the learner. Recently, a general model of combinatorial partial monitoring (CPM) games was proposed [1], where the learner’s action space can be exponentially large and adversary samples its moves from a bounded, continuous space, according to a fixed distribution. The paper gave a confidence bound based algorithm (GCB) that achieves O(T 2/3 log T) distribution independent and O(log T) distribution dependent regret bounds. The implementation of their algorithm depends on two separate offline oracles and the distribution dependent regret additionally requires existence of a unique optimal action for the learner. Adopting their CPM model, our first contribution is a Phased Exploration with Greedy Exploitation (PEGE) algorithmic framework for the problem. Different algorithms within the framework achieve O(T 2/3√log T) distribution independent and O(log2 T) distribution dependent regret respectively. Crucially, our framework needs only the simpler “argmax” oracle from GCB and the distribution dependent regret does not require existence of a unique optimal action. Our second contribution is another algorithm, PEGE2, which combines gap estimation with a PEGE algorithm, to achieve an O(log T) regret bound, matching the GCB guarantee but removing the dependence on size of the learner’s action space. However, like GCB, PEGE2 requires access to both offline oracles and the existence of a unique optimal action. Finally, we discuss how our algorithm can be efficiently applied to a CPM problem of practical interest: namely, online ranking with feedback at the top. 1 Introduction Partial monitoring (PM) games are repeated games played between a learner and an adversary over discrete time points. At every time point, the learner and adversary each simultaneously select an action, from their respective action sets, and the learner gains a reward, which is a function of the two actions. In PM games, the learner receives limited feedback, which might neither be adversary’s move (full information games) nor the reward gained (bandit games). In stochastic PM games, adversary generates actions which are independent and identically distributed according to a distribution fixed before the start of the game and unknown to the learner. The learner’s objective is to develop a learning strategy that incurs low regret over time, based on the feedback received during the course of the game. Regret is defined as the difference between cumulative reward of the learner’s strategy and the best fixed learner’s action in hindsight. The usual learning strategies in online games combine some form of exploration (getting feedback on certain learner’s actions) and exploitation (playing the perceived optimal action based on current estimates). 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Starting with early work in the 2000s [2, 3], the study of finite PM games reached a culmination point with a comprehensive and complete classification [4]. We refer the reader to these works for more references and also note that newer results continue to appear [5]. Finite PM games restrict both the learner’s and adversary’s action spaces to be finite, with a very general feedback model. All finite partial monitoring games can be classified into one of four categories, with minimax regret Θ(T), Θ(T 2/3), Θ(T 1/2) and Θ(1). The classification is governed by global and local observability properties pertaining to a game [4]. Another line of work has extended traditional multi-armed bandit problem (MAB) [6] to include combinatorial action spaces for learner (CMAB) [7, 8]. The combinatorial action space can be exponentially large, rendering traditional MAB algorithms designed for small finite action spaces, impractical with regret bounds scaling with size of action space. The CMAB algorithms exploit a finite subset of base actions, which are specific to the structure of problem at hand, leading to practical algorithms and regret bounds that do not scale with, or scale very mildly with, the size of the learner’s action space. While finite PM and CMAB problems have witnessed a lot of activity, there is only one paper [1] on combinatorial partial monitoring (CPM) games, to the best of our knowledge. In that paper, the authors combined the combinatorial aspect of CMAB with the limited feedback aspect of finite PM games, to develop a CPM model. The model extended PM games to include combinatorial action spaces for learner, which might be exponentially large, and infinite action spaces for the adversary. Neither of these situations can be handled by generic algorithms for finite PM games. Specifically, the model considered an action space X for the learner, that has a small subset of actions defining a global observable set (see Assumption 2 in Section 2). The adversary’s action space is a continuous, bounded vector space with the adversary sampling moves from a fixed distribution over the vector space. The reward function considered is a general non-linear function of learner’s and adversary’s actions, with some restrictions (see Assumptions 1 & 3 in Section 2). The model incorporated a linear feedback mechanism where the feedback received is a linear transformation of adversary’s move. Inspired by the classic confidence bound algorithms for MABs, such as UCB [6], the authors proposed a Global Confidence Bound (GCB) algorithm that enjoyed two types of regret bound. The first one was a distribution independent O(T 2/3 log T) regret bound and the second one was a distribution dependent O(log T) regret bound. A distribution dependent regret bound involves factors specific to the adversary’s fixed distribution, while distribution independent means the regret bound holds over all possible distributions in a broad class of distributions. Both bounds also had a logarithmic dependence on |X|. The algorithm combined online estimation with two offline computational oracles. The first oracle finds the action(s) achieving maximum value of reward function over X, for a particular adversary action (argmax oracle), and the second oracle finds the action(s) achieving second maximum value of reward function over X, for a particular adversary action (arg-secondmax oracle). Moreover, the distribution dependent regret bound requires existence of a unique optimal learner action. The inspiration for the CPM model came from various applications like crowdsourcing and matching problems like matching products with customers. Our Contributions. We adopt the CPM model proposed earlier [1]. However, instead of using upper confidence bound techniques, our work is motivated by another classic technique developed for MABs, namely that of forced exploration. This technique was already used in the classic paper of Robbins [9] and has also been called “forcing with certainty equivalence” in the control theory literature [10]. We develop a Phased Exploration with Greedy Exploitation (PEGE) algorithmic framework (Section 3) borrowing the PEGE terminology from work on linearly parameterized bandits [11]. When the framework is instantiated with different parameters, it achieves O(T 2/3√log T) distribution independent and O(log2 T) distribution dependent regret. Significantly, the framework combines online estimation with only the argmax oracle from GCB, which is a practical advantage over requiring an additional arg-secondmax oracle. Moreover, the distribution dependent regret does not require existence of unique optimal action. Uniqueness of optimal action can be an unreasonable assumption, especially in the presence of a combinatorial action space. Our second contribution is another algorithm PEGE2 (Section 4) that combines a PEGE algorithm with Gap estimation, to achieve a distribution dependent O(log T) regret bound, thus matching the GCB regret guarantee in terms of T and gap. Here, gap refers to the difference between expected reward of optimal and second optimal learner’s actions. However, like GCB, PEGE2 does require access to both the oracles, existence of unique optimal action for O(log T) regret and its regret is never larger than O(T 2/3 log T) when there is no unique optimal action. A crucial advantage of PEGE and PEGE2 over GCB is that all our regret bounds are independent of |X|, only depending on the size of the 2 small global observable set. Thus, though we have adopted the CPM model [1], our regret bounds are meaningful for countably infinite or even continuous learner’s action space, whereas GCB regret bound has an explicit logarithmic dependence on |X|. We provide a detailed comparison of our work with the GCB algorithm in Section 5. Finally, we discuss how our algorithms can be efficiently applied in the CPM problem of online ranking with feedback restricted to top ranked items (Section 6), a problem already considered [12] but analyzed in a non-stochastic setting. 2 Preliminaries and Assumptions The online game is played between a learner and an adversary, over discrete rounds indexed by t = 1, 2, . . .. The learner’s action set is denoted as X which can be exponentially large. The adversary’s action set is the infinite set [0, 1]n. The adversary fixes a distribution p on [0, 1]n before start of the game (adversary’s strategy), with p unknown to the learner. At each round of the game, adversary samples θ(t) ∈[0, 1]n according to p, with Eθ(t)∼p[θ(t)] = θ∗ p. The learner chooses x(t) ∈X and gets reward r(x(t), θ(t)). However, the learner might not get to know either θ(t) (as in a full information game) or r(x(t), θ(t)) (as in a bandit game). In fact, the learner receives, as feedback, a linear transformation of θ(t).That is, every action x ∈X has an associated transformation matrix Mx ∈Rmx×n. On playing action x(t), the learner receives a feedback Mx(t) · θ(t) ∈Rmx. Note that the game with the defined feedback mechanism subsumes full information and bandit games. Mx = In×n, ∀x makes it a full information game since Mx · θ = θ. If r(x, θ) = x · θ, then Mx = x ∈Rn makes it a bandit game. The dimension n, action space X, reward function r(·, ·) and transformation matrices Mx, ∀x ∈X are known to the learner. The goal of the learner is to minimize the expected regret, which, for a given time horizon T, is: R(T) = T · max x∈X E[r(x, θ)] − T X t=1 E[r(x(t), θ(t))] (1) where the expectation in the first term is taken over θ, w.r.t. distribution p, and the second expectation is taken over θ and possible randomness in the learner’s algorithm. Assumption 1. (Restriction on Reward Function) The first assumption is that Eθ∼p[r(x, θ)] = ¯r(x, θ∗ p), for some function ¯r(·, ·). That is, the expected reward is a function of x and θ∗ p, which is always satisfied if r(x, θ) is a linear function of θ, or if distribution p happens to be any distribution with support [0, 1]n and fully parameterized by its mean θ∗ p. With this assumption, the expected regret becomes: R(T) = T · ¯r(x∗, θ∗ p) − T X t=1 E[¯r(x(t), θ∗ p)]. (2) For distribution dependent regret bounds, we define gaps in expected rewards: Let x∗∈S(θ∗ p) = argmaxx∈X ¯r(x, θ∗ p). Then ∆x = ¯r(x∗, θ∗ p) −¯r(x, θ∗ p) , ∆max = max{∆x : x ∈X} and ∆= min{∆x : x ∈X, ∆x > 0}. Assumption 2. (Existence of Global Observable Set) The second assumption is on the existence of a global observable set, which is a subset of learner’s action set and is required for estimating an adversary’s move θ. The global observable set is defined as follows: for a set of actions σ = {x1, x2, . . . , x|σ|} ⊆X, let their transformation matrices be stacked in a top down fashion to obtain a R P|σ| i=1 mxi×n dimensional matrix Mσ. σ is said to be a global observable set if Mσ has full column rank, i.e., rank(Mσ) = n. Then, the Moore-Penrose pseudoinverse M + σ satisfies M + σ Mσ = In×n. Without the assumption on the existence of global observable set, it might be the case that even if the learner plays all actions in X on same θ, the learner might not be able to recover θ (as M + σ Mσ = In×n will not hold without full rank assumption). In that case, learner might not be able to distinguish between θ∗ p1 and θ∗ p2, corresponding to two different adversary’s strategies. Then, with non-zero probability, the learner can suffer Ω(T) regret and no learner strategy can guarantee a sub-linear in T regret (the intuition forms the base of the global observability condition in [2]). Note that the size of the global observable set is small, i.e., |σ| ≤n. A global observable set can be found by including an action x in σ if it strictly increases the rank of Mσ, till the rank reaches n. There can, of course, be more than one global observable set. 3 Assumption 3. (Lipschitz Continuity of Expected Reward Function) The third assumption is on the Lipschitz continuity of expected reward function in its second argument. More precisely, it is assumed that ∃R > 0 such that ∀x ∈X, for any θ1 and θ2, |¯r(x, θ1) −¯r(x, θ2)| ≤R∥θ1 −θ2∥2. This assumption is reasonable since otherwise, a small error in estimation of mean reward vector θ∗ p can introduce a large change in expected reward, leading to difficulty in controlling regret over time. The Lipschitz condition holds trivially for expected reward functions which are linear in second argument. The continuity assumption, along with the fact that adversary’s moves are in [0, 1]n, implies boundedness of expected reward for any learner’s action and any adversary’s action. We denote Rmax = maxx∈X,θ∈[0,1]n ¯r(x, θ). The three assumptions above will be made throughout. However, the fourth assumption will only be made in a subset of our results. Assumption 4. (Unique Optimal Action) The optimal action x∗= argmaxx∈X ¯r(x, θ∗ p) is unique. Denote a second best action (which may not be unique) by x∗ −= argmaxx∈X,x̸=x∗¯r(x, θ∗ p). Note that ∆= ¯r(x∗, θ∗ p) −¯r(x∗ −, θ∗ p). 3 Phased Exploration with Greedy Exploitation Algorithm 1 (PEGE) uses the classic idea of doing exploration in phases that are successively further apart from each other. In between exploration phases, we select action greedily by completely trusting the current estimates. The constant β controls how much we explore in a given phase and the constant α along with the function C(·) determines how much we exploit. This idea is classic in the bandit literature [9–11] but has not been applied to the CPM framework to the best of our knowledge. Algorithm 1 The PEGE Algorithmic Framework 1: Inputs: α, β and function C(·) (to determine amount of exploration/exploitation in each phase). 2: For b = 1, 2, . . . , 3: Exploration 4: For i = 1 to |σ| (σ is global observable set) 5: For j = 1 to bβ 6: Let tj,i = t and θ(tj,i, b) = θ(t) where t is current time point 7: Play xi ∈σ and get feedback Mxi · θ(tj,i, b) ∈Rmxi . 8: End For 9: End For 10: Estimation 11: ˜θj,i = M + σ (Mx1 · θ(tj,1, i), . . . , Mx|σ| · θ(tj,|σ|, i)) ∈Rn. 12: ˆθ(b) = Pb i=1 Piβ j=1 ˜θj,i Pb j=1 jβ ∈Rn. 13: x(b) ∈argmaxx∈X ¯r(x, ˆθ(b)). 14: Exploitation 15: For i = 1 to exp(C(bα)) 16: Play x(b). 17: End For 18: End For It is easy to see that the estimators in Algorithm 1 have the following properties: Ep[˜θj,i] = M + σ (Mx1 · θ∗ p, . . . , Mx|σ| · θ∗ p) = M + σ Mσ · θ∗ p = θ∗ p and hence Ep[ˆθ] = θ∗ p. Using the fact that M + σ = (M ⊤ σ Mσ)−1M ⊤ σ , we also have the following bound on estimation error of θ∗ p: ∥˜θj,i −θ∗ p∥2 ≤∥M + σ (Mx1 · θ(tj,1, i), . . . , Mx|σ| · θ(tj,|σ|, i)) −M + σ Mσθ∗ p∥2 = ∥(M ⊤ σ Mσ)−1 |σ| X k=1 M ⊤ xkMxk · (θ(tj,k, i) −θ∗ p)∥2 ≤√n |σ| X k=1 ∥(M ⊤ σ Mσ)−1M ⊤ xkMxk∥2 =: βσ (3) 4 where the constant βσ defined above depends only on the structure of the linear transformation matrices of the global observer set and not on adversary strategy p. Our first result is about the regret of Algorithm 1 when within phase number b, the exploration part spends |σ| rounds (constant w.r.t. b) and the exploitation part grows polynomially with b. Theorem 1. (Distribution Independent Regret) When Algorithm 1 is initialized with the parameters C(a) = log a, α = 1/2 and β = 0, and the online game is played over T rounds, we get the following bound on expected regret: R(T) ≤Rmax|σ|T 2/3 + 2RβσT 2/3p log 2e2 + 2 log T + Rmax (4) where βσ is the constant as defined in Eq. 3. Our next result is about the regret of Algorithm 1 when within phase number b, the exploration part spends |σ| · b rounds (linearly increasing with b) and the exploitation part grows exponentially with b. Theorem 2. (Distribution Dependent Regret) When Algorithm 1 is initialized with the parameters C(a) = h · a, for a tuning parameter h > 0, α = 1 and β = 1, and the online game is played over T rounds, we get the following bound on expected regret: R(T) ≤ X x∈σ ∆x log T h 2 + 4 √ 2πe2R∆maxβσ ∆ e h2(2R2β2 σ) ∆2 . (5) Such an explicit bound for a PEGE algorithm that is polylogarithmic in T and explicitly states the multiplicative and additive constants involved in not known, to the best of our knowledge, even in the bandit literature (e.g., earlier bounds [10] are asymptotic) whereas here we prove it in the CPM setting. Note that the additive constant above, though finite, blows up exponentially fast as ∆→0 for a fixed h. It is well behaved however, if the tuning parameter h is on the same scale as ∆. This line of thought motivates us to estimate the gap to within constant factors and then feed that estimate into a PEGE algorithm. This is what we will do in the next section. 4 Combining Gap Estimation with PEGE Algorithm 2 tries to estimate the gap ∆to within a constant multiplicative factor. However, if there is no unique optimal action or when the true gap is small, gap estimation can take a very large amount of time. To prevent that from happening, the algorithm also takes in a threshold T0 as input and definitely stops if the threshold is reached. The result below assures us that, with high probability, the algorithm behaves as expected. That is, if there is a unique optimal action and the gap is large enough to be estimated with a given confidence before the threshold T0 kicks in, it will output an estimate ˆ∆in the range [0.5∆, 1.5∆]. On the other hand, if there is no unique optimal action, it does not generate an estimate of ∆and instead runs out of the exploration budget T0. Theorem 3. (Gap Estimation within Constant Factors) Let T0 ≥1 and δ ∈(0, 1) and define T1(δ) = 256R2β2 σ ∆2 log 512e2R2β2 σ ∆2δ , T2(δ) = 16R2β2 σ ∆2 log 4e2 δ . Consider Algorithm 2 run with w(b) = s R2β2 σ log( 4e2b2 δ ) b . (6) Then, the following 3 claims hold. 1. Suppose Assumption 4 holds and T1(δ) < T0. Then with probability at least 1 −δ, Algorithm 2 stops in T1(δ) episodes and outputs an estimate ˆ∆that satisfies 1 2∆≤ˆ∆≤3 2∆. 2. Suppose Assumption 4 holds and T0 ≤T1(δ). Then with probability at least 1 −δ, the algorithm either outputs “threshold exceeded” or outputs an estimate ˆ∆that satisfies 1 2∆≤ˆ∆≤3 2∆. Furthermore, if it outputs ˆ∆, it must be the case that the algorithm stopped at an episode b such that T2(δ) < b < T0. 3. Suppose Assumption 4 fails. Then, with probability at least 1 −δ, Algorithm 2 stops in T0 episodes and outputs “threshold exceeded”. 5 Algorithm 2 Algorithm for Gap Estimation 1: Inputs: T0 (exploration threshold) and δ (confidence parameter) 2: For b = 1, 2, ..., 3: Exploration 4: For i = 1 to |σ| 5: (Denote) ti = t and θ(ti, b) = θ(t) (t is current time point). 6: Play xi ∈σ and get feedback Mxi · θ(ti, b) ∈Rmxi . 7: End For 8: Estimation 9: ˜θb = M + σ (Mx1 · θ(t1, b), . . . , Mx|σ| · θ(t|σ|, b)) ∈Rn. 10: ˆθ(b) = Pb i=1 ˜θi b ∈Rn. 11: Stopping Rule (w(b) is defined as in Eq. (6)) 12: If argmaxx∈X ¯r(x, ˆθ(b)) is unique: 13: ˆx(b) = argmaxx∈X ¯r(x, ˆθ(b)) 14: ˆx−(b) = argmaxx∈X,x̸=ˆx(b) ¯r(x, ˆθ(b)) (need not be unique) 15: If ¯r(ˆx(b), ˆθ(b)) −¯r(ˆx−(b), ˆθ(b)) > 6w(b): 16: STOP and output ˆ∆= ¯r(ˆx(b), ˆθ(b)) −¯r(ˆx−(b), ˆθ(b)) 17: End If 18: End If 19: If b > T0: 20: STOP and output “threshold exceeded” 21: End If 22: End For Equipped with Theorem 3, we are now ready to combine Algorithm 2 with Algorithm 1 to give Algorithm 3. Algorithm 3 first calls Algorithm 2. If Algorithm 2 outputs an estimate ˆ∆it is fed into Algorithm 1. If the threshold T0 is exceeded, then the remaining time is spent in pure exploitation. Note that by choosing T0 to be of order T 2/3 we can guarantee a worst case regret of the same order even when unique optimality assumption fails. For PM games that are globally observable but not locally observable, such a distribution independent O(T 2/3) bound is known to be optimal [4]. Theorem 4. (Regret Bound for PEGE2) Consider Algorithm 3 run with knowledge of the number T of rounds. Consider the distribution independent bound B1(T) = 2(2Rβσ|σ|2R2 maxT)2/3p log(4e2T 3) + Rmax, and the distribution dependent bound B2(T) = 256R2β2 σ ∆2 log 512e2R2β2 σT ∆2 Rmax|σ| + X x∈σ ∆x 36R2β2 σ log T ∆2 + 8e2R2β2 σ ∆2 + Rmax. If Assumption 4 fails, then the expected regret of Algorithm 3 is bounded as R(T) ≤B1(T). If Assumption 4 holds, then the expected regret of Algorithm 3 is bounded as R(T) ≤ B2(T) if T1(δ) < T0 O(T 2/3 log T) if T0 ≤T1(δ) , (7) where T1(δ) is as defined in Theorem 3 and δ, T0 are as defined in Algorithm 3. In the above theorem, note that T1(δ) scales as Θ( 1 ∆2 log T ∆2 ) and T0 as Θ(T 2/3). Thus, the two cases in Eq. (7) correspond to large gap and small gap situations respectively. 5 Comparison with GCB Algorithm We provide a detailed comparison of our results with those obtained for GCB [1]. (a) While we use the same CPM model, our solution is inspired by the forced exploration technique while GCB 6 Algorithm 3 Algorithm Combining PEGE with Gap Estimation (PEGE2) 1: Input: T (total number of rounds) 2: Call Algorithm 2 with inputs T0 = 2RβσT |σ|Rmax 2/3 and δ = 1/T 3: If Algorithm 2 returns “threshold exceeded”: 4: Let ˆθ(T0) be the latest estimate of θ∗ p maintained by Algorithm 2 5: Play ˆx(T0) = argmaxx∈X ¯r(x, ˆθ) for the remaining T −T0|σ| rounds 6: Else: 7: Let ˆ∆be the gap estimate produced by Algorithm 2 8: For all remaining time steps, run Algorithm 1 with parameters C(a) = ha with h = ˆ∆2 9R2β2σ , α = 1, β = 0 9: End If is inspired by the confidence bound technique, both of which are classic in the bandit literature. (b) One instantiation of our PEGE framework gives an O(T 2/3√log T) distribution independent regret bound (Theorem 1), which does not require call to arg-secondmax oracle. This is of substantial practical advantage over GCB since even for linear optimization problems over polyhedra, standard routines usually do not have option of computing action(s) that achieve second maximum value for the objective function. (c) Another instantiation of the PEGE framework gives an O(log2 T) distribution dependent regret bound (Theorem 2), which neither requires call to arg-secondmax oracle nor the assumption of existence of unique optimal action for learner. This is once again important, since the assumption of existence of unique optimal action might be impractical, especially for exponentially large action space. However, the caveat is that improper setting of the tuning parameter h in Theorem 2 can lead to an exponentially large additive component in the regret. (d) A crucial point, which we had highlighted in the beginning, is that the regret bounds achieved by PEGE and PEGE2 do not have dependence on size of learner’s action space, i.e., |X|. The dependence is only on the size of global observable set σ, which is guaranteed to be not more than dimension of adversary’s action space. Thus, though we have adopted the CPM model [1], our algorithms achieve meaningful regret bounds for countably infinite or even continuous learner’s action space. In contrast, the GCB regret bounds have explicit, logarithmic dependence on size of learner’s action space. Thus, their results cannot be extended to problems with infinite learner’s action space (see Section 6 for an example), and are restricted to large, but finite action spaces. (e) The PEGE2 algorithm is a true analogue of the GCB algorithm, matching the regret bounds of GCB in terms of T and gap ∆with the advantage that it has no dependence on |X|. The disadvantage, however, is that PEGE2 requires knowledge of time horizon T, while GCB is an anytime algorithm. It remains an open problem to design an algorithm that combines the strengths of PEGE2 and GCB. 6 Application to Online Ranking A recent paper studied the problem of online ranking with feedback restricted to top ranked items [12]. The problem was studied in a non-stochastic setting, i.e., it was assumed that an oblivious adversary generates reward vectors. Moreover, the learner’s action space was exponentially large in number of items to be ranked. The paper made the connection of the problem setting to PM games (but not combinatorial PM games) and proposed an efficient algorithm for the specific problem at hand. However, a careful reading of the paper shows that their algorithmic techniques can handle the CPM model we have discussed so far, but in the non-stochastic setting. The reward function is linear in both learner’s and adversary’s moves, adversary’s move is restricted to a finite space of vectors and feedback is a linear transformation of adversary’s move. In this section, we give a brief description of the problem setting and show how our algorithms can be used to efficiently solve the problem of online ranking with feedback on top ranked items in the stochastic setting. We also give an example of how the ranking problem setting can be somewhat naturally extended to one which has continuous action space for learner, instead of large but finite action space. The paper considered an online ranking problem, where a learner repeatedly re-ranks a set of n, fixed items, to satisfy diverse users’ preferences, who visit the system sequentially. Each learner action x 7 is a permutation of the n items. Each user has like/dislike preference for each item, varying between users, with each user’s preferences encoded as an n length binary relevance vector θ. Once the ranked list of items is presented to the user, the user scans through the items, but gives relevance feedback only on top ranked item. However, the performance of the learner is judged based on full ranked list and unrevealed, full relevance vector. Thus, we have a PM game, where neither adversary generated relevance vector nor reward is revealed to learner. The paper showed how a number of practical ranking measures, like Discounted Cumulative Gain (DCG), can be expressed as a linear function, i.e., r(x, θ) = f(x) · θ. The practical motivation of the work was based on learning a ranking strategy to satisfy diverse user preferences, but with limited feedback received due to user burden constraints and privacy concerns. Online Ranking with Feedback at Top as a Stochastic CPM Game. We show how our algorithms can be applied in online ranking with feedback for top ranked items by showing how it is a specific instance of the CPM model and how our key assumptions are satisfied. The learner’s action space is the finite but exponentially large space of X = n! permutations. Adversary’s move is an n dimensional relevance vector, and thus, is restricted to {0, 1}n (finite space of size 2n) contained in [0, 1]n. In the stochastic setting, we can assume that adversary samples θ ∈{0, 1}n from a fixed distribution on the space. Since the feedback on playing a permutation is the relevance of top ranked item, each move x has an associated transformation matrix (vector) Mx ∈{0, 1}n, with 1 in the place of the item which is ranked at the top by x and 0 everywhere else. Thus, Mx · θ gives the relevance of item ranked at the top by x. The global observable set σ is the set of any n actions, where each action, in turn, puts a distinct item on top. Hence, Mσ is the n × n dimensional permutation matrix. Assumption 1 is satisfied because the reward function is linear in θ and ¯r(x, θ∗ p) = f(x) · θ∗ p, where Ep[θ] = θ∗ p ∈[0, 1]n. Assumption 2 is satisfied since there will always be a global observable set of size n and can be found easily. In fact, there will be multiple global observable sets, with the freedom to choose any one of them. Assumption 3 is satisfied due to the expected reward function being linear in second argument. The Lipschitz constant is maxx∈X ∥f(x)∥2, which is always less than some small polynomial factor of n, depending on specific f(·). The value of βσ can be easily seen to be n3/2. The argmax oracle returns the permutation which simply sorts items according to their corresponding θ values. The arg-secondmax oracle is more complicated, though feasible. It requires first sorting the items according to θ and then compare each pair of consecutive items to see where least drop in reward value occurs and switch the corresponding items. Likely Failure of Unique Optimal Action Assumption. Assumption 4 is unlikely to hold in this problem setting (though of course theoretically possible). The mean relevance vector θ∗ p effectively reflects the average preference of all users for each of the n items. It is very likely that at least a few items will not be liked by anyone and which will ultimately be always ranked at the bottom. Equally possible is that two items will have same user preference on average, and can be exchanged without hurting the optimal ranking. Thus, existence of an unique optimal ranking, which indicates that each item will have different average user preference than every other item, is unlikely. Thus, PEGE algorithm can still be applied to get poly-logarithmic regret (Theorem 2), but GCB will only achieve O(T 2/3 log T) regret. A PM Game with Infinite Learner Action Space. We give a simple modification of the ranking problem above to show how the learner can have continuous action space. The learner now ranks the items by producing an n dimensional score vector x ∈[0, 1]n and sorting items according to their scores. Thus the learner’s action space is now an uncountably infinite continuous space. As before, the user gets to see the ranked list and gives relevance feedback on top ranked item. The learner’s performance will now be judged by a continuous loss function, instead of a discrete-valued ranking measure, since its moves are in a continuous space. Consider the simplest loss, viz., the squared “loss” r(x, θ) = −∥x −θ∥2 2 (note -ve sign to keep reward interpetation). It can be easily seen that ¯r(x, θ∗ p) = Eθ∼p[r(x, θ)] = −∥x∥2 2 + 2x · θ∗ p −1 · θ∗ p, if the relevance vectors θ are in {0, 1}n. Thus, the Lipschitz condition is satisfied. The global observable set is still of size n, with the n actions being any n score vectors, whose sorted orders place each of the n items, in turn, on top. βσ remains same as before, with argmaxx Eθ∼pr(x, θ) = Eθ∼p[θ] = θ∗ p. Both PEGE and PEGE2 can achieve meaningful regret bound for this problem, while GCB cannot. Acknowledgements We acknowledge the support of NSF via grants IIS 1452099 and CCF 1422157. 8 References [1] Tian Lin, Bruno Abrahao, Robert Kleinberg, John Lui, and Wei Chen. Combinatorial partial monitoring game with linear feedback and its applications. In Proceedings of the 31th International Conference on Machine Learning, pages 901–909. ACM, 2014. [2] Antonio Piccolboni and Christian Schindelhauer. Discrete prediction games with arbitrary feedback and loss. In Proceedings of the 14th Annual Conference on Computational Learning Theory, pages 208–223. Springer, 2001. [3] Nicolo Cesa-Bianchi, Gábor Lugosi, and Gilles Stoltz. Regret minimization under partial monitoring. Mathematics of Operations Research, pages 562–580, 2006. [4] Gabor Bartok et al. Partial monitoring–classification, regret bounds, and algorithms. Mathematics of Operations Research, 39(4):967–997, 2014. [5] Junpei Komiyama, Junya Honda, and Hiroshi Nakagawa. Regret lower bound and optimal algorithm in finite stochastic partial monitoring. In Advances in Neural Information Processing Systems, pages 1783–1791, 2015. [6] Peter Auer, Nicolo Cesa-Bianchi, and Paul Fischer. Finite-time analysis of the multiarmed bandit problem. Machine Learning, 47(2-3):235–256, 2002. [7] Wei Chen, Yajun Wang, and Yang Yuan. Combinatorial multi-armed bandit: General framework and applications. In Proceedings of the 30th International Conference on Machine Learning, pages 151–159, 2013. [8] Branislav Kveton, Zheng Wen, Azin Ashkan, and Csaba Szepesvari. Tight regret bounds for stochastic combinatorial semi-bandits. In Proceedings of the Eighteenth International Conference on Artificial Intelligence and Statistics, pages 535–543, 2015. [9] Herbert Robbins. Some aspects of the sequential design of experiments. In Herbert Robbins Selected Papers, pages 169–177. Springer, 1985. [10] Rajeev Agrawal and Demosthenis Teneketzis. Certainty equivalence control with forcing: revisited. Systems & Control Letters, 13(5):405–412, 1989. [11] Paat Rusmevichientong and John N Tsitsiklis. Linearly parameterized bandits. Mathematics of Operations Research, 35(2):395–411, 2010. [12] Sougata Chaudhuri and Ambuj Tewari. Online ranking with top-1 feedback. In Proceedings of the 18th International Conference on Artificial Intelligence and Statistics, pages 129–137. ACM, 2015. [13] Thomas P Hayes. A large-deviation inequality for vector-valued martingales. Combinatorics, Probability and Computing, 2005. 9 | 2016 | 420 |
6,351 | Showing versus Doing: Teaching by Demonstration Mark K Ho Department of Cognitive, Linguistic, and Psychological Sciences Brown University Providence, RI 02912 mark_ho@brown.edu Michael L. Littman Department of Computer Science Brown University Providence, RI 02912 mlittman@cs.brown.edu James MacGlashan Department of Computer Science Brown University Providence, RI 02912 james_macglashan@brown.edu Fiery Cushman Department of Psychology Harvard University Cambridge, MA 02138 cushman@fas.harvard.edu Joseph L. Austerweil Department of Psychology University of Wisconsin-Madison Madison, WI 53706 austerweil@wisc.edu Abstract People often learn from others’ demonstrations, and inverse reinforcement learning (IRL) techniques have realized this capacity in machines. In contrast, teaching by demonstration has been less well studied computationally. Here, we develop a Bayesian model for teaching by demonstration. Stark differences arise when demonstrators are intentionally teaching (i.e. showing) a task versus simply performing (i.e. doing) a task. In two experiments, we show that human participants modify their teaching behavior consistent with the predictions of our model. Further, we show that even standard IRL algorithms benefit when learning from showing versus doing. 1 Introduction Is there a difference between doing something and showing someone else how to do something? Consider cooking a chicken. To cook one for dinner, you would do it in the most efficient way possible while avoiding contaminating other foods. But, what if you wanted to teach a completely naïve observer how to prepare poultry? In that case, you might take pains to emphasize certain aspects of the process. For example, by ensuring the observer sees you wash your hands thoroughly after handling the uncooked chicken, you signal that it is undesirable (and perhaps even dangerous) for other ingredients to come in contact with raw meat. More broadly, how could an agent show another agent how to do a task, and, in doing so, teach about its underlying reward structure? To model showing, we draw on psychological research on learning and teaching concepts by example. People are good at this. For instance, when a teacher signals their pedagogical intentions, children more frequently imitate actions and learn abstract functional representations [6, 7]. Recent work has formalized concept teaching as a form of recursive social inference, where a teacher chooses an example that best conveys a concept to a learner, who assumes that the teacher is choosing in this manner [14]. The key insight from these models is that helpful teachers do not merely select 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. probable examples of a concept, but rather choose examples that best disambiguate a concept from other candidate concepts. This approach allows for more effective, and more efficient, teaching and learning of concepts from examples. We can extend these ideas to explain showing behavior. Although recent work has examined userassisted teaching [8], identified legible motor behavior in human-machine coordination [9], and analyzed reward coordination in game theoretic terms [11], previous work has yet to successfully model how people naturally teach reward functions by demonstration. Moreover, in Inverse Reinforcement Learning (IRL), in which an observer attempts to infer the reward function that an expert (human or artificial) is maximizing, it is typically assumed that experts are only doing the task and not intentionally showing how to do the task. This raises two related questions: First, how does a person showing how to do a task differ from them just doing it? And second, are standard IRL algorithms able to benefit from human attempts to show how to do a task? In this paper, we investigate these questions. To do so, we formulate a computational model of showing that applies Bayesian models of teaching by example to the reward function learning setting. We contrast this pedagogical model with a model of doing: standard optimal planning in Markov Decision Processes. The pedagogical model predicts several systematic differences from the standard planning model, and we test whether human participants reproduce these distinctive patterns. For instance, the pedagogical model chooses paths to a goal that best disambiguates which goal is being pursued (Experiment 1). Similarly, when teaching feature-based reward functions, the model will prioritize trajectories that better signal the reward value of state features or even perform trajectories that would be inefficient for an agent simply doing the task (Experiment 2). Finally, to determine whether showing is indeed better than doing, we train a standard IRL algorithm with our model trajectories and human trajectories. 2 A Bayesian Model of Teaching by Demonstration Our model draws on two approaches: IRL [2] and Bayesian models of teaching by example [14]. The first of these, IRL and the related concept of inverse planning, have been used to model people’s theory of mind, or the capacity to infer another agent’s unobservable beliefs and/or desires through their observed behavior [5]. The second, Bayesian models of pedagogy, prescribe how a teacher should use examples to communicate a concept to an ideal learner. Our model of teaching by demonstration, called Pedagogical Inverse Reinforcement Learning, merges these two approaches together by treating a teacher’s demonstration trajectories as communicative acts that signal the reward function that an observer should learn. 2.1 Learning from an Expert’s Actions 2.1.1 Markov Decision Processes An agent that plans to maximize a reward function can be modeled as the solution to a Markov Decision Process (MDP). An MDP is defined by the tuple < S, A, T, R, γ >: a set of states in the world S; a set of actions for each state A(s); a transition function that maps states and actions to next states, T : S × A →S (in this work we assume all transitions are deterministic, but this can be generalized to probabilistic transitions); a reward function that maps states to scalar rewards, R : S →R; and a discount factor γ ∈[0, 1]. Solutions to an MDP are stochastic policies that map states to distributions over actions, π : S →P(A(s)). Given a policy, we define the expected cumulative discounted reward, or value, V π(s), at each state associated with following that policy: V π(s) = Eπ h ∞ X k=0 γkrt+k+1 | st = s i . (1) In particular, the optimal policy for an MDP yields the optimal value function, V ∗, which is the value function that has the maximal value for every state (V ∗(s) = maxπ V π(s), ∀s ∈S). The optimal policy also defines an optimal state-action value function, Q∗(s, a) = Eπ[rt+1 + γV ∗(st+1) | st = s, at = a]. 2 Algorithm 1 Pedagogical Trajectory Algorithm Require: starting states s, reward functions {R1, R2, ..., RN}, transition function T, maximum showing trajectory depth lmax, minimum hypothetical doing probability pmin, teacher maximization parameter α, discount factor γ. 1: Π ←∅ 2: for i = 1 to N do 3: Qi = calculateActionValues(s, Ri, T, γ) 4: πi = softmax(Qi, λ) 5: Π.add(πi) 6: Calculate j = {j : s1 ∈s, length(j) ≤lmax, and ∃π ∈Π s.t. Q (si,ai)∈j π(ai | si) > pmin}. 7: Construct hypothetical doing probability distribution PDoing(j | R) as an N x M array. 8: PObserving(R | j) = PDoing(j|R)P (R) P R′ PDoing(j|R′)P (R′) 9: PShowing(j | R) = PObserving(R|j)α P j′ PObserving(R|j′)α 10: return PShowing(j | R) 2.1.2 Inverse Reinforcement Learning (IRL) In the Reinforcement Learning setting, an agent takes actions in an MDP and receives rewards, which allow it to eventually learn the optimal policy [15]. We thus assume that an expert who knows the reward function and is doing a task selects an action at in a state st according to a Boltzmann policy, which is a standard soft-maximization of the action-values: PDoing(at | st, R) = exp{Q∗(si, ai)/λ} P a′∈A(si) exp{Q∗(si, a′)/λ}. (2) λ > 0 is an inverse temperature parameter (as λ →0, the expert selects the optimal action with probability 1; as λ →∞, the expert selects actions uniformly randomly). In the IRL setting, an observer sees a trajectory of an expert executing an optimal policy, j = {(s1, a1), (s2, a2), ..., (sk, ak)}, and infers the reward function R that the expert is maximizing. Given that an agent’s policy is stationary and Markovian, the probability of the trajectory given a reward function is just the product of the individual action probabilities, PDoing(j | R) = Q t PDoing(at | st, R). From a Bayesian perspective [13], the observer is computing a posterior probability over possible reward functions R: PObserving(R | j) = PDoing(j | R)P(R) P R′ PDoing(j | R′)P(R′). (3) Here, we always assume that P(R) is uniform. 2.2 Bayesian Pedagogy IRL typically assumes that the demonstrator is executing the stochastic optimal policy for a reward function. But is this the best way to teach a reward function? Bayesian models of pedagogy and communicative intent have shown that choosing an example to teach a concept differs from simply sampling from that concept [14, 10]. These models all treat the teacher’s choice of a datum, d, as maximizing the probability a learner will infer a target concept, h: PTeacher(d | h) = PLearner(h | d)α P d′ PLearner(h | d′)α . (4) α is the teacher’s softmax parameter. As α →0, the teacher chooses uniformly randomly; as α →∞, the teacher chooses d that maximally causes the learner to infer a target concept h; when α = 1, the teacher is “probability matching”. The teaching distribution describes how examples can be effectively chosen to teach a concept. For instance, consider teaching the concept of “even numbers”. The sets {2, 2, 2} and {2, 18, 202} are both examples of even numbers. Indeed, given finite options with replacement, they both have the same probability of being randomly chosen as sets of examples. But {2, 18, 202} is clearly better 3 for helpful teaching since a naïve learner shown {2, 2, 2} would probably infer that “even numbers” means “the number 2”. This illustrates an important aspect of successful teaching by example: that examples should not only be consistent with the concept being taught, but should also maximally disambiguate the concept being taught from other possible concepts. 2.3 Pedagogical Inverse Reinforcement Learning To define a model of teaching by demonstration, we treat the teacher’s trajectories in a reinforcementlearning problem as a “communicative act” for the learner’s benefit. Thus, an effective teacher will modify its demonstrations when showing and not simply doing a task. As in Equation 4, we can define a teacher that selects trajectories that best convey the reward function: PShowing(j | R) = PObserving(R | j)α P j′ PObserving(R | j′)α . (5) In other words, showing depends on a demonstrator’s inferences about an observer’s inferences about doing. This model provides quantitative and qualitative predictions for how agents will show and teach how to do a task given they know its true reward function. Since humans are the paradigm teachers and a potential source of expert knowledge for artificial agents, we tested how well our model describes human teaching. In Experiment 1, we had people teach simple goal-based reward functions in a discrete MDP. Even though in these cases entering a goal is already highly diagnostic, different paths of different lengths are better for showing, which is reflected in human behavior. In Experiment 2, people taught more complex feature-based reward functions by demonstration. In both studies, people’s behavior matched the qualitative predictions of our models. 3 Experiment 1: Teaching Goal-based Reward Functions Consider a grid with three possible terminal goals as shown in Figure 1. If an agent’s goal is &, it could take a number of routes. For instance, it could move all the way right and then move upwards towards the & (right-then-up) or first move upwards and then towards the right (up-then-right). But, what if the agent is not just doing the task, but also attempting to show it to an observer trying to learn the goal location? When the goal is &, our pedagogical model predicts that up-then-right is the more probable trajectory because it is more disambiguating. Up-then-right better indicates that the intended goal is & than right-then-up because right-then-up has more actions consistent with the goal being #. We have included an analytic proof of why this is the case for a simpler setting in the supplementary materials. Additionally, our pedagogical model makes the prediction that when trajectory length costs are negligible, agents will engage in repetitive, inefficient behaviors that gesture towards one goal location over others. This “looping” behavior results when an agent can return to a state with an action that has high signaling value by taking actions that have a low signaling “cost” (i.e. they do not signal something other than the true goal). Figure 1d shows an example of such a looping trajectory. In Experiment 1, we tested whether people’s showing behavior reflected the pedagogical model when reward functions are goal-based. If so, this would indicate that people choose the disambiguating path to a goal when showing. 3.1 Experimental Design Sixty Amazon Mechanical Turk participants performed the task in Figure 1. One was excluded due to missing data. All participants completed a learning block in which they had to find the reward location without being told. Afterwards, they were either placed in a Do condition or a Show condition. Participants in Do were told they would win a bonus based on the number of rewards (correct goals) they reached and were shown the text, “The reward is at location X”, where X was one of the three symbols %, #, or &. Those in Show were told they would win a bonus based on how well a randomly matched partner who was shown their responses (and did not know the location of the reward) did on the task. On each round of Show, participants were shown text saying “Show your partner that the reward is at location X”. All participants were given the same sequence of trials in which the reward locations were <%, &, #, &, %, #, %, #, &>. 4 Figure 1: Experiment 1: Model predictions and participant trajectories for 3 trials when the goal is (a) &, (b) %, and (c) #. Model trajectories are the two with the highest probability (λ = 2, α = 1.0, pmin = 10−6, lmax = 4). Yellow numbers are counts of trajectories with the labeled tile as the penultimate state. (d) An example of looping behavior predicted by the model when % is the goal. 3.2 Results As predicted, Show participants tended to choose paths that disambiguated their goal as compared to Do participants. We coded the number of responses on & and % trials that were “showing” trajectories based on how they entered the goal (i.e. out of 3 for each goal). On & trials, entering from the left, and on % trials, entering from above were coded as “showing”. We ran a 2x2 ANOVA with Show vs Do as a between-subjects factor and goal (% vs &) as a repeated measure. There was a main effect of condition (F(1, 57) = 16.17, p < .001; Show: M = 1.82, S.E. 0.17; Do: M = 1.05, S.E. 0.17) as well as a main effect of goal (F(1, 57) = 4.77, p < .05; %-goal: M = 1.73, S.E. = 0.18; &-goal: M = 1.15, S.E. = 0.16). There was no interaction (F(1, 57) = 0.98, p = 0.32). The model does not predict any difference between conditions for the # (lower right) goal. However, a visual analysis suggested that more participants took a “swerving” path to reach #. This observation was confirmed by looking at trials where # was the goal and comparing the number of swerving trials, which was defined as making more than one change in direction (Show: M = 0.83, Do: M = 0.26; two-sided t-test: t(44.2) = 2.18, p = 0.03). Although not predicted by the model, participants may swerve to better signal their intention to move ‘directly’ towards the goal. 3.3 Discussion Reaching a goal is sufficient to indicate its location, but participants still chose paths that better disambiguated their intended goal. Overall, these results indicate that people are sensitive to the distinction between doing and showing, consistent with our computational framework. 4 Experiment 2: Teaching Feature-based Reward Functions Experiment 1 showed that people choose disambiguating plans even when entering the goal makes this seemingly unnecessary. However, one might expect richer showing behavior when teaching more complex reward functions. Thus, for Experiment 2, we developed a paradigm in which showing how to do a task, as opposed to merely doing a task, makes a difference for how well the underlying reward function is learned. In particular, we focused on teaching feature-based reward functions that allow an agent to generalize what it has learned in one situation to a new situation. People often use feature-based representations for generalization [3], and feature-based reward functions have been used extensively in reinforcement learning (e.g. [1]). We used a colored-tile grid task shown in 5 Figure 2: Experiment 2 results. (a) Column labels are reward function codes. They refer to which tiles were safe (o) and which were dangerous (x) with the ordering <orange, purple, cyan>. Row 1: Underlying reward functions that participants either did or showed; Row 2: Do participant trajectories with visible tile colors; Row 3: Show participant trajectories; Row 4: Mean reward function learned from Do trajectories by Maximum-Likelihood Inverse Reinforcement Learning (MLIRL) [4, 12]; Row 5: Mean reward function learned from Show trajectories by MLIRL. (b) Mean distance between learned and true reward function weights for human-trained and model-trained MLIRL. For the models, MLIRL results for the top two ranked demonstration trajectories are shown. Figure 2 to study teaching feature-based reward functions. White tiles are always “safe” (reward of 0), while yellow tiles are always terminal states that reward 10 points. The remaining 3 tile types–orange, purple, and cyan–are each either “safe” or “dangerous” (reward of −2). The rewards associated with the three tile types are independent, and nothing about the tiles themselves signal that they are safe or dangerous. A standard planning algorithm will reach the terminal state in the most efficient and optimal manner. Our pedagogical model, however, predicts that an agent who is showing the task will engage in specific behaviors that best disambiguate the true reward function. For instance, the pedagogical model is more likely to take a roundabout path that leads through all the safe tile types, choose to remain on a safe colored tile rather than go on the white tiles, or even loop repeatedly between multiple safe tile-types. All of these types of behaviors send strong signals to the learner about which tiles are safe as well as which tiles are dangerous. 4.1 Experimental Design Sixty participants did a feature-based reward teaching task; two were excluded due to missing data. In the first phase, all participants were given a learning-applying task. In the learning rounds, they interacted with the grid shown in Figure 2 while receiving feedback on which tiles won or lost points. 6 Figure 3: Experiment 2 normalized median model fits. Safe tiles were worth 0 points, dangerous tiles were worth -2 points, and the terminal goal tile was worth 5 points. They also won an additional 5 points for each round completed for a total of 10 points. Each point was worth 2 cents of bonus. After each learning round, an applying round occurred in which they applied what they just learned about the tiles without receiving feedback in a new grid configuration. They all played 8 pairs of learning and applying rounds corresponding to the 8 possible assignments of “safe” and “dangerous” to the 3 tile types, and order was randomized between participants. As in Experiment 1, participants were then split into Do or Show conditions with no feedback. Do participants were told which colors were safe and won points for performing the task. Show participants still won points and were told which types were safe. They were also told that their behavior would be shown to another person who would apply what they learned from watching the participant’s behavior to a separate grid. The points won would be added to the demonstrator’s bonus. 4.2 Results Responses matched model predictions. Do participants simply took efficient routes, whereas Show participants took paths that signaled tile reward values. In particular, Show participants took paths that led through multiple safe tile types, remained on safe colored tiles when safe non-colored tiles were available, and looped at the boundaries of differently colored safe tiles. 4.2.1 Model-based Analysis To determine how well the two models predicted human behaviors globally, we fit separate models for each reward function and condition combination. We found parameters that had the highest median likelihood out of the set of participant trajectories in a given reward function-condition combination. Since some participants used extremely large trajectories (e.g. >25 steps) and we wanted to include an analysis of all the data, we calculated best-fitting state-action policies. For the standard-planner, it is straightforward to calculate a Boltzmann policy for a reward function given λ. For the pedagogical model, we first need to specify an initial model of doing and distribution over a finite set of trajectories. We determine this initial set of trajectories and their probabilities using three parameters: λ, the softmax parameter for a hypothetical “doing” agent that the model assumes the learner believes it is observing; lmax, the maximum trajectory length; and pmin, the minimum probability for a trajectory under the hypothetical doing agent. The pedagogical model then uses an α parameter that determines the degree to which the teacher is maximizing. State-action probabilities are calculated from a distribution over trajectories using the equation P(a | s, R) = P j P(a | s, j)P(j | R), where P(a | s, j) = |{(s,a):s=st,a=at∀(st,at)∈j}| |{(s,a):s=st∀(st,at)∈j}| . We fit parameter values that produced the maximum median likelihood for each model for each reward function and condition combination. These parameters are reported in the supplementary materials. The normalized median fit for each of these models is plotted in Figure 3. As shown in the figure, the standard planning model better captures behavior in the Do condition, while the pedagogical model better captures behavior in the Show condition. Importantly, even when the standard planning model could have a high λ and behave more randomly, the pedagogical model better fits the Show condition. This indicates that showing is not simply random behavior. 7 4.2.2 Behavioral Analyses We additionally analyzed specific behavioral differences between the Do and Show conditions predicted by the models. When showing a task, people visit a greater variety of safe tiles, visit tile types that the learner has uncertainty about (i.e. the colored tiles), and more frequently revisit states or “loop” in a manner that leads to better signaling. We found that all three of these behaviors were more likely to occur in the Show condition than in the Do condition. To measure the variety of tiles visited, we calculated the entropy of the frequency distribution over colored-tile visits by round by participant. Average entropy was higher for Show (Show: M = 0.50, SE = 0.03; Do: M = 0.39, SE = 0.03; two-sided t-test: t(54.9) = −3.27, p < 0.01). When analyzing time spent on colored as opposed to un-colored tiles, we calculated the proportion of visits to colored tiles after the first colored tile had been visited. Again, this measure was higher for Show (Show: M = 0.87, SE = 0.01; Do: M = 0.82, SE = 0.01; two-sided t-test: t(55.6) = −3.14, p < .01). Finally, we calculated the number of times states were revisited in the two conditions–an indicator of “looping”–and found that participants revisited states more in Show compared to Do (Show: M = 1.38, SE = 0.22; Do: M = 0.10, SE = 0.03; two-sided t-test: t(28.3) = −2.82, p < .01). There was no difference between conditions in the total rewards won (two-sided t-test: t(46.2) = .026, p = 0.80). 4.3 Teaching Maximum-Likelihood IRL One reason to investigate showing is its potential for training artificial agents. Our pedagogical model makes assumptions about the learner, but it may be that pedagogical trajectories are better even for training off-the-shelf IRL algorithms. For instance, Maximum Likelihood IRL (MLIRL) is a state-of-the-art IRL algorithm for inferring feature-based reward functions [4, 12]. Importantly, unlike the discrete reward function space our showing model assumes, MLIRL estimates the maximum likelihood reward function over a space of continuous feature weights using gradient ascent. To test this, we input human and model trajectories into MLIRL. We constrained non-goal feature weights to be non-positive. Overall, the algorithm was able to learn the true reward function better from showing than doing trajectories produced by either the models or participants (Figure 2). 4.3.1 Discussion When learning a feature-based reward function from demonstration, it matters if the demonstrator is showing or doing. In this experiment, we showed that our model of pedagogical reasoning over trajectories captures how people show how to do a task. When showing as opposed to simply doing, demonstrators are more likely to visit a variety of states to show that they are safe, stay on otherwise ambiguously safe tiles, and also engage in “looping” behavior to signal information about the tiles. Moreover, this type of teaching is even better at training standard IRL algorithms like MLIRL. 5 General Discussion We have presented a model of showing as Bayesian teaching. Our model makes accurate quantitative and qualitative predictions about human showing behavior, as demonstrated in two experiments. Experiment 1 showed that people modify their behavior to signal information about goals, while Experiment 2 investigated how people teach feature-based reward functions. Finally, we showed that even standard IRL algorithms benefit from showing as opposed to merely doing. This provides a basis for future study into intentional teaching by demonstration. Future research must explore showing in settings with even richer state features and whether more savvy observers can leverage a showing agent’s pedagogical intent for even better learning. Acknowledgments MKH was supported by the NSF GRFP under Grant No. DGE-1058262. JLA and MLL were supported by DARPA SIMPLEX program Grant No. 14-46-FP-097. FC was supported by grant N00014-14-1-0800 from the Office of Naval Research. 8 References [1] P. Abbeel and A. Y. Ng. Apprenticeship Learning via Inverse Reinforcement Learning. In Proceedings of the Twenty-first International Conference on Machine Learning, ICML ’04, pages 1–, New York, NY, USA, 2004. ACM. [2] B. D. Argall, S. Chernova, M. Veloso, and B. Browning. A survey of robot learning from demonstration. Robotics and Autonomous Systems, 57(5):469–483, May 2009. [3] J. L. Austerweil and T. L. Griffiths. A nonparametric Bayesian framework for constructing flexible feature representations. Psychological Review, 120(4):817–851, 2013. [4] M. Babes, V. Marivate, K. Subramanian, and M. L. Littman. Apprenticeship learning about multiple intentions. In Proceedings of the 28th International Conference on Machine Learning (ICML-11), pages 897–904, 2011. [5] C. L. Baker, R. Saxe, and J. B. Tenenbaum. Action understanding as inverse planning. Cognition, 113(3):329–349, Dec. 2009. [6] D. Buchsbaum, A. Gopnik, T. L. Griffiths, and P. Shafto. Children’s imitation of causal action sequences is influenced by statistical and pedagogical evidence. Cognition, 120(3):331–340, Sept. 2011. [7] L. P. Butler and E. M. Markman. Preschoolers use pedagogical cues to guide radical reorganization of category knowledge. Cognition, 130(1):116–127, Jan. 2014. [8] M. Cakmak and M. Lopes. Algorithmic and Human Teaching of Sequential Decision Tasks. In AAAI Conference on Artificial Intelligence (AAAI-12), July 2012. [9] A. D. Dragan, K. C. T. Lee, and S. S. Srinivasa. Legibility and predictability of robot motion. In 2013 8th ACM/IEEE International Conference on Human-Robot Interaction (HRI), pages 301–308, Mar. 2013. [10] M. C. Frank and N. D. Goodman. Predicting Pragmatic Reasoning in Language Games. Science, 336(6084):998–998, May 2012. [11] D. Hadfield-Menell, A. Dragan, P. Abbeel, and S. Russell. Cooperative Inverse Reinforcement Learning. In D. D. Lee, M. Sugiyama, U. von Luxburg, and I. Guyon, editors, Advances in Neural Information Processing Systems, volume 28. The MIT Press, 2016. [12] J. MacGlashan and M. L. Littman. Between imitation and intention learning. In Proceedings of the 24th International Conference on Artificial Intelligence, pages 3692–3698. AAAI Press, 2015. [13] D. Ramachandran and E. Amir. Bayesian Inverse Reinforcement Learning. In Proceedings of the 20th International Joint Conference on Artifical Intelligence, IJCAI’07, pages 2586–2591, San Francisco, CA, USA, 2007. Morgan Kaufmann Publishers Inc. [14] P. Shafto, N. D. Goodman, and T. L. Griffiths. A rational account of pedagogical reasoning: Teaching by, and learning from, examples. Cognitive Psychology, 71:55–89, June 2014. [15] R. S. Sutton and A. G. Barto. Reinforcement Learning: An Introduction. MIT Press, 1998. 9 | 2016 | 421 |
6,352 | Learning Transferrable Representations for Unsupervised Domain Adaptation Ozan Sener1, Hyun Oh Song1, Ashutosh Saxena2, Silvio Savarese1 Stanford University1 Brain of Things2 {ozan,hsong,asaxena,ssilvio}@cs.stanford.edu Abstract Supervised learning with large scale labelled datasets and deep layered models has caused a paradigm shift in diverse areas in learning and recognition. However, this approach still suffers from generalization issues under the presence of a domain shift between the training and the test data distribution. Since unsupervised domain adaptation algorithms directly address this domain shift problem between a labelled source dataset and an unlabelled target dataset, recent papers [11, 33] have shown promising results by fine-tuning the networks with domain adaptation loss functions which try to align the mismatch between the training and testing data distributions. Nevertheless, these recent deep learning based domain adaptation approaches still suffer from issues such as high sensitivity to the gradient reversal hyperparameters [11] and overfitting during the fine-tuning stage. In this paper, we propose a unified deep learning framework where the representation, cross domain transformation, and target label inference are all jointly optimized in an end-to-end fashion for unsupervised domain adaptation. Our experiments show that the proposed method significantly outperforms state-of-the-art algorithms in both object recognition and digit classification experiments by a large margin. 1 Introduction Recently, deep convolutional neural networks [17, 26, 30] have propelled unprecedented advances in artificial intelligence including object recognition, speech recognition, and image captioning. Although these networks are very good at learning state of the art feature representations and recognizing discriminative patterns, one major drawback is that the network requires huge amounts of labelled training data to fit millions of parameters in the complex network. However, creating such datasets with complete annotations is not only tedious and error prone, but also extremely costly. In this regard, the research community has proposed different mechanisms such as semi-supervised learning [27, 37], transfer learning [23, 31], weakly labelled learning, and domain adaptation. Among these approaches, domain adaptation is one of the most appealing techniques when a fully annotated dataset (e.g. ImageNet [7], Sports1M [14]) is already available as a reference. The goal of unsupervised domain adaptation, in particular, is as follows. Given a fully labeled source dataset and an unlabeled target dataset, to learn a model which can generalize to the target domain while taking the domain shift across the datasets into account. The majority of the literature [13, 29, 9, 28, 32] in unsupervised domain adaptation formulates a learning problem where the task is to find a transformation matrix to align the labelled source data distribution to the unlabelled target data distribution. Although these approaches have shown promising results, they show accuracy degradation because of the discrepancy between the learning procedure and the actual target inference procedure. In this paper, we aim to address this issue by incorporating the unknown target labels into the training procedure. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. In this regard, we formulate a unified deep learning framework where the feature representation, domain transformation, and target labels are all jointly optimized in an end-to-end fashion. The proposed framework first takes as input a batch of labelled source and unlabelled target examples, and maps this batch of raw input examples into a deep representation. Then, the framework computes the loss of the input batch based on a two stage optimization in which it alternates between inferring the labels of the target examples transductively and optimizing the domain transformation parameters. Concretely, in the transduction stage, given the fixed domain transform parameter, we jointly infer all target labels by solving a discrete multi-label energy minimization problem. In the adaptation stage, given a fixed target label assignment, we seek to find the optimal asymmetric metric between the source and the target data. The advantage of our method is that we can jointly learn the optimal feature representation and the optimal domain transformation parameter, which are aware of the subsequent transductive inference procedure. Following the standard evaluation protocol in the unsupervised domain adaptation community, we evaluate our method on the digit classification task using MNIST [19] and SVHN[21] as well as the object recognition task using the Office [25] dataset, and demonstrate state of the art performance in comparison to all existing unsupervised domain adaptation methods. Learned models and the source code can be reached from the project webpage http://cvgl.stanford.edu/transductive_adaptation. 2 Related Work This paper is closely related to two active research areas: (1) Unsupervised domain adaptation, and (2) Transductive learning. Unsupervised domain adaptation: [16] casts the zero-shot learning [22] problem as an unsupervised domain adaptation problem in the dictionary learning and sparse coding framework, assuming access to additional attribute information. Recently, [3] proposed the active nearest neighbor algorithm, which combines the component of active learning into the domain adaptation problem and makes a bounded number of active queries to users. Also, [13, 9, 28] proposed subspace alignment based approaches to unsupervised domain adaptation where the task is to learn a joint transformation and projection in which the difference between the source and the target covariance is minimized. However, these methods learn the transformation matrices on the whole source and target dataset without utilizing the source labels. [32] utilizes a local max margin metric learning objective [35] to first assign the target labels with the nearest neighbor scheme and then learn a distance metric to enforce the negative pairwise distances to be larger than the positive pairwise distances. However, this method learns a symmetric distance matrix shared by both the source and the target domains so the method is susceptible to the discrepancies between the source and the target distributions. Recently, [11, 33] proposed a deep learning based method to learn domain invariant features by providing the reversed gradient signal from the binary domain classifiers. Although this method performs better than aforementioned approaches, their accuracy is limited since domain invariance does not necessarily imply discriminative features in the target domain. Transductive learning: In the transductive learning [10], the model has access to unlabelled test samples during training. [24] utilizes a semi-supervised label propagation algorithm into the semisupervised transfer learning problem assuming access to few labeled examples and additional human specified semantic knowledge. [15] tackled a classification problem where predictions are made jointly across all test examples in a transductive [10] setting. The method essentially enforces the notion that the true labels vary smoothly with respect to the input data. We extend this notion to jointly infer the labels of unsupervised target data points in a k-NN graph. To summarize, our main contribution is to formulate an end-to-end deep learning framework where we learn the optimal feature representation, infer target labels via discrete energy minimization (transduction), and learn the transformation (adaptation) between source and target examples all jointly. Our experiments on digit classification using MNIST [19] and SVHN[21] as well as the object recognition experiments on Office [25] datasets show state of the art results, outperforming all existing methods by a substantial margin. 2 3 Method 3.1 Problem Definition and Notation In the unsupervised domain adaptation, one of the domains (source) is supervised {ˆxi, ˆyi}i∈[N s] with N s data points ˆxi and the corresponding labels ˆyi from a discrete set ˆyi ∈Y = {1, . . . , Y }. The other domain (target), on the other hand is unsupervised and has N u data points {xi}i∈[N u]. We further assume that two domains have different distributions ˆxi ∼ps and xi ∼pt defined on the same space ˆxi, xi ∈X. We consider a case in which there are two feature functions Φs, Φt : X →Rd applicable to source and target separately. These feature functions extract the information both shared among domains and explicit to the individual ones. The way we model common features is by sharing a subset of parameters between feature functions as Φs = Φθc,θs and Φt = Φθc,θt. We use deep neural networks to implement these functions. In our implementation, θc corresponds to the parameters in the first few layers of the networks and θs, θt correspond to the respective final layers. In general, our model is applicable to any hierarchical and differentiable feature function which can be expressed as a composite function Φs = fθs(gθc(·)) for both source and target. 3.2 Consistent Structured Transduction Our method is based on jointly learning the transferable domain specific representations for source and target as well as estimating the labels of the unsupervised data-points. We denote these two main components of our method as transduction and adaptation. The transduction is the sub-problem of labelling unsupervised data points and the adaptation is the sub-problem of solving for the domain shift. In order to solve this joint problem tractably, we exploit two heuristics: cyclic consistency for adaptation and structured consistency for transduction. Cyclic consistency: One desired property of Φs and Φt is consistency. If we estimate the labels of the unsupervised data points and then use these points with their estimated labels to estimate the labels of supervised data-points, we want the predicted labels of the supervised data-points to be consistent with the ground truth labels. Using the inner product as an asymmetric similarity metric as s(ˆxi, xj) = Φs(ˆxi)⊺Φt(xj), this consistency can be represented with the following diagram. (ˆxi, ˆyi) O Cyclic Consistency: ˆyi = ˆypred i Transduction / (xj, yj) Transduction / (ˆxi, ˆypred i ) It can be shown that if the transduction from target to source follows a nearest neighbor rule, cyclic consistency can be enforced without explicitly computing ˆypred i using the large-margin nearest neighbor (LMNN)[35] rule. For each source point, we enforce a margin such that the similarity between the source point and the nearest neighbor from the target with the same label is greater than the similarity between the source point and the nearest neighbor from the target with a different label. Formally; Φs(ˆxi)⊺Φt(xi+) > Φs(ˆxi)⊺Φt(xi−) + α where xi+ is the nearest target having the same class label as ˆxi and xi−is the nearest target having a different class label. Structured consistency: We enforce a structured consistency when we label the target points during the transduction. The structure we enforce is; if two target points are similar to each other, they are more likely to have the same label. To do so, we create a k-NN graph of target points using a similarity metric Φt(xi)⊺Φt(xj). We denote the neighbors of the point ˆxi as N(ˆxi). We enforce structured consistency by penalizing neighboring points of different labels proportional to their similarity score. Our model leads to the following optimization problem, over the target labels yi and the feature function parameters θc, θs, θt, jointly solving transduction and adaptation. min θc,θs,θt, y1,...yNu X i∈[Ns] [Φs(ˆxi)⊺Φt(xi−) −Φs(ˆxi)⊺Φt(xi+) + α]+ | {z } Cyclic Consistency + λ X i∈[Nu] X xj∈N (xi) Φt(xi)⊺Φt(xj)1(yi ̸= yj) | {z } Structured Consistency s.t. i+ = arg maxj|yj=ˆyiΦs(ˆxi)⊺Φt(xj) and i−= arg maxj|yj̸=ˆyiΦs(ˆxi)⊺Φt(xj) (1) where 1(a) is an indicator function which is 1 if a is true and 0 otherwise. [a]+ is a rectifier function which is equal to max(0, a). 3 We solve this optimization problem via alternating minimization through iterating over solving for unsupervised labels yi(transduction) and learning the similarity metric θc, θs, θt (adaptation). We explain these two steps in detail in the following sections. 3.3 Transduction: Labeling Target Domain In order to label the unsupervised points, we base our model on the k-nearest-neighbor rule. We simply compute the k-NN supervised data point for each unsupervised data point using the learned metric and transfer the corresponding majority label. Formally, given a similarity metric θc, θs, θt, the k-NN rule is (yi)pred = arg maxy ky(xi) k where ky(xi) is the number of samples having label y in the k nearest neighbors of xi from the source domain. One major issue with this approach is the inaccuracy of transduction during the initial stage of the algorithm. Since the learned metric will not be accurate, we expect to see some noisy k-NN sets. Hence, we propose two solutions to solve this problem. Structured Consistency: Similar to existing graph transduction algorithms [4, 36], we create a k-nearest neighbor (k-NN) graph over the unsupervised data points and penalize disagreements of labels between neighbors. Reject option: In the initial stage of the algorithm, we let the transduction step use the reject R as an additional label (besides the class labels) to label the unsupervised target points. In other words, our transduction algorithm can decide to not label (reject) some of the points so that they will not be used for adaptation. As the learned metric gets more accurate in the future iterations, transduction algorithm can change the label from R to other class labels. Using aforementioned heuristics, we define our transduction sub-problem as1: min y1,...yNu∈Y∪R X i∈[N u] l(xi, yi) + λ X i∈[N u] X xj∈N (xi) Φt(xi)⊺Φt(xj)1(yi ̸= yj) (2) where l(xi, y) = ( 1 −ky(xi) k y ∈Y γ maxy′∈Y k′ y(xi) k y = R and γ is relative cost of the reject option. The l(xi, R) is smaller if none of the class has a majority, promoting the reject option for undecided cases. We also modulate the γ during learning to decrease number of reject options in the later stage of the adaptation. This problem can approximately be solved using many existing methods. We use the α-β swapping algorithm from [5] since it is experimentally shown to be efficient and accurate. 3.4 Adaptation: Learning the Metric Given the predicted labels yi for unsupervised data points xi, we can then learn a metric in order to minimize the loss function defined in (1). Following the cyclic consistency construction, the LMNN rule can be represented using the triplet loss defined between the supervised source data points and their nearest positive and negative neighbors among the unsupervised target points. We do not include the target-data points with reject labels during this construction. Formally, we can define the adaptation problem given unsupervised labels as; min θc,θs,θt X i∈[Ns] [Φs(ˆxi)⊺Φt(xi−) −Φs(ˆxi)⊺Φt(xi+) + α]+ + λ X i∈[Nu] X xj∈N (xi) Φt(xi)⊺Φt(xj)1(yi ̸= yj) (3) where i+ = arg maxj|yj=ˆyiΦs(ˆxi)⊺Φt(xj) and i−= arg maxj|yj̸=ˆyi,yj̸=RΦs(ˆxi)⊺Φt(xj) (4) We optimize this function via stochastic gradient descent using the sub-gradients ∂loss ∂θs , ∂loss ∂θt and ∂loss ∂θc . These sub-gradients can be efficiently computed with back-propagation (see [1] for details). 1The subproblem we define here does not directly correspond to optimization of (1) with respect to y1, . . . yNu. It is extension of the exact sub-problem by replacing 1-NN rule with k-NN rule and introducing reject option. 4 3.5 Implementation Details We use Alexnet [17] and LeNet [18] architectures with small modifications. We remove their final softmax layer and change the size of the final fully connected layer according to the desired feature dimension. We consider the last fully connected layer as domain specific (θs, θt) and the rest as common network θc. Common network weights are tied between domains, and the final layers are learned separately. In order to have a fair comparison, we use the same architectures from [11] only modifying the embedding size. (See supplementary material [1] for details). Algorithm 1 Transduction with Domain Shift Input: Source ˆx1···Ns, ˆy1,···Ns, Target x1,··· ,Nu, Batch Size 2 × B for t = 0 to max_iter do Sample {ˆx1,...,B, ˆy1,...,B}, {x1,...,B} Solve (2) for {y1···B} for i = 1 to B do if ˆyi ∈y1···B and ∃k yk ∈Y \ ˆyi then Compute (i+, i−) using {y1···B} in (4) Update ∂loss ∂θc , ∂loss ∂θs , ∂loss ∂θt end if end for η(t) ←Adagrad Rule [8] θc ←θc + η(t) ∂loss ∂θc , θs ←θs + η(t) ∂loss ∂θs , θt ←θt + η(t) ∂loss ∂θt end for Since the office dataset is quite small, we do not learn the network from scratch for office experiments and instead we initialize with the weights pre-trained on ImageNet. In all of our experiments, we set the feature dimension as 128. We use stochastic gradient descent to learn the feature function with AdaGrad[8]. We initialize convolutional weights with truncated normals having std-dev 0.1, biases with constant value 0.1, and use a learning rate of 2.5 × 10−4 with batch size 512. We start the rejection penalty with γ = 0.1 and linearly increase with each epoch as γ = #epoch−1 M + 0.1. In our experiments, we use M = 20, λ = 0.001 and α = 1. 4 Experimental Results We evaluate our algorithm on various unsupervised domain adaptation tasks while focusing on two different problems: hand-written digit classification and object recognition. Datasets: We use MNIST [19], Street View House Number [21] and the artificially generated version of MNIST -MNIST-M- [11] to experiment our algorithm on the digit classification task. MNIST-M is simply a blend of the digit images of the original MNIST dataset and the color images of BSDS500 [2] following the method explained in [11]. Since the dataset is not distributed directly by the authors, we generated the dataset using the same procedure and further confirmed that the performance is the same as the one reported in [11]. Street View House Numbers is a collection of house numbers collected from Google street view images. Each of these three domains are quite different from each other. Among many important differences, the most significant ones are MNIST being grayscale whilw the others are colored, and SVHN images having extra confusing digits around the centered digit of interest. Moreover, all domains are large-scale, having at least 60k examples over 10 classes. In addition, we use the Office [25] dataset to evaluate our algorithm on the object recognition task. The office dataset includes images of the objects taken from Amazon, captured with a webcam and captured with a D-SLR. Differences between domains include the white background of Amazon images versus realistic webcam images, and the resolution differences. The Office dataset has fewer images, with a maximum of 2478 per domain over 31 classes. Baselines: We compare our method against a variety of methods with and without feature learning. SA*[9] is the dominant state-of-the-art approach not employing any feature learning, and Backprop(BP)[11] is the dominant state-of-the-art employing feature learning. We use the available source code of [11] and [9] and following the evaluation procedure in [11], we choose the hyper-parameter of [9] as the highest performing one among various alternatives. We also compare our method with the source only baseline which is a convolutional neural network trained only using the source data. This classifier is clearly different from our nearest neighbor classifier; however, we experimentally validated that the CNN always outperformed the nearest neighbor based classifier. Hence, we report the highest performing source only method. Evaluation: We evaluate all algorithms in a fully transductive setup [12]. We feed training images and labels of first domain as the source and training images of the second domain as the target. We evaluate the accuracy on the target domain as the ratio of correctly labeled images to all target images. 5 4.1 Results Following the fully transductive evaluation, we summarize the results in Table 1 and Table 2. Table 1 summarizes the results on the object recognition task using office dataset whereas Table 2 summarizes the digit classification task on MNIST and SVHN. Table 1: Accuracy of our method and the state-of-the-art algorithms on Office dataset. SOURCE AMAZON D-SLR WEBCAM WEBCAM AMAZON D-SLR TARGET WEBCAM WEBCAM D-SLR AMAZON D-SLR AMAZON GFK [12] .398 .791 .746 .371 .379 .379 SA* [9] .450 .648 .699 .393 .388 .420 DLID [6] .519 .782 .899 DDC [33] .618 .950 .985 .522 .644 .521 DAN [20] .685 .960 .990 .531 .670 .540 BACKPROP [11] .730 .964 .992 .536 .728 .544 SOURCE ONLY .642 .961 .978 .452 .668 .476 OUR METHOD (K-NN ONLY) .727 .952 .915 .575 .791 .521 OUR METHOD (NO REJECT) .804 .962 .989 .625 .839 .567 OUR METHOD (FULL) .811 .964 .992 .638 .841 .583 Table 2: Accuracy on the digit classification task. SOURCE M-M MNIST SVHN MNIST TARGET MNIST M-M MNIST SVHN SA* [9] .523 .569 .593 .211 BP [11] .732 .766 .738 .289 SOURCE ONLY .483 .522 .549 .162 OUR METHOD(K-NN ONLY) .805 .795 .713 .158 OUR METHOD(NO REJECT) .835 .855 .774 .323 OUR METHOD(FULL) .839 .867 .788 .403 Tables 1&2 show results on object recognition and digit classification tasks covering all adaptation scenarios. Our experiments show that our proposed method outperforms all state-of-the-art algorithms. Moreover, the increase in the accuracy is rather significant when there is a large domain difference such as MNIST↔MNIST-M, MNIST↔SVHN, Amazon↔Webcam and Amazon↔D-SLR. Our hypothesis is that the state-of-the-art algorithms such as [11] are seeking features invariant to the domains whereas we seek an explicit similarity metric explaining both differences and similarities of domains. In other words, instead of seeking an invariance, we seek an equivariance. Table 2 further suggests that our algorithm is the only one which can successfully perform adaptation from MNIST to SVHN. Clearly the features which are learned from MNIST cannot generalize to SVHN since the SVHN has concepts like color and occlusion which are not available in MNIST. Hence, our algorithm learns SVHN specific features by enforcing accurate transduction in the adaptation. Another interesting conclusion is the asymmetric results. For example, adapting webcam to Amazon and adapting Amazon to webcam yield very different accuracies. The similar asymmetry exists in MNIST and SVHN as well. This observation validates the importance of an asymmetric modeling. To evaluate the importance of joint labelling and reject option, we compare our method with self baselines. Our self-baselines are versions of our algorithm not using the reject option (no reject) and the version using neither reject option nor joint labelling (k-NN only). Results on both experiments suggest that joint labelling and the reject option are both crucial for successful transduction. Moreover, the reject option is more important when the domain shift is large (e.g. MNIST→SVHN). This is expected since transduction under a large shift is more likely to fail a situation that can be prevented with reject option. 4.1.1 Qualitative Analysis To further study the learned representations and the similarity metric, we performed a series of qualitative analysis in the form of nearest neighbor and tSNE[34] plots. Figure 1 visualizes example target images from MNIST and their corresponding source images. First of all, our experimental analysis suggests that MNIST and SVHN are the two domains with the largest difference. Hence, we believe MNIST↔SVHN is a very challenging set-up and despite the huge 6 visual differences, our algorithm results in accurate nearest neighbors. On the other hand, Figure 2 visualizes the example target images from webcam and their corresponding nearest source images from Amazon. Figure 1: Nearest neighbors for SVHN→MNIST exp. We show an example MNIST image and its 5-NNs. Figure 2: Nearest neighbors for Amazon↔Webcam exp. We show an example Amazon image and its 3-NNs. The difference between invariance and equivariance is clearer in the tSNE plots of the Office dataset in Figure 3 and the digit classification task in Figure 4. In Figure 3, we plot the distribution of features before and after adaptation for source and target while color coding class labels. We use the learned embeddings as output of Φs and Φt as an input to tSNE algorithm[34]. As Figure 3 suggests, the source domain is well clustered according to the object classes with and without adaptation. This is expected since the features are specifically fine-tuned to the source domain before the adaptation starts. However, the target domain features have no structure before adaptation. This is also expected since the algorithm did not see any image from the target domain. After the adaptation, target images also get clustered according to the object classes. In Figure 4, we show the digit images of the source and target after the adaptation. In order to see the effect of common features and domain specific features separately, we compute the low-dimensional embeddings of the output of the shared network (output of the first fully connected layer). We further compute the NN points between the source and target using Φs and Φt, and draw an edge between NNs. Clearly, the target is well clustered according to the classes and the source is not very well clustered although it has some structure. Since we learn the entire network for digit classification, our networks learn discriminative features in the target domain as our loss depends directly on classification scores in the target domain. Moreover, discriminative features in the target arises because of the transductive modeling. In comparison, state of the art domain invariance based algorithms only try to be invariant to the domains without explicit modeling of discriminative behavior on the target. Hence, our method explicitly models the relationship between the domains and results in an equivarient model while enforcing discriminative behavior in the target. 5 Conclusion We described an end-to-end deep learning framework for jointly optimizing the optimal deep feature representation, cross domain transformation, and the target label inference for state of the art unsupervised domain adaptation. Experimental results on digit classification using MNIST[19] and SVHN[21] as well as on object recognition using the Office[25] dataset show state of the art performance with a significant margin. Acknowledgments We acknowledge the support of ONR-N00014-13-1-0761, MURI - WF911NF-15-1-0479 and Toyota Center grant 1191689-1-UDAWF. 7 (a) S. w/o Adaptation (b) S. with Adaptation (c) T w/o Adaptation (d) T with Adaptation Figure 3: tSNE plots for office dataset Webcam(S)→Amazon(T). Source features were discriminative and stayed discriminative as expected. On the other hand, target features became quite discriminative after the adaptation. Figure 4: tSNE plot for SVHN→MNIST experiment. Please note that the discriminative behavior only emerges in the unsupervised target instead of the source domain. This explains the motivation behind modeling the problem as transduction. In other words, our algorithm is designed to be accurate and discriminative in the target domain which is the domain we are interested in. 8 References [1] Supplementary details for the paper. http://cvgl.stanford.edu/transductive_adaptation. [2] P. Arbelaez, M. Maire, C. Fowlkes, and J. Malik. Contour detection and hierarchical image segmentation. T-PAMI, 33:898–916, 2011. [3] C. Berlind and R. Urner. Active nearest neighbors in changing environments. In ICML, 2015. [4] A. Blum and S. Chawla. Learning from labeled and unlabeled data using graph mincuts. In ICML, 2001. [5] Y. Boykov and V. Kolmogorov. An experimental comparison of min-cut/max-flow algorithms for energy minimization in vision. T-PAMI, 26:1124–1137, 2004. [6] S. Chopra, S. Balakrishnan, and R. Gopalan. Dlid: Deep learning for domain adaptation by interpolating between domains. In ICML W, 2013. [7] 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. [8] J. Duchi, E. Hazan, and Y. Singer. Adaptive subgradient methods for online learning and stochastic optimization. JMLR, pages 2121–2159, 2011. [9] B. Fernando, A. Habrard, M. Sebban, and T. Tuytelaars. Unsupervised visual domain adaptation using subspace alignment. In ICCV, 2013. [10] A. Gammerman, V. Vovk, and V. Vapnik. Learning by transduction. In UAI, 1998. [11] Y. Ganin and V. S. Lempitsky. Unsupervised domain adaptation by backpropagation. In ICML, 2015. [12] B. Gong, K. Grauman, and F. Sha. Connecting the dots with landmarks: Discriminatively learning domain-invariant features for unsupervised domain adaptation. In ICML, 2013. [13] B. Gong, Y. Shi, F. Sha, and K. Grauman. Geodesic flow kernel for unsupervised domain adaptation. In CVPR, 2012. [14] A. Karpathy, G. Toderici, S. Shetty, T. Leung, R. Sukthankar, and L. Fei-Fei. Large-scale video classification with convolutional neural networks. In CVPR, 2014. [15] S. Khamis and C. Lampert. Coconut: Co-classification with output space regularization. In BMVC, 2014. [16] E. Kodirov, T. Xiang, Z. Fu, and S. Gong. Domain adaptation for zero-shot learning. In ICCV, 2015. [17] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012. [18] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86:2278–2324, 1998. [19] Y. LeCun, C. Cortes, and C. J. Burges. The mnist database of handwritten digits, 1998. [20] M. Long, C. Yue, J. Wang, and J. Michael. Learning transferable features with deep adaptation networks. arXiv, 2015. [21] Y. Netzer, T. Wang, A. Coates, A. Bissacco, B. Wu, and A. Y. Ng. Reading digits in natural images with unsupervised feature learning. In NIPS W, 2011. [22] M. Palatucci, D. Pomerleau, G. E. Hinton, and T. M. Mitchell. Zero-shot learning with semantic output codes. In NIPS, 2009. [23] R. Raina, A. Battle, H. Lee, B. Packer, and A. Y. Ng. Self-taught learning: transfer learning from unlabeled data. In ICML. ACM, 2007. [24] M. Rohrbach, S. Ebert, and B. Schiele. Transfer learning in a transductive setting. In NIPS, 2013. [25] K. Saenko, B. Kulis, M. Fritz, and T. Darrell. Adapting visual category models to new domains. In ECCV, pages 213–226. Springer, 2010. [26] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014. [27] V. Sindhwani, P. Niyogi, and M. Belkin. Beyond the point cloud: from transductive to semi-supervised learning. In ICML, 2005. [28] B. Sun, J. Feng, and K. Saenko. Return of frustratingly easy domain adaptation. In AAAI, 2016. [29] B. Sun and K. Saenko. Subspace alignment for unsupervised domain adaptation. In BMVC, 2015. [30] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich. Going deeper with convolutions. arXiv:1409.4842, 2014. [31] S. Thrun and L. Pratt. Learning to learn. Springer Science & Business, 2012. [32] T. Tommasi and B. Caputo. Frustratingly easy NBNN domain adaptation. In ICCV, 2013. [33] E. Tzeng, J. Hoffman, N. Zhang, K. Saenko, and T. Darrell. Deep domain confusion: Maximizing for domain invariance. arXiv:1412.3474, 2014. [34] L. van der maaten. Accelerating t-sne using tree-based algorithms. In JMLR, 2014. [35] K. Q. Weinberger, J. Blitzer, and L. K. Saul. Distance metric learning for large margin nearest neighbor classification. In NIPS, 2006. [36] X. Zhu and Z. Ghahramani. Learning from labeled and unlabeled data with label propagation. 2002. [37] X. Zhu, Z. Ghahramani, J. Lafferty, et al. Semi-supervised learning using gaussian fields and harmonic functions. In ICML, 2003. 9 | 2016 | 422 |
6,353 | On Robustness of Kernel Clustering Bowei Yan Department of Statistics and Data Sciences University of Texas at Austin Purnamrita Sarkar Department of Statistics and Data Sciences University of Texas at Austin Abstract Clustering is an important unsupervised learning problem in machine learning and statistics. Among many existing algorithms, kernel k-means has drawn much research attention due to its ability to find non-linear cluster boundaries and its inherent simplicity. There are two main approaches for kernel k-means: SVD of the kernel matrix and convex relaxations. Despite the attention kernel clustering has received both from theoretical and applied quarters, not much is known about robustness of the methods. In this paper we first introduce a semidefinite programming relaxation for the kernel clustering problem, then prove that under a suitable model specification, both K-SVD and SDP approaches are consistent in the limit, albeit SDP is strongly consistent, i.e. achieves exact recovery, whereas K-SVD is weakly consistent, i.e. the fraction of misclassified nodes vanish. Also the error bounds suggest that SDP is more resilient towards outliers, which we also demonstrate with experiments. 1 Introduction Clustering is an important problem which is prevalent in a variety of real world problems. One of the first and widely applied clustering algorithms is k-means, which was named by James MacQueen [14], but was proposed by Hugo Steinhaus [21] even before. Despite being half a century old, k-means has been widely used and analyzed under various settings. One major drawback of k-means is its incapability to separate clusters that are non-linearly separated. This can be alleviated by mapping the data to a high dimensional feature space and do clustering on top of the feature space [19, 9, 12], which is generally called kernel-based methods. For instance, the widely-used spectral clustering [20, 16] is an algorithm to calculate top eigenvectors of a kernel matrix of affinities, followed by a k-means on the top r eigenvectors. The consistency of spectral clustering is analyzed by [22]. [9] shows that spectral clustering is essentially equivalent to a weighted version of kernel k-means. The performance guarantee for clustering is often studied under distributional assumptions; usually a mixture model with well-separated centers suffices to show consistency. [5] uses a Gaussian mixture model, and proposes a variant of EM algorithm that provably recovers the center of each Gaussian when the minimum distance between clusters is greater than some multiple of the square root of dimension. [2] works with a projection based algorithm and shows the separation needs to be greater than the operator norm and the Frobenius norm of difference between data matrix and its corresponding center matrix, up to a constant. Another popular technique is based on semidefinite relaxations. For example [18] proposes a SDP relaxation for k-means typed clustering. In a very recent work, [15] shows the effectiveness of SDP relaxation with k-means clustering for subgaussian mixtures, provided the minimum distance between centers is greater than the variance of the sub-gaussian times the square of the number of clusters r. On a related note, SDP relaxations have been shown to be consistent for community detection in networks [1, 3]. In particular, [3] consider “inlier” (these are generated from the underlying clustering 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. model, to be specific, a blockmodel) and “outlier” nodes. The authors show that SDP is weakly consistent in terms of clustering the inlier nodes as long as the number of outliers m is a vanishing fraction of the number of nodes. In contrast, among the numerous work on clustering, not much focus has been on robustness of different kernel k-means algorithms in presence of arbitrary outliers. [24] illustrates the robustness of Gaussian kernel based clustering, where no explicit upper bound is given. [8] detects the influential points in kernel PCA by looking at an influence function. In data mining community, many find clustering can be used to detect outliers, with often heuristic but effective procedures [17, 10]. On the other hand, kernel based methods have been shown to be robust for many machine learning tasks. For supervised learning, [23] shows the robustness of SVM by introducing an outlier indicator and relaxing the problem to a SDP. [6, 7, 4] develop the robustness for kernel regression. For unsupervised learning, [13] proposes a robust kernel density estimation. In this paper we ask the question: how robust are SVD type algorithms and SDP relaxations when outliers are present. In the process we also present results which compare these two methods. To be specific, we show that without outliers, SVD is weakly consistent, i.e. the fraction of misclassified nodes vanishes with high probability, whereas SDP is strongly consistent, i.e. the number of misclassified nodes vanishes with high probability. We also prove that both methods are robust to arbitrary outliers as long as the number of outliers is growing at a slower rate than the number of nodes. Surprisingly our results also indicate that SDP relaxations are more resilient to outliers than K-SVD methods. The paper is organized as follows. In Section 2 we set up the problem and the data generating model. We present the main results in Section 3. Proof sketch and more technical details are introduced in Section 4. Numerical experiments in Section 5 illustrate and support our theoretical analysis. More additional analysis are included in the extended version of this paper 1. 2 Problem Setup We denote by Y = [Y1, · · · , Yn]T the n × p data matrix. Among the n observations, m outliers are distributed arbitrarily, and n −m inliers form r equal-sized clusters, denoted by C1, · · · , Cr. Let us denote the index set of inliers by I and index set of outliers by O, I ∪O = [n]. Also denote by R = {(i, j) : i ∈O or j ∈O}. The problem is to recover the true and unknown data partition given by a membership matrix Z = {0, 1}n×r, where Zik = 1 if i belongs to the k-th cluster and 0 otherwise. For convenience we assume the outliers are also arbitrarily equally assigned to r clusters, so that each extended cluster, denoted by ˜Ci, i ∈[r] has exactly n/r points. A ground truth clustering matrix X0 ∈Rn×n can be achieved by X0 = ZZT . It can be seen that X0(i, j) = 1 if i, j ∈I, and belong to the same cluster; 0 otherwise. For the inliers, we assume the following mixture distribution model. Conditioned on Zia = 1, Yi = µa + Wi √p, E[Wi] = 0, Cov[Wi] = σ2 aIp, Wi are independent sub-gaussian random vectors. We treat Y as a low dimensional signal hidden in high dimensional noise. More concretely µa is sparse and ∥µa∥0 does not depend on n or p; as n →∞, p →∞. Wi’s for i ∈[n] are independent. For simplicity, we assume the noise is isotropic and the covariance only depends on the cluster. The sub-gaussian assumption is non-parametric and includes most of the commonly used distribution such as Gaussian and bounded distributions. We include some background materials on sub-gaussian random variables in Appendix A. This general setting for inliers is common and also motivated by many practical problems where the data lies on a low dimensional manifold, but is obscured by high-dimensional noise [11]. We use the kernel matrix based on Euclidean distances between covariates. Our analysis can be extended to inner product kernels as well. From now onwards, we will assume that the function generating the kernel is bounded and Lipschitz. 1https://arxiv.org/abs/1606.01869 2 Assumption 1. For n observations Y1, · · · , Yn, the kernel matrix (sometimes also called Gram matrix) K is induced by K(i, j) = f(∥Yi −Yj∥2 2), where f satisfies |f(x)| ≤1, ∀x and ∃C0 > 0, s.t. supx,y |f(x) −f(y)| ≤C0|x −y|. A widely used example that satisfies the above condition is the Gaussian kernel. For simplicity, we will without loss of generality assume K(x, y) = f(∥x −y∥2) = exp(−η∥x −y∥2). For the asymptotic analysis, we use the following standard notations for approximated rate of convergence. T(n) is O(f(n)) iff for some constant c and n0, T(n) ≤cf(n) for all n ≥n0; T(n) is Ω(f(n)) if for some constant c and n0, T(n) ≥cf(n) for all n ≥n0; T(n) is Θ(f(n)) if T(n) is O(f(n)) and Ω(f(n)); T(n) is o(f(n)) if T(n) is O(f(n)) but not Ω(f(n)). T(n) is oP (f(n)) ( or OP (f(n))) if it is o(f(n)) (or O(f(n))) with high probability. Several matrix norms are considered in this manuscript. Assume M ∈Rn×n, the ℓ1 and ℓ∞norm are defined the same as the vector ℓ1 and ℓ∞norm. We define: ∥M∥1 := P ij |Mij| and ∥M∥∞:= maxi,j |Mij|. For two matrices M, Q ∈Rm×n, their inner product is ⟨M, Q⟩= trace(M T Q). The operator norm ∥M∥is simply the largest singular value of M, which equals the largest eigenvalue for a symmetric matrix. Throughout the manuscript, we use 1n to represent the all one n × 1 vector and En, En,k to represent the all one matrix with size n × n and n × k. The subscript will be dropped when it is clear from context. 2.1 Two kernel clustering algorithms Kernel clustering algorithms can be broadly divided into two categories; one is based on semidefinite relaxation of the k-means objective function and the other is eigen-decomposition based, like kernel PCA, spectral clustering, etc. In this section we describe these two settings. SDP relaxation for kernel clustering It is well known [9] that kernel k-means could be achieved by maximizing trace(ZT KZ) where Z is the n × r matrix of cluster memberships. However due to the non-convexity of the constraints, the problem is NP-hard. Thus lots of convex relaxations are proposed in literature. In this paper, we propose the following semidefinite programming relaxation. The same relaxation has been used in stochastic block models [1]. max X trace(KX) (SDP-1) s.t., X ⪰0, X ≥0, X1 = n r 1, diag(X) = 1 The clustering procedure is listed in Algorithm 1. Algorithm 1 SDP relaxation for kernel clustering Require: Observations Y1, · · · , Yn, kernel function f. 1: Compute kernel matrix K where K(i, j) = f(∥Yj −Yj∥2 2); 2: Solve SDP-1 and let ˆX be the optimal solution; 3: Do k-means on the r leading eigenvectors U of ˆX. Kernel singular value decomposition Kernel singular value decomposition (K-SVD) is a spectral based clustering approach. One first do SVD on the kernel matrix, then do k-means on first r eigenvectors. Different variants include K-PCA which uses singular vectors of centered kernel matrix and spectral clustering which uses singular vectors of normalized kernel matrix. The detailed algorithm is shown in Algorithm 2. 3 Main results In this section we summarize our main results. In this paper we analyze SDP relaxation of kernel k-means and K-SVD type methods. Our main contribution is two-fold. First, we show that SDP relaxation produces strongly consistent results, i.e. the number of misclustered nodes goes to zero with high probability when there are no outliers, which means r without rounding. On the other 3 Algorithm 2 K-SVD (K-PCA, spectral clustering) Require: Observations Y1, · · · , Yn, kernel function f. 1: Compute kernel matrix K where K(i, j) = f(∥Yj −Yj∥2 2); 2: if K-PCA then 3: K = K −K11T /n −11T K/n + 11T K11T /n2; 4: else if spectral clustering then 5: K = D−1/2KD−1/2 where D = diag(K1n); 6: end if 7: Do k-means on the r leading singular vectors V of K. hand, K-SVD is weakly consistent, i.e. fraction of misclassified nodes goes to zero when there are no outliers. In presence of outliers, we see an interesting dichotomy in the behaviors of these two methods. Both can be proven to be weakly consistent in terms of misclassification error. However, SDP is more resilient to the effect of outliers than K-SVD, if the number of clusters grows or if the separation between the cluster means decays. Our analysis is organized as follows. First we present a result on the concentration of kernel matrices around their population counterpart. The population kernel matrix for inliers is blockwise constant with r blocks (except the diagonal, which is one). Next we prove that as n increases, the optima ˆX of SDP-1 converges strongly to X0, when there are no outliers and weakly if the number of outliers grows slowly with n. Then we show the mis-clustering error of the clustering returned by Algorithm 1 goes to zero with probability tending to one as n →∞when there are no outliers. Finally, when the number of outliers is growing slowly with n, the fraction of mis-clustered nodes from algorithms 1 and 2 converges to zero. We will start with the concentration of kernel matrices to their population counterpart. We show that under our data model (1) the empirical kernel matrix with the Gaussian kernel restricted on inliers concentrates around a "population" matrix ˜K, and the ℓ∞norm of KI×I f −˜KI×I f goes to zero at the rate of O( q log p p ). Theorem 1. Let dkℓ= ∥µk −µℓ∥. For i ∈˜Ck, j ∈˜Cℓ, define ˜Kf(i, j) = f(d2 kℓ+ σ2 k + σ2 ℓ) if i ̸= j, f(0) if i = j. . (1) Then there exists constant ρ > 0, such that P(∥KI×I f −˜KI×I f ∥∞≥c q log p p ) ≤n2p−ρc2. Remark 1. Setting c = q 3 log n p log p , there exists constant ρ > 0, such that P ∥KI×I −˜KI×I∥∞≥ s 3 log n ρp ! ≤1 n. The error probability goes to zero for a suitably chosen constant as long as p is growing faster than log n. While our analysis is inspired by [11], there are two main differences. First we have a mixture model where the population kernel is blockwise constant. Second, we obtain q log p p rates of convergence by carefully bounding the tail probabilities. In order to attain this we further assume that the noise is sub-gaussian and isotropic. From now on we will drop the subscript f and refer to the kernel matrix as K. By definition, ˜K is blockwise constant with r unique rows (except the diagonal elements which are ones). An important property of ˜K is that λr −λr+1 (where λi is the ith largest eigenvalue of ˜K) will be Ω(nλmin(B)/r). B is the r × r Gaussian kernel matrix generated by the centers. Lemma 1. If the scale parameter in Gaussian kernel is non-zero, and none of the clusters shares a same center, let B be the r × r matrix where Bkℓ= f(∥µk −µℓ∥), then λr( ˜K) −λr+1( ˜K) ≥n r λmin(B) · min k f(σ2 k) 2 −2 max k (1 −f(2σ2 k)) = Ω(nλmin(B)/r) 4 Now we present our result on the consistency of SDP-1. To this end, we will upper bound ∥ˆX −X0∥1, where ˆX is the optima returned by SDP-1 and X0 is the true clustering matrix. We first present a lemma, which is crucial to the proof of the theorem. Before presenting this, we define γkℓ:= f(2σ2 k) −f(d2 kℓ+ σ2 k + σ2 ℓ); γmin := min ℓ̸=k γkℓ (2) The first quantity γkℓmeasures separation between the two clusters k and ℓ. The second quantity measures the smallest separation possible. We will assume that γmin is positive. This is very similar to the analysis in asymptotic network analysis where strong assortativity is often assumed. Our results show that the consistency of clustering deteriorates as γmin decreases. Lemma 2. Let ˆX be the solution to (SDP-1), then ∥X0 −ˆX∥1 ≤2⟨K −˜K, ˆX −X0⟩ γmin (3) Combining the above with the concentration of K from Theorem 1 we have the following result: Theorem 2. When d2 kℓ> |σ2 k −σ2 ℓ|, ∀k ̸= ℓ, and γmin = Ω q log p p then for some absolute constant c > 0, ∥X0 −ˆX∥1 ≤max n oP (1), oP mn rγmin o . Remark 2. When there’s no outlier in the data, i.e., m = 0, ˆX = X0 with high probability and SDP-1 is strongly consistent without rounding. When m > 0, the right hand side of the inequality is dominated by mn/r. Note that ∥X0∥1 = n2 r , therefore after suitable normalization, the error rate goes to zero with rate O(m/(nγmin)) when n →∞. Now we will present the mis-clustering error rate of Algorithm 1 and 2. Although ˆX is strongly consistent in the absence of outliers, in practice one often wants to get the labeling in addition to the clustering matrix. Therefore it is usually needed to carry out the last eigen-decomposition step in Algorithm 1. Since X0 is the clustering matrix, its principal eigenvectors are blockwise constant. In order to show small mis-clustering error one needs to show that the eigenvectors of ˆX are converging (modulo a rotation) to those of X0. This is achieved by a careful application of Davis-Kahan theorem, a detailed discussion of which we defer to the analysis in Section 4. The Davis-Kahan theorem lets one bound the deviation of the r principal eigenvectors ˆU of a Hermitian matrix ˆ M, from the r principal eigenvectors U of M as : ∥ˆU −UO∥F ≤23/2∥M − ˆ M∥F /(λr −λr+1) [25], where λr is the rth largest eigenvalue of M and O is the optimal rotation matrix. For a complete statement of the theorem see Appendix F. Applying the result to X0 and ˜K provides us with two different upper bounds on the distance between leading eigenvectors. We will see in Theorem 3 that the eigengap derived by two algorithms differ, which results in different upper bounds for number of misclustered nodes. Since the Davis-Kahan bounds are tight up-to a constant [25], despite being upper bounds, this indicates that algorithm 1 is less sensitive to the separation between cluster means than Algorithm 2. Once the eigenvector deviation is established, we present explicit bounds on mis-clustering error for both methods in the following theorem. K-means assigns each row of ˆU (input eigenvectors of K or ˆX) to one of r clusters. Define c1 · · · , cn ∈Rr such that ci is the centroid corresponding to the ith row of ˆU. Similarly, for the population eigenvectors U (top r eigenvectors of ˜K or X0), we define the population centroids as (Zν)i , for some ν ∈Rr×r. Recall that we construct Z such that the outliers are equally and arbitrarily divided amongst the r clusters. We show that when the empirical centroids are close to the population centroids with a rotation, then the node will be correctly clustered. We give a general definition of a superset of the misclustered nodes applicable both to K-SVD and SDP: M = {i : ∥ci −ZiνO∥≥1/ p 2n/r} (4) Theorem 3. Let Msdp and Mksvd be defined as Eq. 4, where ci’s are generated from Algorithm 1 and 2 respectively. Let λr be the rth largest eigenvalue value of ˜K. We have: |Msdp| ≤max oP (1), OP m γmin |Mksvd| ≤OP max mn2 r(λr −λr+1)2 , n3 log p rp(λr −λr+1)2 5 Remark 3. Getting a bound for λr in terms of γmin for general blockwise constant matrices is difficult. But as shown in Lemma 1, the eigengap is Ω(n/rλmin(B)). Plugging this back in we have, |Mksvd| ≤max OP mr λmin(B)2 , OP nr log p/p λmin(B)2 . In some simple cases one can get explicit bounds for λr, and we have the following. Corollary 1. Consider the special case when all clusters share the same variance σ2 and dkℓare identical for all pairs of clusters. The number of misclustered nodes of K-SVD is upper bounded by: |Mksvd| ≤max OP mr γ2 min , OP nr log p/p γ2 min (5) Corollary 1 is proved in Appendix H. Remark 4. The situation may happen if cluster center for a is of the form cea where ea is a binary vector with ea(i) = 1a=i. In this case, the algorithm is weakly consistent (fraction of misclassified nodes vanish) when γmin = Ω max{ q r log p p , p mr/n} . Compared to |Msdp|, |Mksvd| an additional factor of r γmin . With same m, n, the algorithm has worse upper bound of errors and is more sensitive to γmin, which depends both on the data distribution and the scale parameter of the kernel. The proposed SDP can be seen as a denoising procedure which enlarges the separation. It succeeds as long as the denoising is faithful, which requires much weaker assumptions. 4 Proof of the main results In this section, we show the proof sketch of the main theorems. The full proofs are deferred to supplementary materials. 4.1 Proof of Theorem 1 In Theorem 1, we show that if the data distribution is sub-gaussian, the ℓ∞norm of K −˜K restricted on the inlier nodes concentrates with rate O q log p p . Proof sketch. With the Lipschitz condition, it suffices to show ∥Yi−Yj∥2 2 concentrates to d2 kℓ+σ2 k+σ2 ℓ. To do this, we decompose ∥Yi −Yj∥2 2 = ∥µk −µℓ∥2 2 + 2 (Wi−Wj)T √p (µk −µℓ) + ∥Wi−Wj∥2 2 p . Now it suffices to show the third term concentrates to σ2 k + σ2 ℓand the second term concentrates around 0. Note the fact that Wi −Wj is sub-gaussian, its square is sub-exponential. With sub-gaussian tail bound and a Bernstein type inequality for sub-exponential random variables, we prove the result. With the elementwise bound, the Frobenius norm of the matrix difference is just one more factor of n. Corollary 2. With probability at least 1 −n2p−ρc2, ∥KI×I −˜KI×I∥F ≤cn p log p/p. 4.2 Proof of Theorem 2 Lemma 2 is proved in Appendix D, where we make use of the optimality condition and the constraints in SDP-1. Equipped with Lemma 2 we’re ready to prove Theorem 2. Proof sketch. In the outlier-free ideal scenario, Lemma 2 along with the dualtiy of ℓ1 and ℓ∞norms we get ∥ˆX −X0∥1 ≤2∥K−˜ K∥∞∥ˆ X−X0∥1 γmin . Then by Theorem 1, we get the strong consistency result. When outliers are present, we have to derive a slightly different upper bound. The main idea is to divide the matrices into two parts, one corresponding to the rows and columns of inliers, and the other corresponding to those of the outliers. Now by the concentration result (Theorem 1) on K along with the fact that both the kernel function and X0, ˆX are bounded by 1; and the rows of ˆX sums to n/r because of the constraint in SDP-1, we obtain the proof. The full proof is deferred to Appendix E. 6 4.3 Proof of Theorem 3 Although Theorem 2 provides insights on how close the recovered matrix ˆX is to the ground truth, it remains unclear how the final clustering result behaves. In this section, we bound the number of misclassified points by bounding the distance in eigenvectors of ˆX and X0. We start by presenting a lemma that provides a bound for k-means step. K-means is a non-convex procedure and is usually hard to analyze directly. However, when the centroids are well-separated, it is possible to come up with sufficient conditions for a node to be correctly clustered. When the set of misclustered nodes is defined as Eq. 4, the cardinality of M is directly upper bounded by the distance between eigenvectors. To be explicit, we have the following lemma. Here ˆU denotes top r eigenvectors of K for K-SVD and ˆX for SDP. U denotes the top r eigenvectors of ˜K for K-SVD and X0 for SDP. O denotes the corresponding rotation that aligns the empirical eigenvectors to their population counterpart. Lemma 3. M is defined as Eq. (4), then |M| ≤8n r ∥ˆU −UO∥2 F . Lemma 3 is proved in Appendix G. Analysis of |Msdp|: In order to get the deviation in eigenvectors, note the rth eigenvalue of X0 is n/r, and r + 1th is 0, let U ∈Rn×r be top r eigenvectors of X and ˆU be eigenvectors of X0. By applying Davis-Kahan Theorem, we have ∃O, ∥ˆU −UO∥F ≤23/2∥ˆX −X0∥F n/r ≤ q 8∥ˆX −X0∥1 n/r = OP r mr nγmin (6) Applying Lemma 3, |Msdp| ≤8n r 23/2∥ˆX −X0∥F n/r !2 ≤cn r r mr nγmin 2 ≤OP m γmin Analysis of |Mksvd|: In the outlier-present kernel scenario, by Corollary 2, ∥K −˜K∥F ≤∥KI×I −˜KI×I∥F + ∥KR −˜KR∥F = OP (n p log p/p) + OP (√mn) Again by Davis-Kahan theorem, and the eigengap between λr and λr+1 of ˜K from Lemma 1, let U be the matrix with rows as the top r eigenvectors of ˜K. Let ˆU be its empirical counterpart. ∃O, ∥ˆU −UO∥F ≤23/2∥K −˜K∥F λr −λr+1 ≤OP max{√mn, n p log p/p} λr −λr+1 ! (7) Now we apply Lemma 3 and get the upper bound for number of misclustered nodes for K-SVD. |Mksvd| ≤8n r 23/2C max{√mn, n p log p/p} λr( ˜K) −λr+1( ˜K) !2 ≤Cn r max ( √mn λr −λr+1 2 , n2 log p p(λr −λr+1) ) ≤OP max mn2 r(λr −λr+1)2 , n3 log p rp(λr −λr+1)2 5 Experiments In this section, we collect some numerical results. For implementation of the proposed SDP, we use Alternating Direction Method of Multipliers that is used in [1]. In each synthetic experiment, we generate n −m inliers from r equal-sized clusters. The centers of the clusters are sparse and hidden in a p-dim noise. For each generated data set, we add in m observations of outliers. To capture the 7 (a) # clusters (b) # outliers (c) Separation Figure 1: Performance vs parameters: (a) Inlier accuracy vs number of cluster (n = p = 1500, m = 10, d2 = 0.125, σ = 1); (b) Inlier accuracy vs number of outliers (n = 1000, r = 5, d2 = 0.02, σ = 1, p = 500); (c) Inlier accuracy vs separation (n = 1000, r = 5, m = 50, σ = 1, p = 1000). arbitrary nature of the outliers, we generate half the outliers by a random Gaussian with large variance (100 times of the signal variance), and the other half by a uniform distribution that scatters across all clusters. We compare Algorithm 1 with 1) k-means by Lloyd’s algorithms; 2) kernel SVD and 3) kernel PCA by [19]. The evaluating metric is accuracy of inliers, i.e., number of correctly clustered nodes divided by the total number of inliers. To avoid the identification problem, we compare all permutations of the predicted labels to ground truth labels and record the best accuracy. Each set of parameter is run 10 replicates and the mean accuracy and standard deviation (shown as error bars) are reported. For all k-means used in the experiments we do 10 restarts and choose the one with smallest k-means loss. For each experiment, we change only one parameter and fix all the others. Figure 1 shows how the performance of different clustering algorithms change when (a) number of clusters, (b) number of outliers, (c) minimum distance between clusters, increase. The value of all parameters used are specified in the caption of the figure. Panel (a) shows the inlier accuracy for various methods as we increase number of clusters. It can be seen that with r growing, the performance of all methods deteriorate except for the SDP. We also examine the ℓ1 norm of X0 −ˆX, which remains stable as the number of clusters increases. Panel (b) describes the trend with respect to number of outliers. The accuracy of SDP on inliers is almost unaffected by the number of outliers while other methods suffer with large m. Panel (c) compares the performance as the minimum distance between cluster centers changes. Both SDP and K-SVD are consistent as the distance increases. Compared with K-SVD, SDP achieves consistency faster and variates less across random runs, which matches the analysis given in Section 3. 6 Conclusion In this paper, we investigate the consistency and robustness of two kernel-based clustering algorithms. We propose a semidefinite programming relaxation which is shown to be strongly consistent without outliers and weakly consistent in presence of arbitrary outliers. We also show that K-SVD is also weakly consistent in that the misclustering rate is going to zero as the observation grows and the outliers are of a small fraction of inliers. By comparing two methods, we conclude that although both are robust to outliers, the proposed SDP is less sensitive to the minimum separation between clusters. The experimental result also supports the theoretical analysis. 8 References [1] A. A. Amini and E. Levina. On semidefinite relaxations for the block model. arXiv preprint arXiv:1406.5647, 2014. [2] P. Awasthi and O. Sheffet. Improved spectral-norm bounds for clustering. In Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques, pages 37–49. Springer, 2012. [3] T. T. Cai, X. Li, et al. Robust and computationally feasible community detection in the presence of arbitrary outlier nodes. The Annals of Statistics, 43(3):1027–1059, 2015. [4] A. Christmann and I. Steinwart. Consistency and robustness of kernel-based regression in convex risk minimization. Bernoulli, pages 799–819, 2007. [5] S. Dasgupta and L. Schulman. A probabilistic analysis of em for mixtures of separated, spherical gaussians. The Journal of Machine Learning Research, 8:203–226, 2007. [6] K. De Brabanter, K. Pelckmans, J. De Brabanter, M. Debruyne, J. A. Suykens, M. Hubert, and B. De Moor. Robustness of kernel based regression: a comparison of iterative weighting schemes. In Artificial Neural Networks–ICANN 2009, pages 100–110. Springer, 2009. [7] M. Debruyne, M. Hubert, and J. A. Suykens. Model selection in kernel based regression using the influence function. Journal of Machine Learning Research, 9(10), 2008. [8] M. Debruyne, M. Hubert, and J. Van Horebeek. Detecting influential observations in kernel pca. Computational Statistics & Data Analysis, 54(12):3007–3019, 2010. [9] I. S. Dhillon, Y. Guan, and B. Kulis. Kernel k-means: spectral clustering and normalized cuts. In Proceedings of the tenth ACM SIGKDD international conference on KDD, pages 551–556. ACM, 2004. [10] L. Duan, L. Xu, Y. Liu, and J. Lee. Cluster-based outlier detection. Annals of Operations Research, 168(1):151–168, 2009. [11] N. El Karoui et al. On information plus noise kernel random matrices. The Annals of Statistics, 38(5):3191– 3216, 2010. [12] D.-W. Kim, K. Y. Lee, D. Lee, and K. H. Lee. Evaluation of the performance of clustering algorithms in kernel-induced feature space. Pattern Recognition, 38(4):607–611, 2005. [13] J. Kim and C. D. Scott. Robust kernel density estimation. The Journal of Machine Learning Research, 13(1):2529–2565, 2012. [14] J. MacQueen et al. Some methods for classification and analysis of multivariate observations. In Proceedings of the fifth Berkeley symposium on mathematical statistics and probability, volume 1, pages 281–297. Oakland, CA, USA., 1967. [15] D. G. Mixon, S. Villar, and R. Ward. Clustering subgaussian mixtures by semidefinite programming. arXiv preprint arXiv:1602.06612, 2016. [16] A. Y. Ng, M. I. Jordan, Y. Weiss, et al. On spectral clustering: Analysis and an algorithm. Advances in neural information processing systems, 2:849–856, 2002. [17] R. Pamula, J. K. Deka, and S. Nandi. An outlier detection method based on clustering. In 2011 Second International Conference on EAIT, pages 253–256. IEEE, 2011. [18] J. Peng and Y. Wei. Approximating k-means-type clustering via semidefinite programming. SIAM Journal on Optimization, 18(1):186–205, 2007. [19] B. Schölkopf, A. Smola, and K.-R. Müller. Nonlinear component analysis as a kernel eigenvalue problem. Neural computation, 10(5):1299–1319, 1998. [20] J. Shi and J. Malik. Normalized cuts and image segmentation. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 22(8):888–905, 2000. [21] H. Steinhaus. Sur la division des corp materiels en parties. Bull. Acad. Polon. Sci, 1:801–804, 1956. [22] U. Von Luxburg, M. Belkin, and O. Bousquet. Consistency of spectral clustering. The Annals of Statistics, pages 555–586, 2008. [23] L. Xu, K. Crammer, and D. Schuurmans. Robust support vector machine training via convex outlier ablation. In AAAI, volume 6, pages 536–542, 2006. [24] M.-S. Yang and K.-L. Wu. A similarity-based robust clustering method. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 26(4):434–448, 2004. [25] Y. Yu, T. Wang, and R. Samworth. A useful variant of the davis–kahan theorem for statisticians. Biometrika, 102(2):315–323, 2015. 9 | 2016 | 423 |
6,354 | Homotopy Smoothing for Non-Smooth Problems with Lower Complexity than O(1/ϵ) Yi Xu†∗, Yan Yan‡∗, Qihang Lin♮, Tianbao Yang u† † Department of Computer Science, University of Iowa, Iowa City, IA 52242 ‡ QCIS, University of Technology Sydney, NSW 2007, Australia ♮Department of Management Sciences, University of Iowa, Iowa City, IA 52242 {yi-xu, qihang-lin, tianbao-yang}@uiowa.edu, yan.yan-3@student.uts.edu.au Abstract In this paper, we develop a novel homotopy smoothing (HOPS) algorithm for solving a family of non-smooth problems that is composed of a non-smooth term with an explicit max-structure and a smooth term or a simple non-smooth term whose proximal mapping is easy to compute. The best known iteration complexity for solving such non-smooth optimization problems is O(1/ϵ) without any assumption on the strong convexity. In this work, we will show that the proposed HOPS achieved a lower iteration complexity of ˜O(1/ϵ1−θ) 1with θ ∈ (0, 1] capturing the local sharpness of the objective function around the optimal solutions. To the best of our knowledge, this is the lowest iteration complexity achieved so far for the considered non-smooth optimization problems without strong convexity assumption. The HOPS algorithm employs Nesterov’s smoothing technique and Nesterov’s accelerated gradient method and runs in stages, which gradually decreases the smoothing parameter in a stage-wise manner until it yields a sufficiently good approximation of the original function. We show that HOPS enjoys a linear convergence for many well-known non-smooth problems (e.g., empirical risk minimization with a piece-wise linear loss function and ℓ1 norm regularizer, finding a point in a polyhedron, cone programming, etc). Experimental results verify the effectiveness of HOPS in comparison with Nesterov’s smoothing algorithm and the primal-dual style of first-order methods. 1 Introduction In this paper, we consider the following optimization problem: min x∈Ω1 F(x) ≜f(x) + g(x) (1) where g(x) is a convex (but not necessarily smooth) function, Ω1 is a closed convex set and f(x) is a convex but non-smooth function which can be explicitly written as f(x) = max u∈Ω2⟨Ax, u⟩−φ(u) (2) where Ω2 ⊂Rm is a closed convex bounded set, A ∈Rm×d and φ(u) is a convex function, and ⟨·, ·⟩ is scalar product. This family of non-smooth optimization problems has applications in numerous domains, e.g., machine learning and statistics [7], image processing [6], cone programming [11], and etc. Several first-order methods have been developed for solving such non-smooth optimization ∗The first two authors make equal contributions. The work of Y. Yan was done when he was a visiting student at Department of Computer Science of the University of Iowa. 1 ˜O() suppresses a logarithmic factor. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. problems including the primal-dual methods [15, 6], Nesterov’s smoothing algorithm [16] 2, and they can achieve O(1/ϵ) iteration complexity for finding an ϵ-optimal solution, which is faster than the corresponding black-box lower complexity bounds by an order of magnitude. In this paper, we propose a novel homotopy smoothing (HOPS) algorithm for solving the problem in (1) that achieves a lower iteration complexity than O(1/ϵ). In particular, the iteration complexity of HOPS is given by ˜O(1/ϵ1−θ), where θ ∈(0, 1] captures the local sharpness (defined shortly) of the objective function around the optimal solutions. The proposed HOPS algorithm builds on the Nesterov’s smoothing technique, i.e., approximating the non-smooth function f(x) by a smooth function and optimizing the smoothed function to a desired accuracy level. The striking difference between HOPS and Nesterov’s smoothing algorithm is that Nesterov uses a fixed small smoothing parameter that renders a sufficiently accurate approximation of the nonsmooth function f(x), while HOPS adopts a homotopy strategy for setting the value of the smoothing parameter. It starts from a relatively large smoothing parameter and gradually decreases the smoothing parameter in a stage-wise manner until the smoothing parameter reaches a level that gives a sufficiently good approximation of the non-smooth objective function. The benefit of using a homotopy strategy is that a larger smoothing parameter yields a smaller smoothness constant and hence a lower iteration complexity for smoothed problems in earlier stages. For smoothed problems in later stages with larger smoothness constants, warm-start can help reduce the number of iterations to converge. As a result, solving a series of smoothed approximations with a smoothing parameter from large to small and with warm-start is faster than solving one smoothed approximation with a very small smoothing parameter. To the best of our knowledge, this is the first work that rigorously analyzes such a homotopy smoothing algorithm and establishes its theoretical guarantee on lower iteration complexities. The keys to our analysis of lower iteration complexity are (i) to leverage a global error inequality (Lemma 1) [21] that bounds the distance of a solution to the ϵ sublevel set by a multiple of the functional distance; and (ii) to explore a local error bound condition to bound the multiplicative factor. 2 Related Work In this section, we review some related work for solving the considered family of non-smooth optimization problems. In the seminal paper by Nesterov [16], he proposed a smoothing technique for a family of structured non-smooth optimization problems as in (1) with g(x) being a smooth function and f(x) given in (2). By adding a strongly convex prox function in terms of u with a smoothing parameter µ into the definition of f(x), one can obtain a smoothed approximation of the original objective function. Then he developed an accelerated gradient method with an O(1/t2) convergence rate for the smoothed objective function with t being the number of iterations, which implies an O(1/t) convergence rate for the original objective function by setting µ ≈c/t with c being a constant. The smoothing technique has been exploited to solving problems in machine learning, statistics, cone programming [7, 11, 24]. The primal-dual style of first-order methods treat the problem as a convex-concave minimization problem, i.e., min x∈Ω1 max u∈Ω2 g(x) + ⟨Ax, u⟩−φ(u) Nemirovski [15] proposed a mirror prox method, which has a convergence rate of O(1/t) by assuming that both g(x) and φ(u) are smooth functions. Chambolle & Pock [6] designed first-order primal-dual algorithms, which tackle g(x) and φ(u) using proximal mapping and achieve the same convergence rate of O(1/t) without assuming smoothness of g(x) and φ(u). When g(x) or φ(u) is strongly convex, their algorithms achieve O(1/t2) convergence rate. The effectiveness of their algorithms was demonstrated on imaging problems. Recently, the primal-dual style of first-order methods have been employed to solve non-smooth optimization problems in machine learning where both the loss function and the regularizer are non-smooth [22]. Lan et al. [11] also considered Nemirovski’s prox method for solving cone programming problems. The key condition for us to develop an improved convergence is closely related to local error bounds (LEB) [17] and more generally the Kurdyka-Łojasiewicz property [12, 4]. The LEB characterizes 2The algorithm in [16] was developed for handling a smooth component g(x), which can be extended to handling a non-smooth component g(x) whose proximal mapping is easy to compute. 2 the relationship between the distance of a local solution to the optimal set and the optimality gap of the solution in terms of objective value. The Kurdyka-Łojasiewicz property characterizes that property of a function that whether it can be made “sharp” by some transformation. Recently, these conditions/properties have been explored for feasible descent methods [13], non-smooth optimization [8], gradient and subgradient methods [10, 21]. It is notable that our local error bound condition is different from the one used in [13, 25] which bounds the distance of a point to the optimal set by the norm of the projected or proximal gradient at that point instead of the functional distance, consequentially it requires some smoothness assumption about the objective function. By contrast, the local error bound condition in this paper covers a much broad family of functions and thus it is more general. Recent work [14, 23] have shown that the error bound in [13, 25] is a special case of our considered error bound with θ = 1/2. Two mostly related work leveraging a similar error bound to ours are discussed in order. Gilpin et al. [8] considered the two-person zero-sum games, which is a special case of (1) with g(x) and φ(u) being zeros and Ω1 and Ω2 being polytopes. The present work is a non-trivial generalization of their work that leads to improved convergence for a much broader family of non-smooth optimization problems. In particular, their result is just a special case of our result when the constant θ that captures the local sharpness is one for problems whose epigraph is a polytope. Recently, Yang & Lin [21] proposed a restarted subgradient method by exploring the local error bound condition or more generally the Kurdyka-Łojasiewicz property, resulting in an ˜O(1/ϵ2(1−θ)) iteration complexity with the same constant of θ. In contrast, our result is an improved iteration complexity of ˜O(1/ϵ1−θ). It is worth emphasizing that the proposed homotopy smoothing technique is different from recently proposed homotopy methods for sparse learning (e.g., ℓ1 regularized least-squares problem [20]), though a homotopy strategy on an involved parameter is also employed to boost the convergence. In particular, the involved parameter in the homotopy methods for sparse learning is the regularization parameter before the ℓ1 regularization, while the parameter in the present work is the introduced smoothing parameter. In addition, the benefit of starting from a relatively large regularization parameter in sparse learning is the sparsity of the solution, which makes it possible to explore the restricted strong convexity for proving faster convergence. We do not make such assumption of the data and we are mostly interested in that when both f(x) and g(x) are non-smooth. Finally, we note that a similar homotopy (a.k.a continuation) strategy is employed in Nesterov’s smoothing algorithm for solving an ℓ1 norm minimization problem subject to a constraint for recovering a sparse solution [3]. However, we would like to draw readers’ attention to that they did not provide any theoretical guarantee on the iteration complexity of the homotopy strategy and consequentially their implementation is ad-hoc without guidance from theory. More importantly, our developed algorithms and theory apply to a much broader family of problems. 3 Preliminaries We present some preliminaries in this section. Let ∥x∥denote the Euclidean norm on the primal variable x. A function h(x) is L-smooth in terms of ∥· ∥, if ∥∇h(x) −∇h(y)∥≤L∥x −y∥. Let ∥u∥+ denote a norm on the dual variable, which is not necessarily the Euclidean norm. Denote by ω+(u) a 1-strongly convex function of u in terms of ∥· ∥+. For the optimization problem in (1), we let Ω∗, F∗denote the set of optimal solutions and optimal value, respectively, and make the following assumption throughout the paper. Assumption 1. For a convex minimization problem (1), we assume (i) there exist x0 ∈Ω1 and ϵ0 ≥0 such that F(x0) −minx∈Ω1 F(x) ≤ϵ0; (ii) f(x) is characterized as in (2), where φ(u) is a convex function; (iii) There exists a constant D such that maxu∈Ω2 ω+(u) ≤D2/2; (iv) Ω∗is a non-empty convex compact set. Note that: 1) Assumption 1(i) assumes that the objective function is lower bounded; 2) Assumption 1(iii) assumes that Ω2 is a bounded set, which is also required in [16]. In addition, for brevity we assume that g(x) is simple enough 3 such that the proximal mapping defined below is easy to compute similar to [6]: Pλg(x) = min z∈Ω1 1 2∥z −x∥2 + λg(z) (3) 3If g(x) is smooth, this assumption can be relaxed. We will defer the discussion and result on a smooth function g(x) to the supplement. 3 Relying on the proximal mapping, the key updates in the optimization algorithms presented below take the following form: Πc v,λg(x) = arg min z∈Ω1 c 2∥z −x∥2 + ⟨v, z⟩+ λg(z) (4) For any x ∈Ω1, let x∗denote the closest optimal solution in Ω∗to x measured in terms of ∥· ∥, i.e., x∗= arg minz∈Ω∗∥z −x∥2, which is unique because Ω∗is a non-empty convex compact set We denote by Lϵ the ϵ-level set of F(x) and by Sϵ the ϵ-sublevel set of F(x), respectively, i.e., Lϵ = {x ∈Ω1 : F(x) = F∗+ ϵ}, Sϵ = {x ∈Ω1 : F(x) ≤F∗+ ϵ} It follows from [18] (Corollary 8.7.1) that the sublevel set Sϵ is bounded for any ϵ ≥0 and so as the level set Lϵ due to that Ω∗is bounded. Define dist(Lϵ, Ω∗) to be the maximum distance of points on the level set Lϵ to the optimal set Ω∗, i.e., dist(Lϵ, Ω∗) = max x∈Lϵ dist(x, Ω∗) ≜min z∈Ω∗∥x −z∥ . (5) Due to that Lϵ and Ω∗are bounded, dist(Lϵ, Ω∗) is also bounded. Let x† ϵ denote the closest point in the ϵ-sublevel set to x, i.e., x† ϵ = arg min z∈Sϵ ∥z −x∥2 (6) It is easy to show that x† ϵ ∈Lϵ when x /∈Sϵ (using the KKT condition). 4 Homotopy Smoothing 4.1 Nesterov’s Smoothing We first present the Nesterov’s smoothing technique and accelerated proximal gradient methods for solving the smoothed problem due to that the proposed algorithm builds upon these techniques. The idea of smoothing is to construct a smooth function fµ(x) that well approximates f(x). Nesterov considered the following function fµ(x) = max u∈Ω2⟨Ax, u⟩−φ(u) −µω+(u) It was shown in [16] that fµ(x) is smooth w.r.t ∥· ∥and its smoothness parameter is given by Lµ = 1 µ∥A∥2 where ∥A∥is defined by ∥A∥= max∥x∥≤1 max∥u∥+≤1⟨Ax, u⟩. Denote by uµ(x) = arg max u∈Ω2⟨Ax, u⟩−φ(u) −µω+(u) The gradient of fµ(x) is computed by ∇fµ(x) = A⊤uµ(x). Then fµ(x) ≤f(x) ≤fµ(x) + µD2/2 (7) From the inequality above, we can see that when µ is very small, fµ(x) gives a good approximation of f(x). This motivates us to solve the following composite optimization problem min x∈Ω1 Fµ(x) ≜fµ(x) + g(x) Many works have studied such an optimization problem [2, 19] and the best convergence rate is given by O(Lµ/t2), where t is the total number of iterations. We present a variant of accelerated proximal gradient (APG) methods in Algorithm 1 that works even with ∥x∥replaced with a general norm as long as its square is strongly convex. We make several remarks about Algorithm 1: (i) the variant here is similar to Algorithm 3 in [19] and the algorithm proposed in [16] except that the prox function d(x) is replaced by ∥x −x0∥2/2 in updating the sequence of zk, which is assumed to be σ1-strongly convex w.r.t ∥· ∥; (ii) If ∥· ∥is simply the Euclidean norm, a simplified algorithm with only one update in (4) can be used (e.g., FISTA [2]); (iii) if Lµ is difficult to compute, we can use the backtracking trick (see [2, 19]). The following theorem states the convergence result for APG. Theorem 2. ([19]) Let θk = 2 k+2, αk = 2 k+1, k ≥0 or αk+1 = θk+1 = √ θ4 k+4θ2 k−θ2 k 2 , k ≥0. For any x ∈Ω1, we have Fµ(xt) −Fµ(x) ≤2Lµ∥x −x0∥2 t2 (8) 4 Algorithm 1 An Accelerated Proximal Gradient Method: APG(x0, t, Lµ) 1: Input: the number of iterations t, the initial solution x0, and the smoothness constant Lµ 2: Let θ0 = 1, V−1 = 0, Γ−1 = 0, z0 = x0 3: Let αk and θk be two sequences given in Theorem 2. 4: for k = 0, . . . , t −1 do 5: Compute yk = (1 −θk)xk + θkzk 6: Compute vk = ∇fµ(yk), Vk = Vk−1 + vk αk , and Γk = Γk−1 + 1 αk 7: Compute zk+1 = ΠLµ/σ1 Vk,Γkg(x0) and xk+1 = ΠLµ vk,g(yk) 8: end for 9: Output: xt Combining the above convergence result with the relation in (7), we can establish the iteration complexity of Nesterov’s smoothing algorithm for solving the original problem (1). Corollary 3. For any x ∈Ω1, we have F(xt) −F(x) ≤µD2/2 + 2Lµ∥x −x0∥2 t2 (9) In particular in order to have F(xt) ≤F∗+ ϵ, it suffices to set µ ≤ ϵ D2 and t ≥2D∥A∥∥x0−x∗∥ ϵ , where x∗is an optimal solution to (1). 4.2 Homotopy Smoothing From the convergence result in (9), we can see that in order to obtain a very accurate solution, we have to set µ - the smoothing parameter - to be a very small value, which will cause the blow-up of the second term because Lµ ∝1/µ. On the other hand, if µ is set to be a relatively large value, then t can be set to be a relatively small value to match the first term in the R.H.S. of (9), which may lead to a not sufficiently accurate solution. It seems that the O(1/ϵ) is unbeatable. However, if we adopt a homotopy strategy, i.e., starting from a relatively large value µ and optimizing the smoothed function with a certain number of iterations t such that the second term in (9) matches the first term, which will give F(xt) −F(x∗) ≤O(µ). Then we can reduce the value of µ by a constant factor b > 1 and warm-start the optimization process from xt. The key observation is that although µ decreases and Lµ increases, the other term ∥x∗−xt∥is also reduced compared to ∥x∗−x0∥, which could cancel the blow-up effect caused by increased Lµ. As a result, we expect to use the same number of iterations to optimize the smoothed function with a smaller µ such that F(x2t) −F(x∗) ≤O(µ/b). To formalize our observation, we need the following key lemma. Lemma 1 ([21]). For any x ∈Ω1 and ϵ > 0, we have ∥x −x† ϵ∥≤dist(x† ϵ, Ω∗) ϵ (F(x) −F(x† ϵ)) where x† ϵ ∈Sϵ is the closest point in the ϵ-sublevel set to x as defined in (6). The lemma is proved in [21]. We include its proof in the supplement. If we apply the above bound into (9), we will see in the proof of the main theorem (Theorem 5) that the number of iterations t for solving each smoothed problem is roughly O( dist(Lϵ,Ω∗) ϵ ), which will be lower than O( 1 ϵ ) in light of the local error bound condition given below. Definition 4 (Local error bound (LEB)). A function F(x) is said to satisfy a local error bound condition if there exist θ ∈(0, 1] and c > 0 such that for any x ∈Sϵ dist(x, Ω∗) ≤c(F(x) −F∗)θ (10) Remark: In next subsection, we will discuss the relationship with other types of conditions and show that a broad family of non-smooth functions (including almost all commonly seen functions in machine learning) obey the local error bound condition. The exponent constant θ can be considered as a local sharpness measure of the function. Figure 1 illustrates the sharpness of F(x) = |x|p for p = 1, 1.5, and 2 around the optimal solutions and their corresponding θ. With the local error bound condition, we can see that dist(Lϵ, Ω∗) ≤cϵθ, θ ∈(0, 1]. Now, we are ready to present the homotopy smoothing algorithm and its convergence guarantee under the 5 Algorithm 2 HOPS for solving (1) 1: Input: m, t, x0 ∈Ω1, ϵ0, D2 and b > 1. 2: Let µ1 = ϵ0/(bD2) 3: for s = 1, . . . , m do 4: Let xs = APG(xs−1, t, Lµs) 5: Update µs+1 = µs/b 6: end for 7: Output: xm −0.1 −0.05 0 0.05 0.1 0 0.02 0.04 0.06 0.08 0.1 x F(x) |x|, θ=1 |x|1.5, θ=2/3 |x|2, θ=0.5 Figure 1: Illustration of local sharpness of three functions and the corresponding θ in the LEB condition. local error bound condition. The HOPS algorithm is presented in Algorithm 2, which starts from a relatively large smoothing parameter µ = µ1 and gradually reduces µ by a factor of b > 1 after running a number t of iterations of APG with warm-start. The iteration complexity of HOPS is established in Theorem 5. We include the proof in the supplement. Theorem 5. Suppose Assumption 1 holds and F(x) obeys the local error bound condition. Let HOPS run with t = O( 2bcD∥A∥ ϵ1−θ ) ≥ 2bcD∥A∥ ϵ1−θ iterations for each stage, and m = ⌈logb( ϵ0 ϵ )⌉. Then F(xm) −F∗≤2ϵ. Hence, the iteration complexity for achieving an 2ϵ-optimal solution is 2bcD∥A∥ ϵ1−θ ⌈logb( ϵ0 ϵ )⌉in the worst-case. 4.3 Local error bounds and Applications In this subsection, we discuss the local error bound condition and its application in non-smooth optimization problems. The Hoffman’s bound and finding a point in a polyhedron. A polyhedron can be expressed as P = {x ∈Rd; B1x ≤b1, B2x = b2}. The Hoffman’s bound [17] is expressed as dist(x, P) ≤c(∥(B1x −b1)+∥+ ∥B2x −b2∥), ∃c > 0 (11) where [s]+ = max(0, s). This can be considered as the error bound for the polyhedron feasibility problem, i.e., finding a x ∈P, which is equivalent to min x∈Rd F(x) ≜ ∥(B1x −b1)+∥+ ∥B2x −b2∥= max u∈Ω2⟨B1x −b1, u1⟩+ ⟨B2x −b2, u2⟩ where u = (u⊤ 1 , u⊤ 2 )⊤and Ω2 = {u|u1 ⪰0, ∥u1∥≤1, ∥u2∥≤1}. If there exists a x ∈P, then F∗= 0. Thus the Hoffman’s bound in (11) implies a local error bound (10) with θ = 1. Therefore, the HOPS has a linear convergence for finding a feasible solution in a polyhedron. If we let ω+(u) = 1 2∥u∥2 then D2 = 2 so that the iteration complexity is 2 √ 2bc max(∥B1∥, ∥B2∥)⌈logb( ϵ0 ϵ )⌉. Cone programming. Let U, V denote two vector spaces. Given a linear opearator E : U →V ∗4, a closed convex set Ω⊆U, and a vector e ∈V ∗, and a closed convex cone K ⊆V , the general constrained cone linear system (cone programing) consists of finding a vector x ∈Ωsuch that Ex −e ∈K∗. Lan et al. [11] have considered Nesterov’s smoothing algorithm for solving the cone programming problem with O(1/ϵ) iteration complexity. The problem can be cast into a non-smooth optimization problem: min x∈ΩF(x) ≜ dist(Ex −e, K∗) = max ∥u∥≤1,u∈−K⟨Ex −e, u⟩ Assume that e ∈Range(E) −K∗, then F∗= 0. Burke et al. [5] have considered the error bound for such problems and their results imply that there exists c > 0 such that dist(x, Ω∗) ≤c(F(x) −F∗) as long as ∃x ∈Ω, s.t. Ex −e ∈int(K∗), where Ω∗denotes the optimal solution set. Therefore, the HOPS also has a linear convergence for cone programming. Considering that both U and V are Euclidean spaces, we set ω+(u) = 1 2∥u∥2 then D2 = 1. Thus, the iteraction complexity of HOPS for finding an 2ϵ-solution is 2bc∥E∥⌈logb( ϵ0 ϵ )⌉. Non-smooth regularized empirical loss (REL) minimization in Machine Learning The REL consists of a sum of loss functions on the training data and a regularizer, i.e., min x∈Rd F(x) ≜1 n n X i=1 ℓ(x⊤ai, yi) + λg(x) 4V ∗represents the dual space of V . The notations and descriptions are adopted from [11]. 6 where (ai, yi), i = 1, . . . , n denote pairs of a feature vector and a label of training data. Non-smooth loss functions include hinge loss ℓ(z, y) = max(0, 1 −yz), absolute loss ℓ(z, y) = |z −y|, which can be written as the max structure in (2). Non-smooth regularizers include e.g., g(x) = ∥x∥1, g(x) = ∥x∥∞. These loss functions and regularizers are essentially piecewise linear functions, whose epigraph is a polyhedron. The error bound condition has been developed for such kind of problems [21]. In particular, if F(x) has a polyhedral epigraph, then there exists c > 0 such that dist(x, Ω∗) ≤c(F(x) −F∗) for any x ∈Rd. It then implies HOPS has an O(log(ϵ0/ϵ)) iteration complexity for solving a non-smooth REL minimization with a polyhedral epigraph. Yang et al. [22] has also considered such non-smooth problems, but they only have O(1/ϵ) iteration complexity. When F(x) is essentially locally strongly convex [9] in terms of ∥· ∥such that 5 dist2(x, Ω∗) ≤2 σ (F(x) −F∗), ∀x ∈Sϵ (12) then we can see that the local error bound holds with θ = 1/2, which implies the iteration complexity of HOPS is ˜O( 1 √ϵ), which is up to a logarithmic factor the same as the result in [6] for a strongly convex function. However, here only local strong convexity is sufficient and there is no need to develop a different algorithm and different analysis from the non-strongly convex case as done in [6]. For example, one can consider F(x) = ∥Ax −y∥p p = Pn i=1 |a⊤ i x −yi|p, p ∈(1, 2), which satisfies (12) according to [21]. The Kurdyka-Łojasiewicz (KL) property. The definition of KL property is given below. Definition 6. The function F(x) is said to have the KL property at x∗∈Ω∗if there exist η ∈(0, ∞], a neighborhood U of x∗and a continuous concave function ϕ : [0, η) →R+ such that i) ϕ(0) = 0, ϕ is continuous on (0, η), ii) for all s ∈(0, η), ϕ′(s) > 0, iii) and for all x ∈U ∪{x : F(x∗) < F(x) < F(x∗) + η}, the KL inequality ϕ′(F(x) −F(x∗))∥∂F(x)∥≥1 holds. The function ϕ is called the desingularizing function of F at x∗, which makes the function F(x) sharp by reparameterization. An important desingularizing function is in the form of ϕ(s) = cs1−β for some c > 0 and β ∈[0, 1), which gives the KL inequality ∥∂F(x)∥≥ 1 c(1−β)(F(x) −F(x∗))β. It has been established that the KL property is satisfied by a wide class of non-smooth functions definable in an o-minimal structure [4]. Semialgebraic functions and (globally) subanalytic functions are for instance definable in their respective classes. While the definition of KL property involves a neighborhood U and a constant η, in practice many convex functions satisfy the above property with U = Rd and η = ∞[1]. The proposition below shows that a function with the KL property with a desingularizing function ϕ(s) = cs1−β obeys the local error bound condition in (10) with θ = 1 −β ∈(0, 1], which implies an iteration complexity of ˜O(1/ϵθ) of HOPS for optimizing such a function. Proposition 1. (Theorem 5 [10]) Let F(x) be a proper, convex and lower-semicontinuous function that satisfies KL property at x∗and U be a neighborhood of x∗. For all x ∈U ∩{x : F(x∗) < F(x) < F(x∗)+η}, if ∥∂F(x)∥≥ 1 c(1−β)(F(x)−F(x∗))β, then dist(x, Ω∗) ≤c(F(x)−F∗)1−β. 4.4 Primal-Dual Homotopy Smoothing (PD-HOPS) Finally, we note that the required number of iterations per-stage t for finding an ϵ accurate solution depends on an unknown constant c and sometimes θ. Thus, an inappropriate setting of t may lead to a less accurate solution. In practice, it can be tuned to obtain the fastest convergence. A way to eschew the tuning is to consider a primal-dual homotopy smoothing (PD-HOPS). Basically, we also apply the homotopy smoothing to the dual problem: max u∈Ω2 Φ(u) ≜−φ(u) + min x∈Ω1⟨A⊤u, x⟩+ g(x) Denote by Φ∗the optimal value of the above problem. Under some mild conditions, it is easy to see that Φ∗= F∗. By extending the analysis and result to the dual problem, we can obtain that F(xs) −F∗≤ϵ + ϵs and Φ∗−Φ(us) ≤ϵ + ϵs after the s-th stage with a sufficient number of iterations per-stage. As a result, we get F(xs) −Φ(us) ≤2(ϵ + ϵs). Therefore, we can use the duality gap F(xs) −Φ(us) as a certificate to monitor the progress of optimization. As long as the above inequality holds, we restart the next stage. Then with at most m = ⌈logb(ϵ0/ϵ)⌉epochs 5This is true if g(x) is strongly convex or locally strongly convex. 7 Table 1: Comparison of different optimization algorithms by the number of iterations and running time in second (mean ± standard deviation) for achieving a solution that satisfies F(x) −F∗≤ϵ. Linear Classification Image Denoising Matrix Decomposition ϵ = 10−4 ϵ = 10−5 ϵ = 10−3 ϵ = 10−4 ϵ = 10−3 ϵ = 10−4 PD 9861 (1.58±0.02) 27215 (4.33±0.06) 8078 (22.01±0.51) 34292 (94.26±2.67) 2523 (4.02±0.10) 3441 (5.65±0.20) APG-D 4918 (2.44±0.22) 28600 (11.19±0.26) 179204 (924.37±59.67) 1726043 (9032.69±539.01) 1967 (6.85±0.08) 8622 (30.36±0.11) APG-F 3277 (1.33±0.01) 19444 (7.69±0.07) 14150 (40.90±2.28) 91380 (272.45±14.56) 1115 (3.76±0.06) 4151 (9.16±0.10) HOPS-D 1012 (0.44±0.02) 4101 (1.67±0.01) 3542 (13.77±0.13) 4501 (17.38±0.10) 224 (1.36±0.02) 313 (1.51±0.03) HOPS-F 1009 (0.46±0.02) 4102 (1.69±0.04) 2206 (6.99±0.15) 3905 (16.52±0.08) 230 (0.91±0.01) 312 (1.23±0.01) PD-HOPS 846 (0.36±0.01) 3370 (1.27±0.02) 2538 (7.97±0.13) 3605 (11.39±0.10) 124 (0.45±0.01) 162 (0.64±0.01) we get F(xm) −Φ(um) ≤2(ϵ + ϵm) ≤4ϵ. Similarly, we can show that PD-HOPS enjoys an ˜O(max{1/ϵ1−θ, 1/ϵ1−˜θ}) iteration complexity, where ˜θ is the exponent constant in the local error bound of the objective function for dual problem. For example, for linear classification problems with a piecewise linear loss and ℓ1 norm regularizer we can have θ = 1 and ˜θ = 1, and PD-HOPS enjoys a linear convergence. Due to the limitation of space, we defer the details of PD-HOPS and its analysis into the supplement. 5 Experimental Results In this section, we present some experimental results to demonstrate the effectiveness of HOPS and PD-HOPS by comparing with two state-of-the-art algorithms, the first-order Primal-Dual (PD) method [6] and the Nesterov’s smoothing with Accelerated Proximal Gradient (APG) methods. For APG, we implement two variants, where APG-D refers to the variant with the dual averaging style of update on one sequence of points (i.e., Algorithm 1) and APG-F refers to the variant of the FISTA style [2]. Similarly, we also implement the two variants for HOPS. We conduct experiments for solving three problems: (1) an ℓ1-norm regularized hinge loss for linear classification on the w1a dataset 6; (2) a total variation based ROF model for image denoising on the Cameraman picture 7; (3) a nuclear norm regularized absolute error minimization for low-rank and sparse matrix decomposition on a synthetic data. More details about the formulations and experimental setup can be found in the supplement. To make fair comparison, we stop each algorithm when the optimality gap is less than a given ϵ and count the number of iterations and the running time that each algorithm requires. The optimal value is obtained by running PD with a sufficiently large number of iterations such that the duality gap is very small. We present the comparison of different algorithms on different tasks in Table 1, where for PD-HOPS we only report the results of using the faster variant of APG, i.e., APG-F. We repeat each algorithm 10 times for solving a particular problem and then report the averaged running time in second and the corresponding standard deviations. The running time of PD-HOPS only accounts the time for updating the primal variable since the updates for the dual variable are fully decoupled from the primal updates and can be carried out in parallel. From the results, we can see that (i) HOPS converges consistently faster than their APG variants especially when ϵ is small; (ii) PD-HOPS allows for choosing the number of iterations at each epoch automatically, yielding faster convergence speed than HOPS with manual tuning; (iii) both HOPS and PD-HOPS are significantly faster than PD. 6 Conclusions In this paper, we have developed a homotopy smoothing (HOPS) algorithm for solving a family of structured non-smooth optimization problems with formal guarantee on the iteration complexities. We show that the proposed HOPS can achieve a lower iteration complexity of ˜O(1/ϵ1−θ) with θ ∈(0, 1] for obtaining an ϵ-optimal solution under a mild local error bound condition. The experimental results on three different tasks demonstrate the effectiveness of HOPS. Acknowlegements We thank the anonymous reviewers for their helpful comments. Y. Xu and T. Yang are partially supported by National Science Foundation (IIS-1463988, IIS-1545995). 6https://www.csie.ntu.edu.tw/∼cjlin/libsvmtools/datasets/ 7http://pages.cs.wisc.edu/∼swright/TVdenoising/ 8 References [1] H. Attouch, J. Bolte, P. Redont, and A. Soubeyran. Proximal alternating minimization and projection methods for nonconvex problems: An approach based on the kurdyka-lojasiewicz inequality. Math. Oper. Res., 35:438–457, 2010. [2] A. Beck and M. Teboulle. A fast iterative shrinkage-thresholding algorithm for linear inverse problems. SIAM J. Img. Sci., 2:183–202, 2009. [3] S. Becker, J. Bobin, and E. J. Candès. Nesta: A fast and accurate first-order method for sparse recovery. SIAM J. Img. Sci., 4:1–39, 2011. [4] J. Bolte, A. Daniilidis, and A. Lewis. The łojasiewicz inequality for nonsmooth subanalytic functions with applications to subgradient dynamical systems. SIAM J. Optim., 17:1205–1223, 2006. [5] J. V. Burke and P. Tseng. A unified analysis of hoffman’s bound via fenchel duality. SIAM J. Optim., 6(2):265–282, 1996. [6] A. Chambolle and T. Pock. A first-order primal-dual algorithm for convex problems with applications to imaging. J. Math. Img. Vis., 40:120–145, 2011. [7] X. Chen, Q. Lin, S. Kim, J. G. Carbonell, and E. P. Xing. Smoothing proximal gradient method for general structured sparse regression. Ann. Appl. Stat., 6(2):719–752, 06 2012. [8] A. Gilpin, J. Peña, and T. Sandholm. First-order algorithm with log(1/epsilon) convergence for epsilonequilibrium in two-person zero-sum games. Math. Program., 133(1-2):279–298, 2012. [9] R. Goebel and R. T. Rockafellar. Local strong convexity and local lipschitz continuity of the gradient of convex functions. J. Convex Anal., 15(2):263–270, 2008. [10] J. P. B. S. Jerome Bolte, Trong Phong Nguyen. From error bounds to the complexity of first-order descent methods for convex functions. CoRR, abs/1510.08234, 2015. [11] G. Lan, Z. Lu, and R. D. C. Monteiro. Primal-dual first-order methods with O(1/e) iteration-complexity for cone programming. Math. Program., 126(1):1–29, 2011. [12] S. Łojasiewicz. Ensembles semi-analytiques. Institut des Hautes Etudes Scientifiques, 1965. [13] Z.-Q. Luo and P. Tseng. Error bounds and convergence analysis of feasible descent methods: a general approach. Ann. Oper. Res., 46(1):157–178, 1993. [14] I. Necoara, Y. Nesterov, and F. Glineur. Linear convergence of first order methods for non-strongly convex optimization. CoRR, abs/1504.06298, 2015. [15] A. Nemirovski. Prox-method with rate of convergence o(1/t) for variational inequalities with lipschitz continuous monotone operators and smooth convex-concave saddle point problems. SIAM J. Optim., 15(1):229–251, Jan. 2005. [16] Y. Nesterov. Smooth minimization of non-smooth functions. Math. Program., 103(1):127–152, 2005. [17] J. Pang. Error bounds in mathematical programming. Math. Program., 79:299–332, 1997. [18] R. Rockafellar. Convex Analysis. Princeton mathematical series. Princeton University Press, 1970. [19] P. Tseng. On accelerated proximal gradient methods for convex-concave optimization. submitted to SIAM J. Optim., 2008. [20] L. Xiao and T. Zhang. A proximal-gradient homotopy method for the sparse least-squares problem. SIAM J. Optim., 23(2):1062–1091, 2013. [21] T. Yang and Q. Lin. Rsg: Beating subgradient method without smoothness and strong convexity. CoRR, abs/1512.03107, 2016. [22] T. Yang, M. Mahdavi, R. Jin, and S. Zhu. An efficient primal-dual prox method for non-smooth optimization. Machine Learning, 2014. [23] H. Zhang. New analysis of linear convergence of gradient-type methods via unifying error bound conditions. arXiv:1606.00269, 2016. [24] X. Zhang, A. Saha, and S. Vishwanathan. Smoothing multivariate performance measures. JMLR, 13(Dec):3623–3680, 2012. [25] Z. Zhou and A. M.-C. So. A unified approach to error bounds for structured convex optimization problems. CoRR, abs/1512.03518, 2015. 9 | 2016 | 424 |
6,355 | Fast Algorithms for Robust PCA via Gradient Descent Xinyang Yi∗ Dohyung Park∗ Yudong Chen† Constantine Caramanis∗ ∗The University of Texas at Austin †Cornell University ∗{yixy,dhpark,constantine}@utexas.edu †yudong.chen@cornell.edu Abstract We consider the problem of Robust PCA in the fully and partially observed settings. Without corruptions, this is the well-known matrix completion problem. From a statistical standpoint this problem has been recently well-studied, and conditions on when recovery is possible (how many observations do we need, how many corruptions can we tolerate) via polynomial-time algorithms is by now understood. This paper presents and analyzes a non-convex optimization approach that greatly reduces the computational complexity of the above problems, compared to the best available algorithms. In particular, in the fully observed case, with r denoting rank and d dimension, we reduce the complexity from O(r2d2 log(1/ε)) to O(rd2 log(1/ε)) – a big savings when the rank is big. For the partially observed case, we show the complexity of our algorithm is no more than O(r4d log d log(1/ε)). Not only is this the best-known run-time for a provable algorithm under partial observation, but in the setting where r is small compared to d, it also allows for near-linear-in-d run-time that can be exploited in the fully-observed case as well, by simply running our algorithm on a subset of the observations. 1 Introduction Principal component analysis (PCA) aims to find a low rank subspace that best-approximates a data matrix Y ∈Rd1×d2. The simple and standard method of PCA by singular value decomposition (SVD) fails in many modern data problems due to missing and corrupted entries, as well as sheer scale of the problem. Indeed, SVD is highly sensitive to outliers by virtue of the squared-error criterion it minimizes. Moreover, its running time scales as O(rd2) to recover a rank r approximation of a d-by-d matrix. While there have been recent results developing provably robust algorithms for PCA (e.g., [5, 26]), the running times range from O(r2d2) to O(d3) and hence are significantly worse than SVD. Meanwhile, the literature developing sub-quadratic algorithms for PCA (e.g., [15, 14, 3]) seems unable to guarantee robustness to outliers or missing data. Our contribution lies precisely in this area: provably robust algorithms for PCA with improved run-time. Specifically, we provide an efficient algorithm with running time that matches SVD while nearly matching the best-known robustness guarantees. In the case where rank is small compared to dimension, we develop an algorithm with running time that is nearly linear in the dimension. This last algorithm works by subsampling the data, and therefore we also show that our algorithm solves the Robust PCA problem with partial observations (a generalization of matrix completion and Robust PCA). 1.1 The Model and Related Work We consider the following setting for robust PCA. Suppose we are given a matrix Y ∈Rd1×d2 that has decomposition Y = M ∗+ S∗, where M ∗is a rank r matrix and S∗is a sparse corruption matrix containing entries with arbitrary magnitude. The goal is to recover M ∗and S∗from Y . To ease notation, we let d1 = d2 = d in the remainder of this section. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Provable solutions for this model are first provided in the works of [9] and [5]. They propose to solve this problem by convex relaxation: min M,S |||M|||nuc + λ∥S∥1, s.t. Y = M + S, (1) where |||M|||nuc denotes the nuclear norm of M. Despite analyzing the same method, the corruption models in [5] and [9] differ. In [5], the authors consider the setting where the entries of M ∗are corrupted at random with probability α. They show their method succeeds in exact recovery with α as large as 0.1, which indicates they can tolerate a constant fraction of corruptions. Work in [9] considers a deterministic corruption model, where nonzero entries of S∗can have arbitrary position, but the sparsity of each row and column does not exceed αd. They prove that for exact recovery, it can allow α = O(1/(µr √ d)). This was subsequently further improved to α = O(1/(µr)), which is in fact optimal [11, 18]. Here, µ represents the incoherence of M ∗(see Section 2 for details). In this paper, we follow this latter line and focus on the deterministic corruption model. The state-of-the-art solver [20] for (1) has time complexity O(d3/ε) to achieve error ε, and is thus much slower than SVD, and prohibitive for even modest values of d. Work in [21] considers the deterministic corruption model, and improves this running time without sacrificing the robustness guarantee on α. They propose an alternating projection (AltProj) method to estimate the low rank and sparse structures iteratively and simultaneously, and show their algorithm has complexity O(r2d2 log(1/ε)), which is faster than the convex approach but still slower than SVD. Non-convex approaches have recently seen numerous developments for applications in low-rank estimation, including alternating minimization (see e.g. [19, 17, 16]) and gradient descent (see e.g. [4, 12, 23, 24, 29, 30]). These works have fast running times, yet do not provide robustness guarantees. One exception is [12], where the authors analyze a row-wise ℓ1 projection method for recovering S∗. Their analysis hinges on positive semidefinite M ∗, and the algorithm requires prior knowledge of the ℓ1 norm of every row of S∗and is thus prohibitive in practice. Another exception is work [16], which analyzes alternating minimization plus an overall sparse projection. Their algorithm is shown to tolerate at most a fraction of α = O(1/(µ2/3r2/3d)) corruptions. As we discuss in Section 1.2, we can allow S∗to have much higher sparsity α = O(1/(µr1.5)), which is close to optimal. It is worth mentioning other works that obtain provable guarantees of non-convex algorithms or problems including phase retrieval [6, 13, 28], EM algorithms [2, 25, 27], tensor decompositions [1] and second order method [22]. It might be interesting to bring robust considerations to these works. 1.2 Our Contributions In this paper, we develop efficient non-convex algorithms for robust PCA. We propose a novel algorithm based on the projected gradient method on the factorized space. We also extend it to solve robust PCA in the setting with partial observations, i.e., in addition to gross corruptions, the data matrix has a large number of missing values. Our main contributions are summarized as follows.1 1. We propose a novel sparse estimator for the setting of deterministic corruptions. For the low-rank structure to be identifiable, it is natural to assume that deterministic corruptions are “spread out” (no more than some number in each row/column). We leverage this information in a simple but critical algorithmic idea, that is tied to the ultimate complexity advantages our algorithm delivers. 2. Based on the proposed sparse estimator, we propose a projected gradient method on the matrix factorized space. While non-convex, the algorithm is shown to enjoy linear convergence under proper initialization. Along with a new initialization method, we show that robust PCA can be solved within complexity O(rd2 log(1/ε)) while ensuring robustness α = O(1/(µr1.5)). Our algorithm is thus faster than the best previous known algorithm by a factor of r, and enjoys superior empirical performance as well. 3. Algorithms for Robust PCA with partial observations still rely on a computationally expensive convex approach, as apparently this problem has evaded treatment by non-convex methods. We consider precisely this problem. In a nutshell, we show that our gradient method succeeds (it is guaranteed to produce the subspace of M ∗) even when run on no more than O(µ2r2d log d) random entries of Y . The computational cost is O(µ3r4d log d log(1/ε)). When rank r is small compared to the dimension d, in fact this dramatically improves on our bound above, as our cost becomes nearly linear in d. We show, moreover, that this savings and robustness to erasures comes at no cost in the 1To ease presentation, the discussion here assumes M ∗has constant condition number, whereas our results below show the dependence on condition number explicitly. 2 robustness guarantee for the deterministic (gross) corruptions. While this demonstrates our algorithm is robust to both outliers and erasures, it also provides a way to reduce computational costs even in the fully observed setting, when r is small. 4. An immediate corollary of the above result provides a guarantee for exact matrix completion, with general rectangular matrices, using O(µ2r2d log d) observed entries and O(µ3r4d log d log(1/ε)) time, thereby improving on existing results in [12, 23]. Notation. For any index set Ω⊆[d1] × [d2], we let Ω(i,·) := (i, j) ∈Ω j ∈[d2] , Ω(·,j) := (i, j) ∈Ω i ∈[d1] . For any matrix A ∈Rd1×d2, we denote its projector onto support Ωby ΠΩ(A), i.e., the (i, j)-th entry of ΠΩ(A) is equal to A if (i, j) ∈Ωand zero otherwise. The i-th row and j-th column of A are denoted by A(i,·) and A(·,j). The (i, j)-th entry is denoted as A(i,j). Operator norm of A is |||A|||op. Frobenius norm of A is |||A|||F. The ℓa/ℓb norm of A is denoted by |||A|||b,a, i.e., the ℓa norm of the vector formed by the ℓb norm of every row. For instance, ∥A∥2,∞ stands for maxi∈[d1] ∥A(i,·)∥2. 2 Problem Setup We consider the problem where we observe a matrix Y ∈Rd1×d2 that satisfies Y = M ∗+ S∗, where M ∗has rank r, and S∗is corruption matrix with sparse support. Our goal is to recover M ∗and S∗. In the partially observed setting, in addition to sparse corruptions, we have erasures. We assume that each entry of M ∗+ S∗is revealed independently with probability p ∈(0, 1). In particular, for any (i, j) ∈[d1] × [d2], we consider the Bernoulli model where Y(i,j) = (M ∗+ S∗)(i,j), with probability p; ∗, otherwise. (2) We denote the support of Y by Φ = {(i, j) | Y(i,j) ̸= ∗}. Note that we assume S∗is not adaptive to Φ. As is well-understood thanks to work in matrix completion, this task is impossible in general – we need to guarantee that M ∗is not both low-rank and sparse. To avoid such identifiability issues, we make the following standard assumptions on M ∗and S∗: (i) M ∗is not near-sparse or “spiky.” We impose this by requiring M ∗to be µ-incoherent – given a singular value decomposition (SVD) M ∗= L∗Σ∗R∗⊤, we assume that ∥L∗∥2,∞≤ rµr d1 , ∥R∗∥2,∞≤ rµr d2 . (ii) The entries of S∗are “spread out” – for α ∈[0, 1), we assume S∗∈Sα, where Sα := A ∈Rd1×d2 ∥A(i,·)∥0 ≤αd2 for all i ∈[d1] ; ∥A(·,j)∥0 ≤αd1 for all j ∈[d2] . (3) In other words, S∗contains at most α-fraction nonzero entries per row and column. 3 Algorithms For both the full and partial observation settings, our method proceeds in two phases. In the first phase, we use a new sorting-based sparse estimator to produce a rough estimate Sinit for S∗based on the observed matrix Y , and then find a rank r matrix factorized as U0V ⊤ 0 that is a rough estimate of M ∗by performing SVD on (Y −Sinit). In the second phase, given (U0, V0), we perform an iterative method to produce series {(Ut, Vt)}∞ t=0. In each step t, we first apply our sparse estimator to produce a sparse matrix St based on (Ut, Vt), and then perform a projected gradient descent step on the low-rank factorized space to produce (Ut+1, Vt+1). This flow is the same for full and partial observations, though a few details differ. Algorithm 1 gives the full observation algorithm, and Algorithm 2 gives the partial observation algorithm. We now describe the key details of each algorithm. Sparse Estimation. A natural idea is to keep those entries of residual matrix Y −M that have large magnitude. At the same time, we need to make use of the dispersed property of Sα that every column and row contain at most α-fraction of nonzero entries. Motivated by these two principles, we introduce the following sparsification operator: For any matrix A ∈Rd1×d2: for all (i, j) ∈[d1] × [d2], we let Tα [A] := ( A(i,j), if |A(i,j)| ≥|A(αd2) (i,·) | and |A(i,j)| ≥|A(αd1) (·,j) | 0, otherwise , (4) 3 where A(k) (i,·) and A(k) (·,j) denote the elements of A(i,·) and A(·,j) that have the k-th largest magnitude respectively. In other words, we choose to keep those elements that are simultaneously among the largest α-fraction entries in the corresponding row and column. In the case of entries having identical magnitude, we break ties arbitrarily. It is thus guaranteed that Tα [A] ∈Sα. Algorithm 1 Fast RPCA INPUT: Observed matrix Y with rank r and corruption fraction α; parameters γ, η; number of iterations T. // Phase I: Initialization. 1: Sinit ←Tα [Y ] // see (4) for the definition of Tα [·]. 2: [L, Σ, R] ←SVDr[Y −Sinit] 2 3: U0 ←LΣ1/2, V0 ←RΣ1/2. Let U, V be defined according to (7). // Phase II: Gradient based iterations. 4: U0 ←ΠU (U0), V0 ←ΠV (V0) 5: for t = 0, 1, . . . , T −1 do 6: St ←Tγα Y −UtV ⊤ t 7: Ut+1 ←ΠU Ut −η∇UL(Ut, Vt; St) −1 2ηUt(U ⊤ t Ut −V ⊤ t Vt) 8: Vt+1 ←ΠV Vt −η∇V L(Ut, Vt; St) −1 2ηVt(V ⊤ t Vt −U ⊤ t Ut) 9: end for OUTPUT: (UT , VT ) Initialization. In the fully observed setting, we compute Sinit based on Y as Sinit = Tα [Y ]. In the partially observed setting with sampling rate p, we let Sinit = T2pα [Y ]. In both cases, we then set U0 = LΣ1/2 and V0 = RΣ1/2, where LΣR⊤is an SVD of the best rank r approximation of Y −Sinit. Gradient Method on Factorized Space. After initialization, we proceed by projected gradient descent. To do this, we define loss functions explicitly in the factored space, i.e., in terms of U, V and S: L(U, V ; S) := 1 2|||UV ⊤+ S −Y |||2 F, (fully observed) (5) eL(U, V ; S) := 1 2p|||ΠΦ UV ⊤+ S −Y |||2 F. (partially observed) (6) Recall that our goal is to recover M ∗that satisfies the µ-incoherent condition. Given an SVD M ∗= L∗ΣR∗⊤, we expect that the solution (U, V ) is close to (L∗Σ1/2, R∗Σ1/2) up to some rotation. In order to serve such µ-incoherent structure, it is natural to put constraints on the row norms of U, V based on |||M ∗|||op. As |||M ∗|||op is unavailable, given U0, V0 computed in the first phase, we rely on the sets U, V defined as U := A ∈Rd1×r ∥A∥2,∞≤ r 2µr d1 |||U0|||op , V := A ∈Rd2×r ∥A∥2,∞≤ r 2µr d2 |||V0|||op . (7) Now we consider the following optimization problems with constraints: min U∈U,V ∈V,S∈Sα L(U, V ; S) + 1 8|||U ⊤U −V ⊤V |||2 F, (fully observed) (8) min U∈U,V ∈V,S∈Spα eL(U, V ; S) + 1 64|||U ⊤U −V ⊤V |||2 F. (partially observed) (9) The regularization term in the objectives above is used to encourage that U and V have the same scale. Given (U0, V0), we propose the following iterative method to produce series {(Ut, Vt)}∞ t=0 and {St}∞ t=0. We give the details for the fully observed case – the partially observed case is similar. 1 SVDr[A] stands for computing a rank-r SVD of matrix A, i.e., finding the top r singular values and vectors of A. Note that we only need to compute rank-r SVD approximately (see the initialization error requirement in Theorem 1) so that we can leverage fast iterative approaches such as block power method and Krylov subspace methods. 4 For t = 0, 1, . . ., we update St using the sparse estimator St = Tγα Y −UtV ⊤ t , followed by a projected gradient update on Ut and Vt: Ut+1 = ΠU Ut −η∇UL(Ut, Vt; St) −1 2ηUt(U ⊤ t Ut −V ⊤ t Vt) , Vt+1 = ΠV Vt −η∇V L(Ut, Vt; St) −1 2ηVt(V ⊤ t Vt −U ⊤ t Ut) . Here α is the model parameter that characterizes the corruption fraction, γ and η are algorithmic tunning parameters, which we specify in our analysis. Essentially, the above algorithm corresponds to applying projected gradient method to optimize (8), where S is replaced by the aforementioned sparse estimator in each step. Algorithm 2 Fast RPCA with partial observations INPUT: Observed matrix Y with support Φ; parameters τ, γ, η; number of iterations T. // Phase I: Initialization. 1: Sinit ←T2pα [ΠΦ(Y )] 2: [L, Σ, R] ←SVDr[ 1 p(Y −Sinit)] 3: U0 ←LΣ1/2, V0 ←RΣ1/2. Let U, V be defined according to (7). // Phase II: Gradient based iterations. 4: U0 ←ΠU (U0), V0 ←ΠV (V0) 5: for t = 0, 1, . . . , T −1 do 6: St ←Tγpα ΠΦ Y −UtV ⊤ t 7: Ut+1 ←ΠU Ut −η∇U eL(Ut, Vt; St) −1 16ηUt(U ⊤ t Ut −V ⊤ t Vt) 8: Vt+1 ←ΠV Vt −η∇V eL(Ut, Vt; St) −1 16ηVt(V ⊤ t Vt −U ⊤ t Ut) 9: end for OUTPUT: (UT , VT ) 4 Main Results 4.1 Analysis of Algorithm 1 We begin with some definitions and notation. It is important to define a proper error metric because the optimal solution corresponds to a manifold and there are many distinguished pairs (U, V ) that minimize (8). Given the SVD of the true low-rank matrix M ∗= L∗Σ∗R∗⊤, we let U ∗:= L∗Σ∗1/2 and V ∗:= R∗Σ∗1/2. We also let σ∗ 1 ≥σ∗ 2 ≥. . . ≥σ∗ r be sorted nonzero singular values of M ∗, and denote the condition number of M ∗by κ, i.e., κ := σ∗ 1/σ∗ r. We define estimation error d(U, V ; U ∗, V ∗) as the minimal Frobenius norm between (U, V ) and (U ∗, V ∗) with respect to the optimal rotation, namely d(U, V ; U ∗, V ∗) := min Q∈Qr q |||U −U ∗Q|||2 F + |||V −V ∗Q|||2 F, (10) for Qr the set of r-by-r orthonormal matrices. This metric controls reconstruction error, as |||UV ⊤−M ∗|||F ≲ p σ∗ 1d(U, V ; U ∗, V ∗), (11) when d(U, V ; U ∗, V ∗) ≤ p σ∗ 1. We denote the local region around the optimum (U ∗, V ∗) with radius ω as B2 (ω) := (U, V ) ∈Rd1×r × Rd2×r d(U, V ; U ∗, V ∗) ≤ω . The next two theorems provide guarantees for the initialization phase and gradient iterations, respectively, of Algorithm 1. Theorem 1 (Initialization). Consider the paired (U0, V0) produced in the first phase of Algorithm 1. If α ≤1/(16κµr), we have d(U0, V0; U ∗, V ∗) ≤28√καµr√r p σ∗ 1. 5 Theorem 2 (Convergence). Consider the second phase of Algorithm 1. Suppose we choose γ = 2 and η = c/σ∗ 1 for any c ≤1/36. There exist constants c1, c2 such that when α ≤c1/(κ2µr), given any (U0, V0) ∈B2 c2 p σ∗r/κ , the iterates {(Ut, Vt)}∞ t=0 satisfy d2(Ut, Vt; U ∗, V ∗) ≤ 1 −c 8κ t d2(U0, V0; U ∗, V ∗). Therefore, using proper initialization and step size, the gradient iteration converges at a linear rate with a constant contraction factor 1 −O(1/κ). To obtain relative precision ε compared to the initial error, it suffices to perform O(κ log(1/ε)) iterations. Note that the step size is chosen according to 1/σ∗ 1. When α ≲1/(µ √ κr3), Theorem 1 and the inequality (11) together imply that |||U0V ⊤ 0 −M ∗|||op ≤1 2σ∗ 1. Hence we can set the step size as η = O(1/σ1(U0V ⊤ 0 )) using being the top singular value σ1(U0V ⊤ 0 ) of the matrix U0V ⊤ 0 Combining Theorems 1 and 2 implies the following result that provides an overall guarantee for Algorithm 1. Corollary 1. Suppose that α ≤c min ( 1 µ√κr3 , 1 µκ2r ) for some constant c. Then for any ε ∈(0, 1), Algorithm 1 with T = O(κ log(1/ε)) outputs a pair (UT , VT ) that satisfies |||UT V ⊤ T −M ∗|||F ≤ε · σ∗ r. (12) Remark 1 (Time Complexity). For simplicity we assume d1 = d2 = d. Our sparse estimator (4) can be implemented by finding the top αd elements of each row and column via partial quick sort, which has running time O(d2 log(αd)). Performing rank-r SVD in the first phase and computing the gradient in each iteration both have complexity O(rd2).3 Algorithm 1 thus has total running time O(κrd2 log(1/ε)) for achieving an ϵ accuracy as in (12). We note that when κ = O(1), our algorithm is orderwise faster than the AltProj algorithm in [21], which has running time O(r2d2 log(1/ε)). Moreover, our algorithm only requires computing one singular value decomposition. Remark 2 (Robustness). Assuming κ = O(1), our algorithm can tolerate corruption at a sparsity level up to α = O(1/(µr√r)). This is worse by a factor √r compared to the optimal statistical guarantee 1/(µr) obtained in [11, 18, 21]. This looseness is a consequence of the condition for (U0, V0) in Theorem 2. Nevertheless, when µr = O(1), our algorithm can tolerate a constant α fraction of corruptions. 4.2 Analysis of Algorithm 2 We now move to the guarantees of Algorithm 2. We show here that not only can we handle partial observations, but in fact subsampling the data in the fully observed case can significantly reduce the time complexity from the guarantees given in the previous section without sacrificing robustness. In particular, for smaller values of r, the complexity of Algorithm 2 has near linear dependence on the dimension d, instead of quadratic. In the following discussion, we let d := max{d1, d2}. The next two results control the quality of the initialization step, and then the gradient iterations. Theorem 3 (Initialization, partial observations). Suppose the observed indices Φ follow the Bernoulli model given in (2). Consider the pair (U0, V0) produced in the first phase of Algorithm 2. There exist constants {ci}3 i=1 such that for any ϵ ∈(0, √r/(8c1κ)), if α ≤ 1 64κµr, p ≥c2 µr2 ϵ2 + 1 α log d d1 ∧d2 , (13) then we have d(U0, V0; U ∗, V ∗) ≤51√καµr√r p σ∗ 1 + 7c1ϵ p κσ∗ 1, with probability at least 1 −c3d−1. 3In fact, it suffices to compute the best rank-r approximation with running time independent of the eigen gap. 6 Theorem 4 (Convergence, partial observations). Suppose the observed indices Φ follow the Bernoulli model given in (2). Consider the second phase of Algorithm 2. Suppose we choose γ = 3, and η = c/(µrσ∗ 1) for a sufficiently small constant c. There exist constants {ci}4 i=1 such that if α ≤ c1 κ2µr and p ≥c2 κ4µ2r2 log d d1 ∧d2 , (14) then with probability at least 1 −c3d−1, the iterates {(Ut, Vt)}∞ t=0 satisfy d2(Ut, Vt; U ∗, V ∗) ≤ 1 − c 64µrκ t d2(U0, V0; U ∗, V ∗) for all (U0, V0) ∈B2 c4 p σ∗r/κ . Setting p = 1 in the above result recovers Theorem 2 up to an additional factor µr in the contraction factor. For achieving ε relative accuracy, now we need O(µrκ log(1/ε)) iterations. Putting Theorems 3 and 4 together, we have the following overall guarantee for Algorithm 2. Corollary 2. Suppose that α ≤c min ( 1 µ√κr3 , 1 µκ2r ) , p ≥c′ κ4µ2r2 log d d1 ∧d2 , for some constants c, c′. With probability at least 1 −O(d−1), for any ε ∈(0, 1), Algorithm 2 with T = O(µrκ log(1/ε)) outputs a pair (UT , VT ) that satisfies |||UT V ⊤ T −M ∗|||F ≤ε · σ∗ r. (15) This result shows that partial observations do not compromise robustness to sparse corruptions: as long as the observation probability p satisfies the condition in Corollary 2, Algorithm 2 enjoys the same robustness guarantees as the method using all entries. Below we provide two remarks on the sample and time complexity. For simplicity, we assume d1 = d2 = d, κ = O(1). Remark 3 (Sample complexity and matrix completion). Using the lower bound on p, it is sufficient to have O(µ2r2d log d) observed entries. In the special case S∗= 0, our partial observation model is equivalent to the model of exact matrix completion (see, e.g., [8]). We note that our sample complexity (i.e., observations needed) matches that of completing a positive semidefinite (PSD) matrix by gradient descent as shown in [12], and is better than the non-convex matrix completion algorithms in [19] and [23]. Accordingly, our result reveals the important fact that we can obtain robustness in matrix completion without deterioration of our statistical guarantees. It is known that that any algorithm for solving exact matrix completion must have sample size Ω(µrd log d) [8], and a nearly tight upper bound O(µrd log2 d) is obtained in [10] by convex relaxation. While sub-optimal by a factor µr, our algorithm is much faster than convex relaxation as shown below. Remark 4 (Time complexity). Our sparse estimator on the sparse matrix with support Φ can be implemented via partial quick sort with running time O(pd2 log(αpd)). Computing the gradient in each step involves the two terms in the objective function (9). Computing the gradient of the first term eL takes time O(r|Φ|), whereas the second term takes time O(r2d). In the initialization phase, performing rank-r SVD on a sparse matrix with support Φ can be done in time O(r|Φ|). We conclude that when |Φ| = O(µ2r2d log d), Algorithm 2 achieves the error bound (15) with running time O(µ3r4d log d log(1/ε)). Therefore, in the small rank setting with r ≪d1/3, even when full observations are given, it is better to use Algorithm 2 by subsampling the entries of Y . 5 Numerical Results In this section, we provide numerical results and compare the proposed algorithms with existing methods, including the inexact augmented lagrange multiplier (IALM) approach [20] for solving the convex relaxation (1) and the alternating projection (AltProj) algorithm proposed in [21]. All algorithms are implemented in MATLAB 4, and the codes for existing algorithms are obtained from their authors. SVD computation in all algorithms uses the PROPACK library.5 We ran all simulations on a machine with Intel 32-core Xeon (E5-2699) 2.3GHz with 240GB RAM. 4Our code is available at https://www.yixinyang.org/code/RPCA_GD.zip. 5http://sun.stanford.edu/~rmunk/PROPACK/ 7 Iteration count 0 2 4 6 8 10 d(U, V ; U∗, V ∗) 10-2 10-1 100 GD p = 1 GD p = 0.5 GD p = 0.2 (a) Dimension d 103 104 105 Time(secs) 101 102 103 (b) Time(secs) 0 20 40 60 80 100 d(U, V ; U∗, V ∗) 10-3 10-2 10-1 100 101 GD p = 1 GD p = 0.5 GD p = 0.2 GD p = 0.1 AltProj IALM (c) Figure 1: Results on synthetic data. (a) Plot of log estimation error versus number of iterations when using gradient descent (GD) with varying sub-sampling rate p. It is conducted using d = 5000, r = 10, α = 0.1. (b) Plot of running time of GD versus dimension d with r = 10, α = 0.1, p = 0.15r2 log d/d. The low-rank matrix is recovered in all instances, and the line has slope approximately one. (c) Plot of log estimation error versus running time for different algorithms in problem with d = 5000, r = 10, α = 0.1. Original GD (49.8s) GD, 20% sample (18.1s) AltProj (101.5s) IALM (434.6s) Original GD (87.3s) GD, 20% sample (43.4s) AltProj (283.0s) IALM (801.4s) Figure 2: Foreground-background separation in Restaurant and ShoppingMall videos. In each line, the leftmost image is an original frame, and the other four are the separated background obtained from our algorithms with p = 1, p = 0.2, AltProj, and IALM. The running time required by each algorithm is shown in the title. Synthetic Datasets. We generate a squared data matrix Y = M ∗+ S∗∈Rd×d as follows. The low-rank part M ∗is given by M ∗= AB⊤, where A, B ∈Rd×r have entries drawn independently from a zero mean Gaussian distribution with variance 1/d. For a given sparsity parameter α, each entry of S∗is set to be nonzero with probability α, and the values of the nonzero entries are sampled uniformly from [−5r/d, 5r/d]. The results are summarized in Figure 1. Figure 1a shows the convergence of our algorithms for different random instances with different sub-sampling rate p. Figure 1b shows the running time of our algorithm with partially observed data. We note that our algorithm is memory-efficient: in the large scale setting with d = 2 × 105, using approximately 0.1% entries is sufficient for the successful recovery. In contrast, AltProj and IALM are designed to manipulate the entire matrix with d2 = 4 × 1010 entries, which is prohibitive on single machine. Figure 1c compares our algorithms with AltProj and IALM by showing reconstruction error versus real running time. Our algorithm requires significantly less computation to achieve the same accuracy level, and using only a subset of the entries provides additional speed-up. Foreground-background Separation. We apply our method to the task of foreground-background (FB) separation in a video. We use two public benchmarks, the Restaurant and ShoppingMall datasets.6 Each dataset contains a video with static background. By vectorizing and stacking the frames as columns of a matrix Y , the FB separation problem can be cast as RPCA, where the static background corresponds to a low rank matrix M ∗with identical columns, and the moving objects in the video can be modeled as sparse corruptions S∗. Figure 2 shows the output of different algorithms on two frames from the dataset. Our algorithms require significantly less running time than both AltProj and IALM. Moreover, even with 20% sub-sampling, our methods still seem to achieve better separation quality. The details about parameter setting and more results are deferred to the supplemental material. 6http://perception.i2r.a-star.edu.sg/bk_model/bk_index.html 8 References [1] Animashree Anandkumar, Rong Ge, Daniel Hsu, Sham M. Kakade, and Matus Telgarsky. Tensor decompositions for learning latent variable models. The Journal of Machine Learning Research, 15(1):2773–2832, 2014. [2] Sivaraman Balakrishnan, Martin J. Wainwright, and Bin Yu. Statistical guarantees for the em algorithm: From population to samplebased analysis. arXiv preprint arXiv:1408.2156, 2014. [3] Srinadh Bhojanapalli, Prateek Jain, and Sujay Sanghavi. Tighter low-rank approximation via sampling the leveraged element. In Proceedings of the Twenty-Sixth Annual ACM-SIAM Symposium on Discrete Algorithms, pages 902–920. SIAM, 2015. [4] Srinadh Bhojanapalli, Anastasios Kyrillidis, and Sujay Sanghavi. Dropping convexity for faster semi-definite optimization. arXiv preprint arXiv:1509.03917, 2015. [5] Emmanuel J. Candès, Xiaodong Li, Yi Ma, and John Wright. Robust principal component analysis? Journal of the ACM (JACM), 58(3):11, 2011. [6] Emmanuel J. Candès, Xiaodong Li, and Mahdi Soltanolkotabi. Phase retrieval via wirtinger flow: Theory and algorithms. IEEE Transactions on Information Theory, 61(4):1985–2007, 2015. [7] Emmanuel J. Candès and Benjamin Recht. Exact matrix completion via convex optimization. Foundations of Computational mathematics, 9(6):717–772, 2009. [8] Emmanuel J. Candès and Terence Tao. The power of convex relaxation: Near-optimal matrix completion. IEEE Transactions on Information Theory, 56(5):2053–2080, 2010. [9] Venkat Chandrasekaran, Sujay Sanghavi, Pablo A. Parrilo, and Alan S. Willsky. Rank-sparsity incoherence for matrix decomposition. SIAM Journal on Optimization, 21(2):572–596, 2011. [10] Yudong Chen. Incoherence-optimal matrix completion. IEEE Transactions on Information Theory, 61(5):2909–2923, 2015. [11] Yudong Chen, Ali Jalali, Sujay Sanghavi, and Constantine Caramanis. Low-rank matrix recovery from errors and erasures. IEEE Transactions on Information Theory, 59(7):4324–4337, 2013. [12] Yudong Chen and Martin J. Wainwright. Fast low-rank estimation by projected gradient descent: General statistical and algorithmic guarantees. arXiv preprint arXiv:1509.03025, 2015. [13] Yuxin Chen and Emmanuel J. Candès. Solving random quadratic systems of equations is nearly as easy as solving linear systems. In Advances in Neural Information Processing Systems, pages 739–747, 2015. [14] Kenneth L. Clarkson and David P. Woodruff. Low rank approximation and regression in input sparsity time. In Proceedings of the forty-fifth annual ACM symposium on Theory of computing, pages 81–90. ACM, 2013. [15] Alan Frieze, Ravi Kannan, and Santosh Vempala. Fast monte-carlo algorithms for finding low-rank approximations. Journal of the ACM (JACM), 51(6):1025–1041, 2004. [16] Quanquan Gu, Zhaoran Wang, and Han Liu. Low-rank and sparse structure pursuit via alternating minimization. In Proceedings of the 19th International Conference on Artificial Intelligence and Statistics, pages 600–609, 2016. [17] Moritz Hardt. Understanding alternating minimization for matrix completion. In 2014 IEEE 55th Annual Symposium on Foundations of Computer Science (FOCS), pages 651–660. IEEE, 2014. [18] Daniel Hsu, Sham M. Kakade, and Tong Zhang. Robust matrix decomposition with sparse corruptions. IEEE Transactions on Information Theory, 57(11):7221–7234, 2011. [19] Prateek Jain, Praneeth Netrapalli, and Sujay Sanghavi. Low-rank matrix completion using alternating minimization. In Proceedings of the forty-fifth annual ACM symposium on Theory of computing, pages 665–674. ACM, 2013. [20] Zhouchen Lin, Minming Chen, and Yi Ma. The augmented lagrange multiplier method for exact recovery of corrupted low-rank matrices. Arxiv preprint arxiv:1009.5055v3, 2013. [21] 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. [22] Ju Sun, Qing Qu, and John Wright. When are nonconvex problems not scary? arXiv preprint arXiv:1510.06096, 2015. [23] Ruoyu Sun and Zhi-Quan Luo. Guaranteed matrix completion via nonconvex factorization. In 2015 IEEE 56th Annual Symposium on Foundations of Computer Science (FOCS), pages 270–289. IEEE, 2015. [24] Stephen Tu, Ross Boczar, Mahdi Soltanolkotabi, and Benjamin Recht. Low-rank solutions of linear matrix equations via procrustes flow. arXiv preprint arXiv:1507.03566, 2015. [25] Zhaoran Wang, Quanquan Gu, Yang Ning, and Han Liu. High dimensional em algorithm: Statistical optimization and asymptotic normality. In Advances in Neural Information Processing Systems, pages 2512–2520, 2015. [26] Huan Xu, Constantine Caramanis, and Sujay Sanghavi. Robust pca via outlier pursuit. IEEE Transactions on Information Theory, 58(5):3047–3064, May 2012. [27] Xinyang Yi and Constantine Caramanis. Regularized em algorithms: A unified framework and statistical guarantees. In Advances in Neural Information Processing Systems, pages 1567–1575, 2015. [28] Huishuai Zhang, Yuejie Chi, and Yingbin Liang. Provable non-convex phase retrieval with outliers: Median truncated wirtinger flow. arXiv preprint arXiv:1603.03805, 2016. [29] Tuo Zhao, Zhaoran Wang, and Han Liu. A nonconvex optimization framework for low rank matrix estimation. In Advances in Neural Information Processing Systems, pages 559–567, 2015. [30] Qinqing Zheng and John Lafferty. A convergent gradient descent algorithm for rank minimization and semidefinite programming from random linear measurements. In Advances in Neural Information Processing Systems, pages 109–117, 2015. 9 | 2016 | 425 |
6,356 | Dimensionality Reduction of Massive Sparse Datasets Using Coresets Dan Feldman University of Haifa Haifa, Israel dannyf.post@gmail.com Mikhail Volkov CSAIL, MIT Cambridge, MA, USA mikhail@csail.mit.edu Daniela Rus CSAIL, MIT Cambridge, MA, USA rus@csail.mit.edu Abstract In this paper we present a practical solution with performance guarantees to the problem of dimensionality reduction for very large scale sparse matrices. We show applications of our approach to computing the Principle Component Analysis (PCA) of any n × d matrix, using one pass over the stream of its rows. Our solution uses coresets: a scaled subset of the n rows that approximates their sum of squared distances to every k-dimensional affine subspace. An open theoretical problem has been to compute such a coreset that is independent of both n and d. An open practical problem has been to compute a non-trivial approximation to the PCA of very large but sparse databases such as the Wikipedia document-term matrix in a reasonable time. We answer both of these questions affirmatively. Our main technical result is a new framework for deterministic coreset constructions based on a reduction to the problem of counting items in a stream. 1 Introduction Algorithms for dimensionality reduction usually aim to project an input set of d-dimensional vectors (database records) onto a k ≤d −1 dimensional affine subspace that minimizes the sum of squared distances to these vectors, under some constraints. Special cases include the Principle Component Analysis (PCA), Linear regression (k = d −1), Low-rank approximation (k-SVD), Latent Drichlet Analysis (LDA) and Non-negative matrix factorization (NNMF). Learning algorithms such as kmeans clustering can then be applied on the low-dimensional data to obtain fast approximations with provable guarantees. To our knowledge, unlike SVD, there are no algorithms or coreset constructions with performance guarantees for computing the PCA of sparse n×n matrices in the streaming model, i.e. using memory that is poly-logarithmic in n. Much of the large scale high-dimensional data sets available today (e.g. image streams, text streams, etc.) are sparse. For example, consider the text case of Wikipedia. We can associate a matrix with Wikipedia, where the English words define the columns (approximately 1.4 million) and the individual documents define the rows (approximately 4.4 million documents). This large scale matrix is sparse because most English words do not appear in most documents. The size of this matrix is huge and no existing dimensionality reduction algorithm can compute its eigenvectors. To this point, running the state of the art SVD implementation from GenSim on the Wikipedia document-term matrix crashes the computer very quickly after applying its step of random projection on the first few thousand documents. This is because such dense vectors, each of length 1.4 million, use all of the computer’s RAM capacity. 1Support for this research has been provided by Hon Hai/Foxconn Technology Group and NSFSaTC-BSF CNC 1526815, and in part by the Singapore MIT Alliance on Research and Technology through the Future of Urban Mobility project and by Toyota Research Institute (TRI). TRI provided funds to assist the authors with their research but this article solely reflects the opinions and conclusions of its authors and not TRI or any other Toyota entity. We are grateful for this support. Submitted to 30th Conference on Neural Information Processing Systems (NIPS 2016). Do not distribute. In this paper we present a dimensionality reduction algorithms that can handle very large scale sparse data sets such as Wikipedia and returns provably correct results. A long-open research question has been whether we can have a coreset for PCA that is both small in size and a subset of the original data. In this paper we answer this question affirmatively and provide an efficient construction. We also show that this algorithm provides a practical solution to a long-standing open practical problem: computing the PCA of large matrices such as those associated with Wikipedia. 2 Problem Formulation Given a matrix A, a coreset C in this paper is defined as a weighted subset of rows of A such that the sum of squared distances from any given k-dimensional subspace to the rows of A is approximately the same as the sum of squared weighted distances to the rows in C. Formally, For a compact set S ∈Rd and a vector x in Rd, we denote the Euclidean distance between x and its closest points in S by dist2(x, S) := min s∈S ∥x −s∥2 2 For an n×d matrix A whose rows are a1, . . . , an, we define the sum of the squared distances from A to S by dist2(A, S) := n X i=1 dist2(ai, S) Definition 1 ((k, ε)-coreset). Given a n×d matrix A whose rows a1, · · · , an are n points (vectors) in Rd, an error parameter ε ∈(0, 1], and an integer k ∈[1, d −1] = {1, · · · , d −1} that represents the desired dimensionality reduction, n (k, ε)-coreset for A is a weighted subset C = {wiai | wi > 0 and i ∈[n]} of the rows of A, where w = (w1, · · · , wn) ∈[0, ∞)n is a non-negative weight vector, such that for every affine k-subspace S in Rd we have dist2(A, S)) −dist2(C, S)) ≤ε dist2(A, S)). (1) That is, the sum of squared distances from the n points to S approximates the sum of squared weighted distances Pn i=1 w2 i (dist(ai, S))2 to S. The approximation is up to a multiplicative factor of 1±ε. By choosing w = (1, · · · , 1) we obtain a trivial (k, 0)-coreset. However, in a more efficient coreset most of the weights will be zero and the corresponding rows in A can be discarded. The cardinality of the coreset is thus the sparsity of w, given by |C| = ∥w∥0 := | {wi ̸= 0 | i ∈[n]} |. If C is small, then the computation is efficient. Because C is a weighted subset of the rows of A, if A is sparse, then C is also sparse. A long-open research question has been whether we can have such a coreset that is both of size independent of the input dimension (n and d) and a subset of the original input rows. 2.1 Related Work In [24] it was recently proved that an (k, ε) coreset of size |C| = O(dk3/ε2) exists for every input matrix, and distances to the power of z ≥1 where z is constant. The proof is based on a general framework for constructing different kinds of coresets, and is known as sensitivity [10, 17]. This coreset is efficient for tall matrices, since its cardinality is independent of n. However, it is useless for “fat” or square matrices (such as the Wikipedia matrix above), where d is in the order of n, which is the main motivation for our paper. In [5], the Frank-Wolfe algorithm was used to construct different types of coresets than ours, and for different problems. Our approach is based on a solution that we give to an open problem in [5], however we can see how it can be used to compute the coresets in [5] and vice versa. For the special case z = 2 (sum of squared distances), a coreset of size O(k/ε2) was suggested in [7] with a randomized version in [8] for a stream of n points that, unlike the standard approach of using merge-and-reduce trees, returns a coreset of size independent of n with a constant probability. These result minimizes the ∥·∥2 error, while our result minimizes the Frobenius norm, which is always higher, and may be higher by a factor of d. After appropriate weighting, we can apply the uniform sampling of size O(k/ε2) to get a coreset with a small Frobenius error [14], as in our paper. However, in this case the probability of success is only constant. Since in the streaming case we compute roughly n coresets (formally, O(n/m) coresets, where m is the size of the coreset) the probability that all these coresets constructions will succeed 2 is close to zero (roughly 1/n). Since the probability of failure in [14] reduces linearly with the size of the coreset, getting a constant probability of success in the streaming model for O(n) coresets would require to take coresets of size that is no smaller than the input size. There are many papers, especially in recent years, regarding data compression for computing the SVD of large matrices. None of these works addresses the fundamental problem of computing a sparse approximated PCA for a large matrix (in both rows and columns), such as Wikipedia. The reason is that current results use sketches which do no preserve the sparsity of the data (e.g. because of using random projections). Hence, neither the sketch nor the PCA computed on the sketch is sparse. On the other side, we define coreset as a small weighted subset of rows, which is thus sparse if the input is sparse. Moreover, the low rank approximation of a coreset is sparse, since each of its right singular vectors is a sum of a small set of sparse vectors. While there are coresets constructions as defined in this paper, all of them have cardinality of at least d points, which makes them impractical for large data matrices, where d ≥n. In what follows we describe these recent results in details. The recent results in [7, 8] suggest coresets that are similar to our definition of coresets (i.e., weighted subsets), and do preserve sparsity. However, as mentioned above they minimize the 2-norm error and not the larger Frobesnius error, and maybe more important, they provide coresets for k-SVD (i.e., k-dimensional subspaces) and not for PCA (k-dimensional affine subspaces that might not intersect the origin). In addition [8] works with constant probability, while our algorithm is deterministic (works with probability 1). Software. Popular software for computing SVD such as GenSim [21], redsvd [12] or the MATLAB sparse SVD function (svds) use sketches and crash for inputs of a few thousand of documents and a dimensionality reduction (approximation rank) k < 100 on a regular laptop, as expected from the analysis of their algorithms. This is why existing implementations (including Gensim) extract topics from large matrices (e.g. Wikipedia), based on low-rank approximation of only small subset of few thousands of selected words (matrix columns), and not the complete Wikipedia matrix.Even for k = 3, running the implementation of sparse SVD in Hadoop [23] took several days [13]. Next we give a broad overview of the very latest state of the dimensionality reduction methods, such as the Lanczoz algorithm [16] for large matrices, that such systems employ under the hood. Coresets. Following a decade of research in [24] it was recently proved that an (ε, k)-coreset for low rank approximation of size |C| = O(dk3/ε2) exists for every input matrix. The proof is based on a general framework for constructing different kinds of coresets, and is known as sensitivity [10, 17]. This coreset is efficient for tall matrices, since its cardinality is independent of n. However, it is useless for “fat” or square matrices (such as the Wikipedia matrix above), where d is in the order of n, which is the main motivation for our paper. In [5], the Frank-Wolfe algorithm was used to construct different types of coresets than ours, and for different problems. Our approach is based on a solution that we give to an open problem in [5]. Sketches. A sketch in the context of matrices is a set of vectors u1, · · · , us in Rd such that the sum of squared distances Pn i=1(dist(ai, S))2 from the input n points to every k-dimensional subspace S in Rd, can be approximated by Pn i=1(dist(ui, S))2 up to a multiplicative factor of 1±ε. Note that even if the input vectors a1, · · · , an are sparse, the sketched vectors u1, · · · , us in general are not sparse, unlike the case of coresets. A sketch of cardinality d can be constructed with no approximation error (ε = 0), by defining u1, · · · , ud to be the d rows of the matrix DV T where UDV T = A is the SVD of A. It was proved in [11] that taking the first O(k/ε) rows of DV T yields such a sketch, i.e. of size independent of n and d. The first sketch for sparse matrices was suggested in [6], but like more recent results, it assumes that the complete matrix fits in memory. Other sketching methods that usually do not support streaming include random projections [2, 1, 9] and randomly combined rows [20, 25, 22, 18]. The Lanczoz Algorithm. The Lanczoz method [19] and its variant [15] multiply a large matrix by a vector for a few iterations to get its largest eigenvector v1. Then the computation is done recursively after projecting the matrix on the hyperplane that is orthogonal to v1. However, v1 is in general not sparse even A is sparse. Hence, when we project A on the orthogonal subspace to v1, the resulting matrix is dense for the rest of the computations (k > 1). Indeed, our experimental results show that the MATLAB svds function which uses this method runs faster than the exact SVD, but crashes on large input, even for small k. 3 This paper builds on this extensive body of prior work in dimensionality reduction, and our approach uses coresets to solve the time and space challenges. 2.2 Key Contributions Our main result is the first algorithm for computing an (k, ε)-coreset C of size independent of both n and d, for any given n × d input matrix. The algorithm takes as input a finite set of ddimensional vectors, a desired approximation error ε, and an integer k ≥0. It returns a weighted subset S (coreset) of k2/ε2 such vectors. This coreset S can be used to approximate the sum of squared distances from the matrix A ∈Rn×d, whose rows are the n vectors seen so far, to any k-dimensional affine subspace in Rd, up to a factor of 1 ± ε. For a (possibly unbounded) stream of such input vectors the coreset can be maintained at the cost of an additional factor of log2 n. The polynomial dependency on d of the cardinality of previous coresets made them impractical for fat or square input matrices, such as Wikipedia, images in a sparse feature space representation, or adjacency matrix of a graph. If each row of in input matrix A has O(nnz) non-zeroes entries, then the update time per insertion, the overall memory that is used by our algorithm, and the low rank approximation of the coreset S is O(nnz · k2/ε2), i.e. independent of n and d. We implemented our algorithm to obtain a low-rank approximation for the term-document matrix of Wikipedia with provable error bounds. Since our streaming algorithm is also “embarrassingly parallel” we run it on Amazon Cloud, and receive a significantly better running time and accuracy compared to existing heuristics (e.g. Hadoop/MapReduce) that yield non-sparse solutions. The key contributions in this work are: 1. A new algorithm for dimensionality reduction of sparse data that uses a weighted subset of the data, and is independent of both the size and dimensionality of the data. 2. An efficient algorithm for computing such a reduction, with provable bounds on size and running time (cf. http://people.csail.mit.edu/mikhail/NIPS2016). 3. A system that implements this dimensionality reduction algorithm and an application of the system to compute latent semantic analysis (LSA) of the entire English Wikipedia. 3 Technical Solution Given a n×d matrix A, we propose a construction mechanism for a matrix C of size |C| = O(k2/ε2) and claim that it is a (k, ε)-coreset for A. We use the following corollary for Definition 1 of a coreset, based on simple linear algebra that follows from the geometrical definitions (e.g. see [11]). Property 1 (Coreset for sparse matrix). Let A ∈Rn×d, k ∈[1, d −1] be an integer, and let ε > 0 be an error parameter. For a diagonal matrix W ∈Rn×n, the matrix C = WA is a (k, ε)-coreset for A if for every matrix X ∈Rd×(d−k) such that XT X = I, we have (i) 1 −∥WAX∥ ∥AX∥ ≤ε, and (ii) ∥A −WA∥< ε var(A) (2) where var(A) is the sum of squared distances from the rows of A to their mean. The goal of this paper is to prove that such a coreset (Definition 1) exists for any matrix A (Property 1) and can be computed efficiently. Formally, Theorem 1. For every input matrix A ∈Rn×d, an error ε ∈(0, 1] and an integer k ∈[1, d −1]: (a) there is a (k, ε)-coreset C of size |C| = O(k2/ε2); (b) such a coreset can be constructed in O(k2/ε2) time. Theorem 1 is the formal statement for the main technical contribution of this paper. Sections 3–5 constitute a proof for Theorem 1. To establish Theorem 1(a), we first state our two main results (Theorems 2 and 3) axiomatically, and show how they combine such that Property 1 holds. Thereafter we prove the these results in Sections 4 and 5, respectively. To prove Theorem 1(b) (efficient construction) we present an algorithm for 4 Algorithm 1 CORESET-SUMVECS(A, ε) 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 048 049 050 051 052 053 Algorithm 1 CORESET-SUMVECS(A, ε) 1: Input: A: n input points a1, . . . , an in Rd 2: Input: ε ∈(0, 1): the approximation error 3: Output: w ∈[0, ∞)n: non-negative weights 4: A ←A −mean(A) 5: A ←c A where c is a constant s.t. var(A) = 1 6: w ←(1, 0, . . . , 0) 7: j ←1, p ←Aj, J ←{j} 8: Mj = y2 | y = A · AT j 9: for i = 1, . . . , n do 10: j ←argmin {wJ · MJ} 11: G ←W ′ · AJ where W ′ i,i = √wi 12: ∥c∥= ∥GT G)∥2 F 13: c · p = P|J| i=1 G pT 14: ∥c −p∥= p 1 + ∥c∥2 −c · p 15: compp(v) = 1/∥c −p∥−(c · p) /∥c −p∥ 16: ∥c −c′∥= ∥c −p∥−compp(v) 17: α = ∥c −c′∥/∥c −p∥ 18: w ←w(1 −|α|) 19: wj ←wj + α 20: w ←w/ Pn i=1 wi 21: Mj ← y2 | y = A · AT j 22: J ←J ∪{j} 23: if ∥c∥2 ≤ε then 24: break 25: end if 26: end for 27: return w 1 (a) Coreset for sum of vectors algorithm -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 c2 a3 c3 a1 = c1 a2 a4 a5 (b) Illustration showing first 3 steps of the computation computing a matrix C, and analyze the running time to show that the C can be constructed in O(k2/ε2) iterations. Let A ∈Rn×d be a matrix of rank d, and let UΣV T = A denote its full SVD. Let W ∈Rn×n be a diagonal matrix. Let k ∈[1, d −1] be an integer. For every i ∈[n] let vi = Ui,1, · · · , Ui,k, Ui,k+1:dΣk+1:d,k+1:d ∥Σk+1:d,k+1:d∥ , 1 . (3) Then the following two results hold: Theorem 2 (Coreset for sum of vectors). For every set of of n vectors v1, · · · , vn in Rd and every ε ∈(0, 1), a weight vector w ∈(0, ∞)n of sparsity ∥w∥0 ≤1/ε2 can be computed deterministically in O(nd/ε) time such that
n X i=1 vi − n X i=1 wivi
≤ε n X i=1 ∥vi∥2. (4) Section 4 establishes a proof for Theorem 2. Theorem 3 (Coreset for Low rank approximation). For every X ∈Rd×(d−k) such that XT X = I, 1 −∥WAX∥2 ∥AX∥2 ≤5
n X i=1 vivT i −Wi,ivivT i
. (5) Section 5 establishes a proof for Theorem 3. 3.1 Proof of Theorem 1 Proof of Theorem 1(a). Replacing vi with vivT i , ∥vi∥2 with ∥vivT i ∥, and ε by ε/(5k) in Theorem 2 yields
X i vivT i −Wi,ivivT i
≤(ε/5k) n X i=1 ∥vivT i ∥= ε. 5 Combining this inequality with (4) gives 1 −∥WAX∥2 ∥AX∥2 ≤5
n X i=1 vivT i −Wi,ivivT i
≤ε. Thus the left-most term is bounded by the right-most term, which proves (2). This also means that C = WA is a coreset for k-SVD, i.e., (non-affine) k-dimensional subspaces. To support PCA (affine subspaces) the coreset C = WA needs to satisfy the expression in the last line of Property 1 regarding its mean. This holds using the last entry (one) in the definition of vi (3), which implies that the sum of the rows is preserved as in equation (4). Therefore Property 1 holds for C = WA, which proves Theorem 1(a). Claim Theorem 1(b) follows from simple analysis of Algorithm 2 that implements this construction. 4 Coreset for Sum of Vectors (k = 0) In order to prove the general result Theorem 1(a), that is the existence of a (k, ε)-coreset for any k ∈[1, d−1], we first establish the special case for k = 0. In this section, we prove Theorem 2 by providing an algorithm for constructing a small weighted subset of points that constitutes a general approximation for the sum of vectors. To this end, we first introduce an intermediate result that shows that given n points on the unit ball with weight distribution z, there exists a small subset of points whose weighted mean is approximately the same as the weighted mean of the original points. Let Dn denote the union over every vector z ∈[0, 1]n that represent a distribution, i.e., P i zi = 1. Our first technical result is that for any finite set of unit vectors a1, . . . , an in Rd, any distribution z ∈Dn, and every ε ∈(0, 1], we can compute a sparse weight vector w ∈Dn of sparsity (nonzeroes entries) ∥w∥0 ≤1/ε2. Lemma 1. Let z ∈Dn be a distribution over n unit vectors a1, · · · , an in Rd. For ε ∈(0, 1), a sparse weight vector w ∈Dn of sparsity s ≤1/ε2 can be computed in O(nd/ε2) time such that
n X i=1 zi · ai − n X i=2 wi ai
2 ≤ε. (6) Proof of Lemma 1. Please see Supplementary Material, Section A. We prove Theorem 2 by providing a computation of such a sparse weight vector w. The intuition for this computation is as follows. Given n input points a1,. . . ,an in Rd, with weighted mean P i zi ai = 0, we project all the points on the unit sphere. Pick an arbitrary starting point a1 = c1. At each step find the farthest point aj+1 from cj, and compute cj+1 by projecting the origin onto the line segment [cj, aj+1]. Repeat this for j = 1,. . . ,N iterations, where N = 1/ε2. We prove that ∥ci∥2 = 1/i, thus if we iterate 1/ϵ2 times, this norm will be ∥c1/ϵ2∥= ϵ2. The resulting points ci are a weighted linear combination of a small subset of the input points. The output weight vector w ∈Dn satisfies cN = Pn i=1 wi ai, and this weighted subset forms the coreset. Fig. 1a contains the pseudocode for Algorithm 1. Fig. 1b illustrates the first steps of the main computation (lines 9–26). Please see Supplementary Material, Section C for a complete line-by-line analysis of Algorithm 1. Proof of Theorem 2. The proof of Theorem 2 follows by applying Lemma 1 after normalization of the input points and then post-processing the output. 5 Coreset for Low Rank Approximation (k > 0) In Section 4 we presented a new coreset construction for approximating the sum of vectors, showing that given n points on the unit ball there exists a small weighted subset of points that is a coreset for those points. In this section we describe the reduction of Algorithm 1 for k = 0 to an efficient algorithm for any low rank approximation with k ∈[1, d−1]. 6 Algorithm 2 CORESET-LOWRANK(A, k, ε) 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 048 049 050 051 052 053 Algorithm 1 CORESET-LOWRANK(A, k, ε) 1: Input: A: A sparse n×d matrix 2: Input: k ∈Z>0: the approximation rank 3: Input: ε ∈ 0, 1 2 : the approximation error 4: Output: w ∈[0, ∞)n: non-negative weights 5: Compute UΣV T = A, the SVD of A 6: R ←Σk+1:d,k+1:d 7: P ←matrix whose i-th row ∀i ∈[n] is 8: Pi = (Ui,1:k, Ui,k+1:d · R ∥R∥F ) 9: X ←matrix whose i-th row ∀i ∈[n] is 10: Xi = Pi/∥Pi∥F 11: w ←(1, 0, . . . , 0) 12: for i = 1, . . . , k2/ε2 do 13: j ←argmini=1,...,n{wXXi} 14: a = Pn i=1 wi(XT i Xj)2 15: b = 1 −∥PXj∥2 F + Pn i=1 wi∥PXi∥2 F ∥P∥2 F 16: c = ∥wX∥2 F 17: α = (1 −a + b) / (1 + c −2a) 18: w ←(1 −α)Ij + αw 19: end for 20: return w 1 (a) 1/2: Initialization 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 048 049 050 051 052 053 Algorithm 1 CORESET LOWRANK(A, k, ε) 1: Input: A: A sparse n×d matrix 2: Input: k ∈Z>0: the approximation rank 3: Input: ε ∈ 0, 1 2 : the approximation error 4: Output: w ∈[0, ∞)n: non-negative weights 5: Compute UΣV T = A, the SVD of A 6: R ←Σk+1:d,k+1:d 7: P ←matrix whose i-th row ∀i ∈[n] is 8: Pi = (Ui,1:k, Ui,k+1:d · R ∥R∥F ) 9: X ←matrix whose i-th row ∀i ∈[n] is 10: Xi = Pi/∥Pi∥F 11: w ←(1, 0, . . . , 0) 12: for i = 1, . . . , k2/ε2 do 13: j ←argmini=1,...,n{wXXi} 14: a = Pn i=1 wi(XT i Xj)2 15: b = 1 −∥PXj∥2 F + Pn i=1 wi∥PXi∥2 F ∥P∥2 F 16: c = ∥wX∥2 F 17: α = (1 −a + b) / (1 + c −2a) 18: w ←(1 −α)Ij + αw 19: end for 20: return w 1 (b) 2/2: Computation Conceptually, we achieve this reduction in two steps. The first step is to show that Algorithm 1 can be reduced to an inefficient computation for low rank approximation for matrices. To this end, we first prove Theorem 3, thus completing the existence clause Theorem 1(a). Proof of Theorem 3. Let ε = ∥Pn i=1(1 −W 2 i,i)vivT i ∥. For every i ∈[n] let ti = 1 −W 2 i,i. Set X ∈Rd×(d−k) such that XT X = I. Without loss of generality we assume V T = I, i.e. A = UΣ, otherwise we replace X by V T X. It thus suffices to prove that P i ti∥Ai,:X∥2 ≤5ε ∥AX∥2. Using the triangle inequality, we get X i ti∥Ai,:X∥2 ≤ X i ti∥Ai,:X∥2 − X i ti∥(Ai,1:k, 0)X∥2 (7) + X i ti∥(Ai,1:k, 0)X∥2 . (8) We complete the proof by deriving bounds on (7) and (8), thus proving (5). For the complete proof, please see Supplementary Material, Section B. Together, Theorems 2 and 3 show that the error of the coreset is a 1 ± ε approximation to the true weighted mean. By Theorem 3, we can now simply apply Algorithm 1 to the right hand side of (5) to compute the reduction. The intuition for this inefficient reduction is as follows. We first compute the outer product of each row vector x in the input matrix A ∈R[n×d]. Each such outer products xT x is a matrix in Rd×d. Next, we expand every such matrix into a vector, in Rd2 by concatenating its entries. Finally, we combine each such vector back to be a vector in the matrix P ∈Rn×d2. At this point the reduction is complete, however it is clear that this matrix expansion is inefficient. The second step of the reduction is to transform the slow computation of running Algorithm 1 on the expanded matrix P ∈Rn×d2 into an equivalent and provably fast computation on the original set of points A ∈Rd. To this end we make use of the fact that each row of P is a sparse vector in Rd to implicitly run the computation in the original row space Rd. We present Algorithm 2 and prove that it returns the weight vector w=(w1, · · · , wn) of a (k, ε)-coreset for low-rank approximation of the input point set P, and that this coreset is small, namely, only O(k2/ε2) of the weights (entries) in w are non-zeros. Fig. 5 contains the pseudocode for Algorithm 2. Please see Supplementary Material, Section D for a complete line-by-line analysis of Algorithm 2. 6 Evaluation and Experimental Results The coreset construction algorithm described in Section 5 was implemented in MATLAB. We make use of the redsvd package [12] to improve performance, but it is not required to run the system. We evaluate our system on two types of data: synthetic data generated with carefully controlled parameters, and real data from the English Wikipedia under the “bag of words” (BOW) model. Synthetic data provides ground-truth to evaluate the quality, efficiency, and scalability of our system, while the Wikipedia data provides us with a grand challenge for latent semantic analysis computation. 7 Coreset size (number of points) 0 10 20 30 40 50 60 Relative error #10-4 0 0.5 1 1.5 2 2.5 3 3.5 4 SVD Coreset Uniform Random Sampling Weighted Random Sampling (a) Relative error (k = 10) Coreset size (number of points) 0 10 20 30 40 50 60 70 80 Relative error #10-4 0 1 2 3 4 5 SVD Coreset Uniform Random Sampling Weighted Random Sampling (b) Relative error (k = 20) Coreset size (number of points) 0 10 20 30 40 50 60 70 80 90 100 Relative error #10-3 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 SVD Coreset Uniform Random Sampling Weighted Random Sampling (c) Relative error (k = 50) Number of iterations N 0 200 400 600 800 1000 1200 1400 1600 1800 2000 f(N) 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 A[5000x1000], sparsity=0.0333 f(N) = eps f(N) = N eps f(N) = N logN eps f(N) = N2 eps f(N) = f*(N)+C (d) Synthetic data errors (e) Wikipedia running time (x-axis log scale) Number of million points streamed 0 0.5 1 1.5 2 2.5 3 3.5 log10 eps -5 -4.5 -4 -3.5 -3 -2.5 -2 -1.5 -1 -0.5 0 Wikipedia approximation log error k = 1 k = 10 k = 100 (f) Wikipedia log errors Figure 1: Experimental results for synthetic data (Fig. 1a–1d) and Wikipedia (Fig. 1e–Fig. 1f). For our synthetic data experiments, we used a moderate size sparse input of (5000×1000) to evaluate the relationship between the error ε and the number of iterations of the algorithm N. We then compare our coreset against uniform sampling and weighted random sampling using the squared norms of U (A = UΣV T ) as the weights. Finally, we evaluate the efficiency of our algorithm by comparing the running time against the MATLAB svds function and against the most recent state of the art dimensionality reduction algorithm [8]. Figure 1a–1d show the exerimental results. Please see Supplementary Material, Section E for a complete description of the experiments. 6.1 Latent Semantic Analysis of Wikipedia For our large-scale grand challenge experiment, we apply our algorithm for computing Latent Semantic Analysis (LSA) on the entire English Wikipedia. The size of the data is n = 3.69M (documents) with a dimensionality d=7.96M (words). We specify a nominal error of ε=0.5, which is a theoretical upper bound for N = 2k/ε iterations, and show that the coreset error remains bounded. Figure 1f shows the log approximation error, i.e. sum of squared distances of the coreset to the subspace for increasing approximation rank k=1, 10, 100. We see that the log error is proportional to k, and as the number of streamed points increases into the millions, coreset error remains bounded by k. Figure 1e shows the running time of our algorithm compared against svds for increasing dimensionality d and a fixed input size n=3.69M (number of documents). Finally, we show that our coreset can be used to create a topic model of 100 topics for the entire English Wikipedia. We construct the coreset of size N = 1000 words. Then to generate the topics, we compute a projection of the coreset onto a subspace of rank k =100. Please see Supplementary Material, Section F for more details, including an example of the topics obtained in our experiments. 7 Conclusion We present a new approach for dimensionality reduction using coresets. Our solution is general and can be used to project spaces of dimension d to subspaces of dimension k < d. The key feature of our algorithm is that it computes coresets that are small in size and subsets of the original data. We benchmark our algorithm for quality, efficiency, and scalability using synthetic data. We then apply our algorithm for computing LSA on the entire Wikipedia – a computation task hitherto not possible with state of the art algorithms. We see this work as a theoretical foundation and practical toolbox for a range of dimensionality reduction problems, and we believe that our algorithms will be used to 8 construct many other coresets in the future. Our project codebase is open-sourced and can be found here: http://people.csail.mit.edu/mikhail/NIPS2016. References [1] D. Achlioptas and F. Mcsherry. Fast computation of low-rank matrix approximations. Journal of the ACM (JACM), 54(2):9, 2007. [2] S. Arora, E. Hazan, and S. Kale. A fast random sampling algorithm for sparsifying matrices. In Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques, pages 272–279. Springer, 2006. [3] J. Batson, D. A. Spielman, and N. Srivastava. Twice-ramanujan sparsifiers. SIAM Journal on Computing, 41(6):1704–1721, 2012. [4] C. Carath´eodory. ¨Uber den variabilit¨atsbereich der fourierschen konstanten von positiven harmonischen funktionen. Rendiconti del Circolo Matematico di Palermo (1884-1940), 32(1):193–217, 1911. [5] K. L. Clarkson. Coresets, sparse greedy approximation, and the frank-wolfe algorithm. ACM Transactions on Algorithms (TALG), 6(4):63, 2010. [6] K. L. Clarkson and D. P. Woodruff. Low rank approximation and regression in input sparsity time. In Proceedings of the forty-fifth annual ACM symposium on Theory of computing, pages 81–90. ACM, 2013. [7] M. B. Cohen, S. Elder, C. Musco, C. Musco, and M. Persu. Dimensionality reduction for k-means clustering and low rank approximation. In Proceedings of the Forty-Seventh Annual ACM on Symposium on Theory of Computing, pages 163–172. ACM, 2015. [8] M. B. Cohen, C. Musco, and J. W. Pachocki. Online row sampling. CoRR, abs/1604.05448, 2016. [9] P. Drineas and A. Zouzias. A note on element-wise matrix sparsification via a matrix-valued bernstein inequality. Information Processing Letters, 111(8):385–389, 2011. [10] D. Feldman and M. Langberg. A unified framework for approximating and clustering data. In Proc. 41th Ann. ACM Symp. on Theory of Computing (STOC), 2010. Manuscript available at arXiv.org. [11] D. Feldman, M. Schmidt, and C. Sohler. Turning big data into tiny data: Constant-size coresets for kmeans, pca and projective clustering. Proceedings of ACM-SIAM Symposium on Discrete Algorithms (SODA), 2013. [12] Google. redsvd. https://code.google.com/archive/p/redsvd/, 2011. [13] N. P. Halko. Randomized methods for computing low-rank approximations of matrices. PhD thesis, University of Colorado, 2012. [14] M. Inaba, N. Katoh, and H. Imai. Applications of weighted voronoi diagrams and randomization to variance-based k-clustering. In Proceedings of the tenth annual symposium on Computational geometry, pages 332–339. ACM, 1994. [15] M. Journ´ee, Y. Nesterov, P. Richt´arik, and R. Sepulchre. Generalized power method for sparse principal component analysis. The Journal of Machine Learning Research, 11:517–553, 2010. [16] C. Lanczos. An iteration method for the solution of the eigenvalue problem of linear differential and integral operators. United States Governm. Press Office Los Angeles, CA, 1950. [17] M. Langberg and L. J. Schulman. Universal ε approximators for integrals. Proceedings of ACM-SIAM Symposium on Discrete Algorithms (SODA), 2010. [18] E. Liberty, F. Woolfe, P.-G. Martinsson, V. Rokhlin, and M. Tygert. Randomized algorithms for the low-rank approximation of matrices. Proceedings of the National Academy of Sciences, 104(51):20167– 20172, 2007. [19] C. C. Paige. Computational variants of the lanczos method for the eigenproblem. IMA Journal of Applied Mathematics, 10(3):373–381, 1972. [20] C. H. Papadimitriou, H. Tamaki, P. Raghavan, and S. Vempala. Latent semantic indexing: A probabilistic analysis. In Proceedings of the seventeenth ACM SIGACT-SIGMOD-SIGART symposium on Principles of database systems, pages 159–168. ACM, 1998. [21] R. Ruvrek, P. Sojka, et al. Gensimstatistical semantics in python. 2011. [22] T. Sarlos. Improved approximation algorithms for large matrices via random projections. In Foundations of Computer Science, 2006. FOCS’06. 47th Annual IEEE Symposium on, pages 143–152. IEEE, 2006. 9 | 2016 | 426 |
6,357 | Doubly Convolutional Neural Networks Shuangfei Zhai Binghamton University Vestal, NY 13902, USA szhai2@binghamton.edu Yu Cheng IBM T.J. Watson Research Center Yorktown Heights, NY 10598, USA chengyu@us.ibm.com Weining Lu Tsinghua University Beijing 10084, China luwn14@mails.tsinghua.edu.cn Zhongfei (Mark) Zhang Binghamton University Vestal, NY 13902, USA zhongfei@cs.binghamton.edu Abstract Building large models with parameter sharing accounts for most of the success of deep convolutional neural networks (CNNs). In this paper, we propose doubly convolutional neural networks (DCNNs), which significantly improve the performance of CNNs by further exploring this idea. In stead of allocating a set of convolutional filters that are independently learned, a DCNN maintains groups of filters where filters within each group are translated versions of each other. Practically, a DCNN can be easily implemented by a two-step convolution procedure, which is supported by most modern deep learning libraries. We perform extensive experiments on three image classification benchmarks: CIFAR-10, CIFAR-100 and ImageNet, and show that DCNNs consistently outperform other competing architectures. We have also verified that replacing a convolutional layer with a doubly convolutional layer at any depth of a CNN can improve its performance. Moreover, various design choices of DCNNs are demonstrated, which shows that DCNN can serve the dual purpose of building more accurate models and/or reducing the memory footprint without sacrificing the accuracy. 1 Introduction In recent years, convolutional neural networks (CNNs) have achieved great success to solve many problems in machine learning and computer vision. CNNs are extremely parameter efficient due to exploring the translation invariant property of images, which is the key to training very deep models without severe overfitting. While considerable progresses have been achieved by aggressively exploring deeper architectures [1, 2, 3, 4] or novel regularization techniques [5, 6] with the standard "convolution + pooling" recipe, we contribute from a different view by providing an alternative to the default convolution module, which can lead to models with even better generalization abilities and/or parameter efficiency. Our intuition originates from observing well trained CNNs where many of the learned filters are the slightly translated versions of each other. To quantify this in a more formal fashion, we define the k-translation correlation between two convolutional filters within a same layer Wi, Wj as: ρk(Wi, Wj) = max x,y∈{−k,...,k},(x,y)̸=(0,0) < Wi, T(Wj, x, y) >f ∥Wi∥2∥Wj∥2 , (1) where T(·, x, y) denotes the translation of the first operand by (x, y) along its spatial dimensions, with proper zero padding at borders to maintain the shape; < ·, · >f denotes the flattened inner 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Figure 1: Visualization of the 11 × 11 sized first layer filters learned by AlexNet [1]. Each column shows a filter in the first row along with its three most 3-translation-correlated filters. Only the first 32 filters are shown for brevity. Figure 2: Illustration of the averaged maximum 1-translation correlation, together with the standard deviation, of each convolutional layer for AlexNet [1] (left), and the 19-layer VGGNet [2] (right), respectively. For comparison, for each convolutional layer in each network, we generate a filter set with the same shape from the standard Gaussian distribution (the blue bars). For both networks, all the convolutional layers have averaged maximum 1-translation correlations that are significantly larger than their random counterparts. product, where the two operands are flattened into column vectors before taking the standard inner product; ∥· ∥2 denotes the ℓ2 norm of its flattened operand. In other words, the k-translation correlation between a pair of filters indicates the maximum correlation achieved by translating one filter up to k steps along any spatial dimension. As a concrete example, Figure 1 demonstrates the 3-translation correlation of the first layer filters learned by the AlexNet [1], with the weights obtained from the Caffe model zoo [7]. In each column, we show a filter in the first row and its three most 3-translation-correlated filters (that is, filters with the highest 3-translation correlations) in the second to fourth row. Only the first 32 filters are shown for brevity. It is interesting to see for most filters, there exist several filters that are roughly its translated versions. In addition to the convenient visualization of the first layers, we further study this property at higher layers and/or in deeper models. To this end, we define the averaged maximum k-translation correlation of a layer W as ¯ρk(W) = 1 N PN i=1 maxN j=1,j̸=i ρk(Wi, Wj), where N is the number of filters. Intuitively, the ¯ρk of a convolutional layer characterizes the average level of translation correlation among the filters within it. We then load the weights of all the convolutional layers of AlexNet as well as the 19-layer VGGNet [2] from the Caffe model zoo, and report the averaged maximum 1-translation correlation of each layer in Figure 2. In each graph, the height of the red bars indicates the ¯ρ1 calculated with the weights of the corresponding layer. As a comparison, for each layer we have also generated a filter bank with the same shape but filled with standard Gaussian samples, whose ¯ρ1 are shown as the blue bars. We clearly see that all the layers in both models demonstrate averaged maximum translation correlations that are significantly higher than their random counterparts. In addition, it appears that lower convolutional layers generally have higher translation correlations, although this does not strictly hold (e.g., conv3_4 in VGGNet). Motivated by the evidence shown above, we propose the doubly convolutional layer (with the double convolution operation), which can be plugged in place of a convolutional layer in CNNs, yielding the doubly convolutional neural networks (DCNNs). The idea of double convolution is to learn groups filters where filters within each group are translated versions of each other. To achieve this, a doubly convolutional layer allocates a set of meta filters which has filter sizes that are larger than the effective filter size. Effective filters can be then extracted from each meta filter, which corresponds to convolving the meta filters with an identity kernel. All the extracted filters are then concatenated, and convolved with the input. Optionally, one can also choose to pool along activations produced by filters from the same meta filter, in a similar spirit to the maxout networks [8]. We also show that double convolution can be easily implemented with available deep learning libraries by utilizing the efficient 2 Figure 3: The architecture of a convolutional layer (left) and a doubly convolutional layer (right). A doubly convolutional layer maintains meta filters whose spatial size z′ × z′ is larger than the effective filter size z × z. By pooling and flattening the convolution output, a doubly convolutional layer produces ( z′−z+1 s )2 times more channels for the output image, with s × s being the pooling size. convolutional kernel. In our experiments, we show that the additional level of parameter sharing by double convolution allows one to build DCNNs that yield an excellent performance on several popular image classification benchmarks, consistently outperforming all the competing architectures with a margin. We have also confirmed that replacing a convolutional layer with a doubly convolutional layer consistently improves the performance, regardless of the depth of the layer. Last but not least, we show that one is able to balance the trade off between performance and parameter efficiency by leveraging the architecture of a DCNN. 2 Model 2.1 Convolution We define an image I ∈Rc×w×h as a real-valued 3D tensor, where c is the number of channels; w, h are the width and height, respectively. We define the convolution operation, denoted by Iℓ+1 = Iℓ∗Wℓ, as follows: Iℓ+1 k,i,j = X c′∈[1,c],i′∈[1,z],j′∈[1,z] Wℓ k,c′,i′,j′Iℓ c′,i+i′−1,j+j′−1, k ∈[1, cℓ+1], i ∈[1, wℓ+1], j ∈[1, hℓ+1]. (2) Here Iℓ∈Rcℓ×wℓ×hℓis the input image; Wℓ∈Rcℓ+1×cℓ×z×z is a set of cℓ+1 filters, with each filter of shape cℓ× z × z; Iℓ+1 ∈Rcℓ+1×wℓ+1×hℓ+1 is the output image. The spatial dimensions of the output image wℓ+1, hℓ+1 are by default wℓ+ z −1 and hℓ+ z −1, respectively (aka, valid convolution), but one can also pad a number of zeros at the borders of Iℓto achieve different output spatial dimensions (e.g., keeping the spatial dimensions unchanged). In this paper, we use a loose notation by freely allowing both the LHS and RHS of ∗to be either a single image (filter) or a set of images (filters), with proper convolution along the non-spatial dimensions. A convolutional layer can thus be implemented with a convolution operation followed by a nonlinearity function such as ReLU, and a convolutional neural network (CNN) is constructed by interweaving several convolutoinal and spatial pooling layers. 2.2 Double convolution We next introduce and define the double convolution operation, denoted by Iℓ+1 = Iℓ⊗Wℓ, as follows: Oℓ+1 i,j,k = Wℓ k ∗Iℓ :,i:(i+z−1),j:(j+z−1), Iℓ+1 (nk+1):n(k+1),i,j = pools(Oℓ+1 i,j,k), n = (z′ −z + 1 s )2, k ∈[1, cℓ+1], i ∈[1, wℓ+1], j ∈[1, hℓ+1]. (3) 3 Here Iℓ∈Rcℓ×wℓ×hℓand Iℓ+1 ∈Rncℓ+1×wℓ+1×hℓ+1 are the input and output image, respectively. Wℓ∈Rcℓ+1×cℓ×z′×z′ are a set of cℓ+1 meta filters, with filter size z′ × z′, z′ > z; Oℓ+1 i,j,k ∈ R(z′−z+1)×(z′−z+1) is the intermediate output of double convolution; pools(·) defines a spatial pooling function with pooling size s × s (and optionally reshaping the output to a column vector, inferred from the context); ∗is the convolution operator defined previously in Equation 2. In words, a double convolution applies a set of cℓ+1 meta filters with spatial dimensions z′ × z′, which are larger than the effective filter size z × z. Image patches of size z × z at each location (i, j) of the input image, denoted by Iℓ :,i:(i+z−1),j:(j+z−1), are then convolved with each meta filter, resulting an output of size z′ −z + 1 × z′ −z + 1, for each (i, j). A spatial pooling of size s × s is then applied along this resulting output map, whose output is flattened into a column vector. This produces an output feature map with ncℓ+1 channels. The above procedure can be viewed as a two step convolution, where image patches are first convolved with meta filters, and the meta filters then slide across and convolve with the image, hence the name double convolution. A doubly convolutional layer is by analogy defined as a double convolution followed by a nonlinearity; and substituting the convolutional layers in a CNN with doubly convolutional layers yields a doubly convolutional neural network (DCNN). In Figure 3 we have illustrated the difference between a convolutional layer and a doubly convolutional layer. It is possible to vary the combination of z, z′, s for each doubly convolutional layer of a DCNN to yield different variants, among which three extreme cases are: (1) CNN: Setting z′ = z recovers the standard CNN; hence, DCNN is a generalization of CNN. (2) ConcatDCNN: Setting s = 1 produces a DCNN variant that is maximally parameter efficient. This corresponds to extracting all sub-regions of size z × z from a z′ × z′ sized meta filter, which are then stacked to form a set of (z′ −z + 1)2 filters with size z × z. With the same amount of parameters, this produces (z′−z+1)2z2 (z′)2 times more channels for a single layer. (3) MaxoutDCNN: Setting s = z′ −z + 1, i.e., applying global pooling on Oℓ+1, produces a DCNN variant where the output image channel size is equal to the number of the meta filters. Interestingly, this yields a parameter efficient implementation of the maxout network [8]. To be concrete, the maxout units in a maxout network are equivalent to pooling along the channel (feature) dimension, where each channel corresponds to a distinct filter. MaxoutDCNN, on the other hand, pools along channels which are produced by the filters that are translated versions of each other. Besides the obvious advantage of reducing the number of parameters required, this also acts as an effective regularizer, which is verified later in the experiments at Section 4. Implementing a double convolution is also readily supported by most main stream GPU-compatible deep learning libraries (e.g., Theano which is used in our experiments), which we have summarized in Algorithm 1. In particular, we are able to perform double convolution by two steps of convolution, corresponding to line 4 and line 6, together with proper reshaping and pooling operations. The first convolution extracts overlapping patches of size z × z from the meta filters, which are then convolved with the input image. Although it is possible to further reduce the time complexity by designing a specialized double convolution module, we find that Algorithm 1 scales well to deep DCNNs, and large datasets such as ImageNet. 3 Related work The spirit of DCNNs is to further push the idea of parameter sharing of the convolutional layers, which is shared by several recent efforts. [9] explores the rotation symmetry of certain classes of images, and hence proposes to rotate each filter (or alternatively, the input) by a multiplication of 90◦which produces four times filters with the same amount of parameters for a single layer. [10] observes that filters learned by ReLU CNNs often contain pairs with opposite phases in the lower layers. The authors accordingly propose the concatenated ReLU where the linear activations are concatenated with their negations and then passed to ReLU, which effectively doubles the number of filters. [11] proposes the dilated convolutions, where additional filters with larger sizes are generated by dilating the base convolutional filters, which is shown to be effective in dense prediction tasks such as image segmentation. [12] proposes a multi-bias activation scheme where k, k ≤1, bias terms are learned for each filter, which produces a k times channel size for the convolution output. 4 Algorithm 1: Implementation of double convolution with convolution. Input: Input image Iℓ∈Rcℓ×wℓ×hℓ, meta filters Wℓ∈Rcℓ+1×z′×z′, effective filter size z × z, pooling size s × s. Output: Output image Iℓ+1 ∈Rncℓ+1×wℓ+1×hℓ+1, with n = (z′−z+1)2 s2 . 1 begin 2 Iℓ←IdentityMatrix(cℓz2) ; 3 Reorganize Iℓto shape cℓz2 × cℓ× z × z; 4 ˜ Wℓ←Wℓ∗Iℓ; /* output shape: cℓ+1 × cℓz2 × (z′ −z + 1) × (z′ −z + 1) */ 5 Reorganize ˜ Wℓto shape cℓ+1(z′ −z + 1)2 × cℓ× z × z; 6 Oℓ+1 ←Iℓ∗˜ Wℓ; /* output shape: cℓ+1(z′ −z + 1)2 × wℓ+1 × hℓ+1 */ 7 Reorganize Oℓ+1 to shape cℓ+1wℓ+1hℓ+1 × (z′ −z + 1) × (z′ −z + 1) ; 8 Iℓ+1 ←pools(Oℓ+1) ; /* output shape: cℓ+1wℓ+1hℓ+1 × z′−z+1 s × z′−z+1 s */ 9 Reorganize Iℓ+1 to shape cℓ+1( z′−z+1 s )2 × wℓ+1 × hℓ+1 ; Additionally, [13, 14] have investigated the combination of more than one transformations of filters, such as rotation, flipping and distortion. Note that all the aforementioned approaches are orthogonal to DCNNs and can theoretically be combined in a single model. The need of correlated filters in CNNs is also studied in [15], where similar filters are explicitly learned and grouped with a group sparsity penalty. While DCNNs are designed with better performance and generalization ability in mind, they are also closely related to the thread of work on parameter reduction in deep neural networks. The work of Vikas and Tara [16] addresses the problem of compressing deep networks by applying structured transforms. [17] exploits the redundancy in the parametrization of deep architectures by imposing a circulant structure on the projection matrix, while allowing the use of FFT for faster computations. [18] attempts to obtain the compression of the fully-connected layers of the AlexNettype network with the Fastfood method. Novikov et al. [19] use a multi-linear transform (Tensor-Train decomposition) to attain reduction of the number of parameters in the linear layers of CNNs. These work differ from DCNNs as most of their focuses are on the fully connected layers, which often accounts for most of the memory consumption. DCNNs, on the other hand, apply directly to the convolutional layers, which provides a complementary view to the same problem. 4 Experiments 4.1 Datasets We conduct several sets of experiments with DCNN on three image classification benchmarks: CIFAR-10, CIFAR-100, and ImageNet. CIFAR-10 and CIFAR-100 both contain 50,000 training and 10,000 testing 32 × 32 sized RGB images, evenly drawn from 10 and 100 classes, respectively. ImageNet is the dataset used in the ILSVRC-2012 challenge, which consists of about 1.2 million images for training and 50,000 images for validation, sampled from 1,000 classes. 4.2 Is DCNN an effective architecture? 4.2.1 Model specifications In the first set of experiments, we study the effectiveness of DCNN compared with two different CNN designs. The three types of architectures subject to evaluation are: (1) CNN: This corresponds to models using the standard convolutional layers. A convolutional layer is denoted as C-<c>-<z>, where c, z are the number of filters and the filter size, respectively. (2) MaxoutCNN: This corresponds to the maxout convolutional networks [8], which uses the maxout unit to pool along the channel (feature) dimensions with a stride k. A maxout convolutional layer is denoted as MC-<c>-<z>-<k>, where c, z, k are the number of filters, the filter size, and the feature pooling stride, respectively. 5 Table 1: The configurations of the models used in Section 4.2. The architectures on the CIFAR-10 and CIFAR-100 datasets are the same, except for the top softmax layer (left). The architectures on the ImageNet dataset are variants of the 16-layer VGGNet [2] (right). See the details about the naming convention in Section 4.2.1. CNN DCNN MaxoutCNN C-128-3 DC-128-4-3-2 MC-512-3-4 C-128-3 DC-128-4-3-2 MC-512-3-4 P-2 C-128-3 DC-128-4-3-2 MC-512-3-4 C-128-3 DC-128-4-3-2 MC-512-3-4 P-2 C-128-3 DC-128-4-3-2 MC-512-3-4 C-128-3 DC-128-4-3-2 MC-512-3-4 P-2 C-128-3 DC-128-4-3-2 MC-512-3-4 C-128-3 DC-128-4-3-2 MC-512-3-4 P-2 Global Average Pooling Softmax CNN DCNN MaxoutCNN C-64-3 DC-64-4-3-2 MC-256-3-4 C-64-3 DC-64-4-3-2 MC-256-3-4 P-2 C-128-3 DC-128-4-3-2 MC-512-3-4 C-128-3 DC-128-4-3-2 MC-512-3-4 P-2 C-256-3 DC-256-4-3-2 MC-1024-3-4 C-256-3 DC-256-4-3-2 MC-1024-3-4 C-256-3 DC-256-4-3-2 MC-1024-3-4 P-2 C-512-3 DC-512-4-3-2 MC-2048-3-4 C-512-3 DC-512-4-3-2 MC-2048-3-4 C-512-3 DC-512-4-3-2 MC-2048-3-4 P-2 C-512-3 DC-512-4-3-2 MC-2048-3-4 C-512-3 DC-512-4-3-2 MC-2048-3-4 C-512-3 DC-512-4-3-2 MC-2048-3-4 P-2 Global Average Pooling Softmax (3) DCNN: This corresponds to using the doubly convolutional layers. We denote a doubly convolutional layer with c filters as DC-<c>-<z′>-<z>-<s>, where z′, z, s are the meta filter size, effective filter size and pooling size, respectively, as in Equation 3. In this set of experiments, we use the MaxoutDCNN variant, whose layers are readily represented as DC-<c>-<z′>-<z>-<z′ −z + 1>. We denote a spatial max pooling layer as P-<s> with s as the pooling size. For all the models, we apply batch normalization [6] immediately after each convolution layer, after which ReLU is used as the nonlinearity (including MaxoutCNN, which makes out implementation slightly different from [8]). Our model design is similar to VGGNet [2] where 3 × 3 filter sizes are used, as well as Network in Network [20] where fully connected layers are completely eliminated. Zero padding is used before each convolutional layer to maintain the spatial dimensions unchanged after convolution. Dropout is applied after each pooling layer. Global average pooling is applied on top of the last convolutional layer, which is fed to a Softmax layer with a proper number of outputs. All the three models on each dataset are of the same architecture w.r.t. the number of layers and the number of units per layer. The only difference thus resides in the choice of the convolutional layers. Note that the architecture we have used on the ImageNet dataset resembles the 16-layer VGGNet [2], but without the fully connected layers. The full specification of the model architectures is shown in Table 1. 4.2.2 Training protocols We preprocess all the datasets by extracting the mean for each pixel and each channel, calculated on the training sets. All the models are trained with Adadelta [21] on NVIDIA K40 GPUs. Bath size is set as 200 for CIFAR-10 and CIFAR-100, and 128 for ImageNet. Data augmentation has also been explored. On CIFAR-10 and CIFAR-100, We follow the simple data augmentation as in [2]. For training, 4 pixels are padded on each side of the images, from which 32 × 32 crops are sampled with random horizontal flipping. For testing, only the original 32 × 32 images are used. On ImageNet, 224 × 224 crops are sampled with random horizontal flipping; the standard color augmentation and the 10-crop testing are also applied as in AlexNet [1]. 6 4.2.3 Results The test errors are summarized in Table 2 and Table 3, where the relative # parameters of DCNN and MaxoutCNN compared with the standard CNN are also shown. On the moderately-sized datasets CIFAR-10 and CIFAR-100, DCNN achieves the best results of the three control experiments, with and without data augmentation. Notably, DCNN consistently improves over the standard CNN with a margin. More remarkably, DCNN also consistently outperforms MaxoutCNN, with 2.25 times less parameters. This on the one hand proves that the doubly convolutional layers greatly improves the model capacity, and on the other hand verifies our hypothesis that the parameter sharing introduced by double convolution indeed acts as a very effective regularizer. The results achieved by DCNN on the two datasets are also among the best published results compared with [20, 22, 23, 24]. Besides, we also note that DCNN does not have difficulty scaling up to a large dataset as ImageNet, where consistent performance gains over the other baseline architectures are again observed. Compared with the results of the 16-layer VGGNet in [2] with multiscale evaluation, our DCNN implementation achieves comparable results, with significantly less parameters. Table 2: Test errors on CIFAR-10 and CIFAR-100 with and without data augmentation, together with the relative # parameters compared with the standard CNN. Model # Parameters Without Data Augmentation With Data Augmentation CIFAR-10 CIFAR-100 CIFAR-10 CIFAR-100 CNN 1. 9.85% 34.26% 9.59% 33.04% MaxoutCNN 4. 9.56% 33.52% 9.23% 32.37% DCNN 1.78 8.58% 30.35% 7.24% 26.53% NIN [20] 0.92 10.41% 35.68% 8.81% DSN [22] 9.78% 34.57% 8.22% APL [23] 9.59% 34.40% 7.51% 30.83% ELU [24] 6.55% 24.28% 4.3 Does double convolution contribute to every layer? In the next set of experiments, we study the effect of applying double convolution to layers at various depths. To this end, we replace the convolutional layers at each level of the standard CNN defined in 4.2.1 with a doubly convolutional layer counterpart (e.g., replacing a C-128-3 layer with a DC-128-4-3-2 layer). We hence define DCNN[i-j] as the network resulted from replacing the i −jth convolutional layer of a CNN with its doubly convolutional layer counterpart, and train {DCNN[1-2], DCNN[3-4], DCNN[5-6], DCNN[7-8]} on CIFAR-10 and CIFAR-100 following the same protocol as that in Section 4.2.2. The results are shown in Table 4. Interestingly, the doubly convolutional layer is able to consistently improve the performance over that of the standard CNN regardless of the depth with which it is plugged in. Also, it seems that applying double convolution at lower layers contributes more to the performance, which is consistent with the trend of translation correlation observed in Figure 2. Table 3: Test errors on ImageNet, evaluated on the validation set, together with the relative # parameters compared with the standard CNN. Model Top-5 Error Top-1 Error # Parameters CNN 10.59% 29.42% 1. MaxoutCNN 9.82% 28.4% 4. DCNN 8.23% 26.27 % 1.78 VGG-16 [2] 7.5% 24.8% 9.3 ResNet-152 [4] 5.71% 21.43% 4.1 GoogLeNet [3] 7.9% 0.47 7 Table 4: Inserting the doubly convolutional layer at different depths of the network. Model CIFAR-10 CIFAR-100 CNN 9.85% 34.26% DCNN[1-2] 9.12% 32.91% DCNN[3-4] 9.23% 33.27% DCNN[5-6] 9.45% 33.58% DCNN[7-8] 9.57% 33.72% DCNN[1-8] 8.58% 30.35% 4.4 Performance vs. parameter efficiency In the last set of experiments, we study the behavior of DCNNs under various combinations of its hyper-parameters, z′, z, s. To this end, we train three more DCNNs on CIFAR-10 and CIFAR-100, namely {DCNN-32-6-3-2, DCNN-16-6-3-1, DCNN-4-10-3-1}. Here we have overloaded the notation for a doubly convolutional layer to denote a DCNN which contains correspondingly shaped doubly convolutional layers (the DCNN in Table 1 thus corresponds to DCNN-128-4-3-2). In particular, DCNN-32-6-3-2 produces a DCNN with the exact same shape and number of parameters of those of the reference CNN; DCNN-16-6-3-1, DCNN-4-10-3-1 are two ConcatDCNN instances from Section 2.2, which produce larger sized models with same or less amount of parameters. The results, together with the effective layer size and the relative number of parameters, are listed in Table 5. We see that all the variants of DCNN consistently outperform the standard CNN, even when fewer parameters are used (DCNN-4-10-3-1). This verifies that DCNN is a flexible framework which allows one to either maximize the performance with a fixed memory budget, or on the other hand, minimize the memory footprint without sacrificing the accuracy. One can choose the best suitable architecture of a DCNN by balancing the trade off between performance and the memory footprint. Table 5: Different architecture configurations of DCNNs. Model CIFAR-10 CIFAR-100 Layer size # Parameters CNN 9.85% 34.26% 128 1. DCNN-32-6-3-2 9.05% 32.28% 128 1. DCNN-16-6-3-1 9.16% 32.54% 256 1. DCNN-4-10-3-1 9.65% 33.57% 256 0.69 DCNN-128-4-3-2 8.58% 30.35% 128 1.78 5 Conclusion We have proposed the doubly convolutional neural networks (DCNNs), which utilize a novel double convolution operation to provide an additional level of parameter sharing over CNNs. We show that DCNNs generalize standard CNNs, and relate to several recent proposals that explore parameter redundancy in CNNs. A DCNN can be easily implemented by modern deep learning libraries by reusing the efficient convolution module. DCNNs can be used to serve the dual purpose of 1) improving the classification accuracy as a regularized version of maxout networks, and 2) being parameter efficient by flexibly varying their architectures. In the extensive experiments on CIFAR-10, CIFAR-100, and ImageNet datasets, we have shown that DCNNs significantly improves over other architecture counterparts. In addition, we have shown that introducing the doubly convolutional layer to any layer of a CNN improves its performance. We have also experimented with various configurations of DCNNs, all of which are able to outperform the CNN counterpart with the same or fewer number of parameters. References [1] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097–1105, 2012. 8 [2] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. [3] Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1–9, 2015. [4] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. arXiv preprint arXiv:1512.03385, 2015. [5] 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. [6] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015. [7] Yangqing Jia, Evan Shelhamer, Jeff Donahue, Sergey Karayev, Jonathan Long, Ross Girshick, Sergio Guadarrama, and Trevor Darrell. Caffe: Convolutional architecture for fast feature embedding. In Proceedings of the ACM International Conference on Multimedia, pages 675–678. ACM, 2014. [8] Ian J Goodfellow, David Warde-Farley, Mehdi Mirza, Aaron Courville, and Yoshua Bengio. Maxout networks. arXiv preprint arXiv:1302.4389, 2013. [9] Sander Dieleman, Jeffrey De Fauw, and Koray Kavukcuoglu. Exploiting cyclic symmetry in convolutional neural networks. arXiv preprint arXiv:1602.02660, 2016. [10] Wenling Shang, Kihyuk Sohn, Diogo Almeida, and Honglak Lee. Understanding and improving convolutional neural networks via concatenated rectified linear units. arXiv preprint arXiv:1603.05201, 2016. [11] Fisher Yu and Vladlen Koltun. Multi-scale context aggregation by dilated convolutions. arXiv preprint arXiv:1511.07122, 2015. [12] Hongyang Li, Wanli Ouyang, and Xiaogang Wang. Multi-bias non-linear activation in deep neural networks. arXiv preprint arXiv:1604.00676, 2016. [13] Robert Gens and Pedro M Domingos. Deep symmetry networks. In Advances in neural information processing systems, pages 2537–2545, 2014. [14] Taco S Cohen and Max Welling. Group equivariant convolutional networks. arXiv preprint arXiv:1602.07576, 2016. [15] Koray Kavukcuoglu, Rob Fergus, Yann LeCun, et al. Learning invariant features through topographic filter maps. In Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on, pages 1605–1612. IEEE, 2009. [16] Vikas Sindhwani, Tara Sainath, and Sanjiv Kumar. Structured transforms for small-footprint deep learning. In C. Cortes, N. D. Lawrence, D. D. Lee, M. Sugiyama, and R. Garnett, editors, Advances in Neural Information Processing Systems 28, pages 3088–3096. Curran Associates, Inc., 2015. [17] Yu Cheng, Felix X. Yu, Rogerio Feris, Sanjiv Kumar, and Shih-Fu Chang. An exploration of parameter redundancy in deep networks with circulant projections. In International Conference on Computer Vision (ICCV), 2015. [18] Zichao Yang, Marcin Moczulski, Misha Denil, Nando de Freitas, Alex Smola, Le Song, and Ziyu Wang. Deep fried convnets. In International Conference on Computer Vision (ICCV), 2015. [19] Alexander Novikov, Dmitry Podoprikhin, Anton Osokin, and Dmitry Vetrov. Tensorizing neural networks. In Advances in Neural Information Processing Systems 28 (NIPS). 2015. [20] Min Lin, Qiang Chen, and Shuicheng Yan. Network in network. arXiv preprint arXiv:1312.4400, 2013. [21] Matthew D Zeiler. Adadelta: an adaptive learning rate method. arXiv preprint arXiv:1212.5701, 2012. [22] Chen-Yu Lee, Saining Xie, Patrick Gallagher, Zhengyou Zhang, and Zhuowen Tu. Deeply-supervised nets. arXiv preprint arXiv:1409.5185, 2014. [23] Forest Agostinelli, Matthew Hoffman, Peter J. Sadowski, and Pierre Baldi. Learning activation functions to improve deep neural networks. CoRR, abs/1412.6830, 2014. [24] Djork-Arné Clevert, Thomas Unterthiner, and Sepp Hochreiter. Fast and accurate deep network learning by exponential linear units (elus). arXiv preprint arXiv:1511.07289, 2015. 9 | 2016 | 427 |
6,358 | Brains on Beats Umut Güçlü Radboud University, Donders Institute for Brain, Cognition and Behaviour Nijmegen, the Netherlands u.guclu@donders.ru.nl Jordy Thielen Radboud University, Donders Institute for Brain, Cognition and Behaviour Nijmegen, the Netherlands j.thielen@psych.ru.nl Michael Hanke∗ Otto-von-Guericke University Magdeburg Center for Behavioral Brain Sciences Magdeburg, Germany michael.hanke@ovgu.de Marcel A. J. van Gerven† Radboud University, Donders Institute for Brain, Cognition and Behaviour Nijmegen, the Netherlands m.vangerven@donders.ru.nl Abstract We developed task-optimized deep neural networks (DNNs) that achieved state-ofthe-art performance in different evaluation scenarios for automatic music tagging. These DNNs were subsequently used to probe the neural representations of music. Representational similarity analysis revealed the existence of a representational gradient across the superior temporal gyrus (STG). Anterior STG was shown to be more sensitive to low-level stimulus features encoded in shallow DNN layers whereas posterior STG was shown to be more sensitive to high-level stimulus features encoded in deep DNN layers. 1 Introduction The human sensory system is devoted to the processing of sensory information to drive our perception of the environment [1]. Sensory cortices are thought to encode a hierarchy of ever more invariant representations of the environment [2]. A research question that is at the core of sensory neuroscience is what sensory information is processed as one traverses the sensory pathways from the primary sensory areas to higher sensory areas. The majority of the work on auditory cortical representations has remained limited to understanding the neural representation of hand-designed low-level stimulus features such as spectro-temporal models [3], spectro-location models [4], timbre, rhythm, tonality [5–7] and pitch [8] or high-level representations such as music genre [9] and sound categories [10]. For example, Santoro et al. [3] found that a joint frequency-specific modulation transfer function predicted observed fMRI activity best compared to frequency-nonspecific and independent models. They showed specificity to fine spectral modulations along Heschl’s gyrus (HG) and anterior superior temporal gyrus (STG), whereas coarse spectral modulations were mostly located posterior-laterally to HG, on the planum temporale (PT), and STG. Preference for slow temporal modulations was found along HG and STG, whereas fast temporal modulations were observed on PT, and posterior and medially adjacent to HG. Also, it has been shown that activity in STG, somatosensory cortex, the default mode network, and cerebellum are sensitive to timbre, while amygdala, hippocampus and insula are more sensitive to rhythmic and ∗http://psychoinformatics.de; supported by the German federal state of Saxony-Anhalt and the European Regional Development Fund (ERDF), project: Center for Behavioral Brain Sciences. †http://www.ccnlab.net; supported by VIDI grant 639.072.513 of the Netherlands Organization for Scientific Research (NWO). 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. tonality features [5, 7]. However these efforts have not yet provided a complete algorithmic account of sensory processing in the auditory system. Since their resurgence, deep neural networks (DNNs) coupled with functional magnetic resonance imaging (fMRI) have provided a powerful approach to form and test alternative hypotheses about what sensory information is processed in different brain regions. On one hand, a task-optimized DNN model learns a hierarchy of nonlinear transformations in a supervised manner with the objective of solving a particular task. On the other hand, fMRI measures local changes in blood-oxygenlevel dependent hemodynamic responses to sensory stimulation. Subsequently, any subset of the DNN representations that emerge from this hierarchy of nonlinear transformations can be used to probe neural representations by comparing DNN and fMRI responses to the same sensory stimuli. Considering that the sensory systems are biological neural networks that routinely perform the same tasks as their artificial counterparts, it is not inconceivable that DNN representations are suitable for probing neural representations. Indeed, this approach has been shown to be extremely successful in visual neuroscience. To date, several task-optimized DNN models were used to accurately model visual areas on the dorsal and ventral streams [11–18], revealing representational gradients where deeper neural network layers map to more downstream areas along the visual pathways [19, 20]. Recently, [21] has shown that deep neural networks trained to map speech excerpts to word labels could be used to predict brain responses to natural sounds. Here, deeper neural network layers were shown to map to auditory brain regions that were more distant from primary auditory cortex. In the present work we expand on this line of research where our aim was to model how the human brain responds to music. We achieve this by probing neural representations of music features across the superior temporal gyrus using a deep neural network optimized for music tag prediction. We used the representations that emerged after training a DNN to predict tags of musical excerpts as candidate representations for different areas of STG in representational similarity analysis. We show that different DNN layers correspond to different locations along STG such that anterior STG is shown to be more sensitive to low-level stimulus features encoded in shallow DNN layers whereas posterior STG is shown to be more sensitive to high-level stimulus features encoded in deep DNN layers. 2 Materials and Methods 2.1 MagnaTagATune Dataset We used the MagnaTagATune dataset [22] for DNN estimation. The dataset contains 25.863 music clips. Each clip is a 29 seconds long excerpt from 5223 songs from 445 albums from 230 artists. Each excerpt is supplied with a vector of binary annotations of 188 tags. These annotations are obtained by humans playing the two-player online TagATune game. In this game, the two players are either presented with the same or a different audio clip. Subsequently, they are asked to come up with tags for their specific audio clip. Afterward, players view each other’s tags and are asked to decide whether they were presented the same audio clip. Tags are only assigned when more than two players agreed. The annotations include tags like ’singer’, ’no singer’, ’violin’, ’drums’, ’classical’, ’jazz’, et cetera. We restricted our analysis on this dataset to the top 50 most popular tags to ensure that there is enough training data for each tag. Parts 1-12 were used for training, part 13 was used for validation and parts 14-16 were used for testing. 2.2 Studyforrest Dataset We used the existing studyforrest dataset [23] for representational similarity analysis. The dataset contains fMRI data on the perception of musical genres. Twenty participants (age 21-38 years, mean age 26.6 years), with normal hearing and no known history of neurological disorders, listened to twenty-five 6 second, 44.1 kHz music clips. The stimulus set comprised five clips per each of the five following genres: Ambient, Roots Country, Heavy Metal, 50s Rock ‘n Roll, and Symphonic. Stimuli were selected according to the procedure of [9]. The Ambient and Symphonic genres can be considered as non-vocal and the others as vocal. Participants completed eight runs, each with all twenty-five clips. 2 Ultra-high-field (7 Tesla) fMRI images were collected using a Siemens MAGNETOM scanner, T2*-weighted echo-planar images (gradient-echo, repetition time (TR) = 2000 ms, echo time (TE) = 22 ms, 0.78 ms echo spacing, 1488 Hz/Px bandwidth, generalized auto-calibrating partially parallel acquisition (GRAPPA), acceleration factor 3, 24 Hz/Px bandwidth in phase encoding direction), and a 32 channel brain receiver coil. Thirty-six axial slices were acquired (thickness = 1.4 mm, 1.4 × 1.4 mm in-plane resolution, 224 mm field-of-view (FOV) centered on the approximate location of Heschl’s gyrus, anterior-to-posterior phase encoding direction, 10% inter-slice gap). Along with the functional data, cardiac and respiratory traces, and a structural MRI were collected. In our analyses, we only used the data from the 12 subjects (Subjects 1, 3, 4, 6, 7, 9, 12, 14–18) with no known data anomalies as reported in [23]. The anatomical and functional scans were preprocessed as follows: Functional scans were realigned to the first scan of the first run and next to the mean scan. Anatomical scans were coregistered to the mean functional scan. Realigned functional scans were slice-time corrected to correct for the differences in image acquisition times between the slices. Realigned and slice-time corrected functional scans were normalized to MNI space. Finally, a general linear model was used to remove noise regressors derived from voxels unrelated to the experimental paradigm and estimate BOLD response amplitudes [24]. We restricted our analyses to the superior temporal gyrus (STG). 2.3 Deep Neural Networks We developed three task-optimized DNN models for tag prediction. Two of the models comprised five convolutional layers followed by three fully-connected layers (DNN-T model and DNN-F model). The inputs to the models were 96000-dimensional time (DNN-T model) and frequency (DNN-F model) domain representations of six second-long audio signals, respectively. One of the models comprised two streams of five convolutional layers followed by three fully connected layers (DNN-TF model). The inputs to the streams were given by the time and frequency representations. The outputs of the convolutional streams were merged and fed into first fully-connected layer. Figure 1 illustrates the architecture of the one-stream models. 121/16 1 96k 6k 1.5k 376 1.5k 376 376 376 94 48 48 128 128 192 192 128 128 4096 4096 50 9/4 9/4 9/4 25 9 9 9 BN BN DO DO conv1 conv2 conv3 conv4 conv5 full6 full7 full8 pool1 pool2 pool5 input channel stride k size i/o size Figure 1: Architecture of the one-stream models. First seven layers are followed by parametric softplus units [25], and the last layer is followed by sigmoid units. The architecture is similar to that of AlexNet [26] except for the following modifications: (i) The number of convolutional kernels are halved. (ii) The (convolutional and pooling) kernels and strides are flattened. That is, an n × n kernel is changed to an n2 × 1 kernel and an m × m stride is changed to an m2 × 1 stride. (iii) Local response normalization is replaced with batch normalization [27]. (iv) Rectified linear units are replaced with parametric softplus units with initial α = 0.2 and initial β = 0.5. (v) Softmax units are replaced with sigmoid units. We used Adam [28] with parameters α = 0.0002, β1 = 0.5, β2 = 0.999, ϵ = 1e−8 and a mini batch size of 36 to train the models by minimizing the binary cross-entropy loss function. Initial model parameters were drawn from a uniform distribution as described in [29]. Songs in each training mini-batch were randomly cropped to six seconds (96000 samples). The epoch in which the validation performance was the highest was taken as the final model (53, 12 and 12 for T, F and TF models, respectively). The DNN models were implemented in Keras [30]. Once trained, we first tested the tag prediction performance of the models and identified the model with the highest performance. To predict the tags of a 29 second long song excerpt in the test split of the MagnaTagaTune dataset, we first predicted the tags of 24 six-second-long overlapping segments separated by a second and averaged the predictions. We then used the model with the highest performance for nonlinearly transforming the stimuli to eight layers of hierarchical representations for subsequent analyses. Note that the artificial neurons in the convolutional layers locally filtered their inputs (1D convolution), nonlinearly transformed them 3 and returned temporal representations per stimulus. These representations were further processed by averaging them over time. In contrast, the artificial neurons in the fully-connected layers globally filtered their inputs (dot product), non-linearly transformed them and returned scalar representations per stimulus. These representations were not further processed. These transformations resulted in n matrices of size m × pi where n is the number of layers (8), m is the number of stimuli (25) and pi is the number of artificial neurons in the ith layer (48 or 96, 128 or 256, 192 or 384, 192 or 384, 128 or 256, 4096, 4096 and 50 for i = 1, . . . , 8, respectively). 2.4 Representational Similarity Analysis We used Representational Similarity Analysis (RSA) [31] to investigate how well the representational structures of DNN model layers match with that of the response patterns in STG. In RSA, models and brain regions are characterized by n × n representational dissimilarity matrices (RDMs), whose elements represent the dissimilarity between the neural or model representations of a pair of stimuli. In turn, computing the overlap between the model and neural RDMs provides evidence about how well a particular model explains the response patterns in a particular brain region. Specifically, we performed a region of interest analysis as well as a searchlight analysis by first constructing the RDMs of STG (target RDM) and the model layers (candidate RDM). In the ROI analysis, this resulted in one target RDM per subject and eight candidate RDMs. For each subject, we correlated the upper triangular parts of the target RDM with the candidate RDMs (Spearman correlation). We quantified the similarity of STG representations with the model representations as the mean correlation. For the searchlight analysis, this resulted in 27277 target RDMs (each derived from a spherical neighborhood of 100 voxels) and 8 candidate RDMs. For each subject and target RDM, we correlated the upper triangular parts of the target RDM with the candidate RDMs (Spearman correlation). Then, the layers which resulted in the highest correlation were assigned to the voxels at the center of the corresponding neighborhoods. Finally, the layer assignments were averaged over the subjects and the result was taken as the final layer assignment of the voxels. 2.5 Control Models To evaluate the importance of task optimization for modeling STG representations, we compared the representational similarities of the entire STG region and the task-optimized DNN-TF model layers with the representational similarities of the entire STG region and two sets of control models. The first set of control models transformed the stimuli to the following 48-dimensional model representations3: • Mel-frequency spectrum (mfs) representing a mel-scaled short-term power spectrum inspired by human auditory perception where frequencies organized by equidistant pitch locations. These representations were computed by applying (i) a short-time Fourier transform and (ii) a mel-scaled frequency-domain filterbank. • Mel-frequency cepstral coefficients (mfccs) representing both broad-spectrum information (timbre) and fine-scale spectral structure (pitch). These representations were computed by (i) mapping the mfs to a decibel amplitude scale and (ii) multiplying them by the discrete cosine transform matrix. • Low-quefrency mel-frequency spectrum (lq_mfs) representing timbre. These representations were computed by (i) zeroing the high-quefrency mfccs, (ii) multiplying them by the inverse of discrete cosine transform matrix and (iii) mapping them back from the decibel amplitude scale. • High-quefrency mel-frequency spectrum (hq_mfs) representing pitch. These representations were computed by (i) zeroing the low-quefrency mfccs, (ii) multiplying them by the inverse of discrete cosine transform matrix and (iii) mapping them back from the decibel amplitude scale. The second set of control models were 10 random DNN models with the same architecture as the DNN-TF model, but with parameters drawn from a zero mean and unit variance multivariate Gaussian distribution. 3These are provided as part of the studyforrest dataset [23]. 4 3 Results In the first set of experiments, we analyzed the task-optimized DNN models. The tag prediction performance of the models for the individual tags was defined as the area under the receiver operator characteristics (ROC) curve (AUC). We first compared the mean performance of the models over all tags (Figure 2). The performance of all models was significantly above chance level (p ≪0.001, Student’s t-test, Bonferroni correction). The highest performance was achieved by the DNN-TF model (0.8939), followed by the DNN-F model (0.8905) and the DNN-T model (0.8852). To the best of our knowledge, this is the highest tag prediction performance of an end-to-end model evaluated on the same split of the same dataset [32]. The performance was further improved by averaging the predictions of the DNN-T and DNN-F models (0.8982) as well as those of the DNN-T, DNN-F and DNN-TF models (0.9007). To the best of our knowledge, this is the highest tag prediction performance of any model (ensemble) evaluated on the same split of the same dataset [33, 32, 34]. For the remainder of the analyses, we considered only the DNN-TF model since it achieved the highest single-model performance. Figure 2: Tag prediction performance of the task-optimized DNN models. Bars show AUCs over all tags for the corresponding task-optimized DNN models. Error bars show ± SE. All pairwise differences are significant except for the pairs 1 and 2, and 2 and 3 (p < 0.05, paired-sample t-test, Bonferroni correction). We then compared the performance of the DNN-TF model for the individual tags (Figure 3). Visual inspection did not reveal a prominent pattern in the performance distribution over tags. The performance was not significantly correlated with tag popularity (p > 0.05, Student’s t-test). The only exception was that the performance for the positive tags were significantly higher than that for the negative tags (p ≪0.001, Student’s t-test). Figure 3: Tag prediction performance of the task-optimized DNN-TF model. Bars show AUCs for the corresponding tags. Red band shows the mean ± SE for the task-optimized DNN-TF model over all tags. In the second set of experiments, we analyzed how closely the representational geometry of STG is related to the representational geometries of the task-optimized DNN-TF model layers. First, we constructed the candidate RDMs of the layers (Figure 4). Visual inspection revealed similarity structure patterns that became increasingly prominent with increasing layer depth. The most prominent pattern was the non-vocal and vocal subdivision. 5 Figure 4: RDMs of the task-optimized DNN-TF model layers. Matrix elements show the dissimilarity (1 - Spearman’s r) between the model layer representations of the corresponding trials. Matrix rows and columns are sorted according to the genres of the corresponding trials. Second, we performed a region of interest analysis by comparing the reference RDM of the entire STG region with the candidate RDMs (Figure 5). While none of the correlations between the reference RDM and the candidate RDMs reached the noise ceiling (expected correlation between the reference RDM and the RDM of the true model given the noise in the analyzed data [31]), they were all significantly above chance level (p < 0.05, signed-rank test with subject RFX, FDR correction). The highest correlation was found for Layer 1 (0.6811), whereas the lowest correlation was found for Layer 8 (0.4429). Figure 5: Representational similarities of the entire STG region and the task-optimized DNNTF model layers. Bars show the mean similarity (Spearman’s r) of the target RDM and the corresponding candidate RDMs over all subjects. Error bars show ± SE. Red band shows the expected representational similarity of the STG and the true model given the noise in the analyzed data (noise ceiling). All pairwise differences are significant except for the pairs 1 and 5, 2 and 6, and 3 and 4 (p < 0.05, signed-rank test with subject RFX, FDR correction). Third, we performed a searchlight analysis [35] by comparing the reference RDMs of multiple STG voxel neighborhoods with the candidate RDMs (Figure 6). Each neighborhood center was assigned a layer such that the corresponding target and candidate RDM were maximally correlated. This analysis revealed a systematic change in the mean layer assignments over subjects along STG. They increased from anterior STG to posterior STG such that most voxels in the region of the transverse temporal gyrus were assigned to the shallower layers and most voxels in the region of the angular gyrus were assigned to the deeper layers. The corresponding mean correlations between the target and the candidate RDMs decreased from anterior to posterior STG. In order to quantify the gradient in layer assignment, we correlated the mean layer assignment of the STG voxels in each coronal slice with the slice position, which was taken to be the slice number. As a result, it was found that layer and position are significantly correlated for the voxels along the anterior - posterior STG direction (r = 0.7255, Pearson’s r, p ≪0.001, Student’s t-test). Furthermore, the mean correlations between the target and the candidate RDMs for the majority (85.53%) of the STG voxels were significant (p < 0.05, signed-rank test with subject RFX, FDR correction for the number of voxels followed by Bonferroni correction for the number of layers). However, the correlations of many voxels at the posterior end of STG were not highly significant in contrast to their central counterparts and ceased to be significant as the (multiple comparisons corrected) critical value was decreased from 0.05 to 0.01, which reduced the number of voxels surviving the critical value from 85.53% to 75.32%. Nevertheless, the gradient in layer assignment was maintained even when the voxels that did not survive the new critical value were ignored (r = 0.7332, Pearson’s r, p ≪0.001, Student’s t-test). 6 Figure 6: Representational similarities of the spherical STG voxel clusters and the taskoptimized DNN-TF model layers. Only the STG voxels that survived the (multiple comparisons corrected) critial value of 0.05 are shown. Those that did not survive the critical value of 0.01 are indicated with transparent white masks and black outlines. (A) Mean representational similarities over subjects. (B) Mean layer assignments over subjects. These results show that increasingly posterior STG voxels can be modeled with increasingly deeper DNN layers optimized for music tag prediction. This observation is in line with the visual neuroscience literature where it was shown that increasingly deeper layers of DNNs optimized for visual object and action recognition can be used to model increasingly downstream ventral and dorsal stream voxels [19, 20]. It also agrees with previous work showing a gradient in auditory cortex with DNNs optimized for speech-to-word mapping [21]. It would be of particular interest to compare the respective gradients and use the music and speech DNNs as each other’s control model such as to disentangle speech- and music-specific representations in auditory cortex. In the last set of experiments, we analyzed the control models. We first constructed the RDMs of the control models (Figure 7). Visual inspection revealed considerable differences between the RDMs of the task-optimized DNN-TF model and those of the control models. Figure 7: RDMs of the random DNN model layers (top row) and the baseline models (bottom row). Matrix elements show the dissimilarity (1 - Spearman’s r) between the model layer representations of the corresponding trials. Matrix rows and columns are sorted according to the genres of the corresponding trials. We then compared the similarities of the task-optimized candidate RDMs and the target RDM versus the similarities of the control RDMs and the target RDM (Figure 8). The layers of the taskoptimized DNN model significantly outperformed the corresponding layers of the random DNN model (∆r = 0.21, p < 0.05, signed-rank test with subject RFX, FDR correction) and the four baseline models (∆r = 0.42 for mfs, ∆r = 0.21 for mfcc, ∆r = 0.44 for lq_mfs and ∆r = 0.34 for hq_mfs, signed-rank test with subject RFX, FDR correction). Furthermore, we performed the searchlight analysis with the random DNN model to determine whether the gradient in layer assignment is a consequence of model architecture or model representation. We found that the random DNN model failed to maintain the gradient in layer assignment (r = −0.2175, Pearson’s r, p = 0.0771, Student’s t-test), suggesting that the gradient is in the representation that emerges from task optimization. These results show the importance of task optimization for modeling STG representations. This observation also is line with visual neuroscience literature where similar analyses showed the importance of task optimization for modeling ventral stream representations [19, 17]. 7 A B Figure 8: Control analyses. (A) Representational similarities of the entire STG region and the task-optimized DNN-TF model versus the representational similarities of the entire STG region and the control models. Different colors show different control models: Random DNN model, mfs model, mfcc model, lq_mfs model and hq_mfs model. Bars show mean similarity differences over subjects. Error bars show ± SE. (B) Mean layer assignments over subjects for the random DNN model. Voxels, masks and outlines are the same as those in Figure 6. 4 Conclusion We showed that task-optimized DNNs that use time and/or frequency domain representations of music achieved state-of-the-art performance in various evaluation scenarios for automatic music tagging. Comparison of DNN and STG representations revealed a representational gradient in STG with anterior STG being more sensitive to low-level stimulus features (shallow DNN layers) and posterior STG being more sensitive to high-level stimulus features (deep DNN layers). These results, in conjunction with previous results on the visual and auditory cortical representations, suggest the existence of multiple representational gradients that process increasingly complex conceptual information as we traverse sensory pathways of the human brain. References [1] B. L. Schwartz and J. H. Krantz, Sensation and Perception. SAGE Publications, 2015. [2] J. M. Fuster, Cortex and Mind: Unifying Cognition. Oxford University Press, 2003. [3] R. Santoro, M. Moerel, F. D. Martino, R. Goebel, K. Ugurbil, E. Yacoub, and E. Formisano, “Encoding of natural sounds at multiple spectral and temporal resolutions in the human auditory cortex,” PLOS Computational Biology, vol. 10, p. e1003412, jan 2014. [4] M. Moerel, F. D. Martino, K. U˘gurbil, E. Yacoub, and E. Formisano, “Processing of frequency and location in human subcortical auditory structures,” Scientific Reports, vol. 5, p. 17048, nov 2015. [5] V. Alluri, P. Toiviainen, I. P. Jääskeläinen, E. Glerean, M. Sams, and E. Brattico, “Large-scale brain networks emerge from dynamic processing of musical timbre, key and rhythm,” NeuroImage, vol. 59, pp. 3677–3689, feb 2012. [6] V. Alluri, P. Toiviainen, T. E. Lund, M. Wallentin, P. Vuust, A. K. Nandi, T. Ristaniemi, and E. Brattico, “From vivaldi to beatles and back: Predicting lateralized brain responses to music,” NeuroImage, vol. 83, pp. 627–636, dec 2013. [7] P. Toiviainen, V. Alluri, E. Brattico, M. Wallentin, and P. Vuust, “Capturing the musical brain with lasso: Dynamic decoding of musical features from fMRI data,” NeuroImage, vol. 88, pp. 170–180, mar 2014. [8] R. D. Patterson, S. Uppenkamp, I. S. Johnsrude, and T. D. Griffiths, “The processing of temporal pitch and melody information in auditory cortex,” Neuron, vol. 36, pp. 767–776, nov 2002. [9] M. Casey, J. Thompson, O. Kang, R. Raizada, and T. Wheatley, “Population codes representing musical timbre for high-level fMRI categorization of music genres,” in MLINI, 2011. [10] N. Staeren, H. Renvall, F. D. Martino, R. Goebel, and E. Formisano, “Sound categories are represented as distributed patterns in the human auditory cortex,” Current Biology, vol. 19, pp. 498–502, mar 2009. 8 [11] D. L. K. Yamins, H. Hong, C. F. Cadieu, E. A. Solomon, D. Seibert, and J. J. DiCarlo, “Performanceoptimized hierarchical models predict neural responses in higher visual cortex,” Proceedings of the National Academy of Sciences, vol. 111, pp. 8619–8624, may 2014. [12] P. Agrawal, D. Stansbury, J. Malik, and J. L. Gallant, “Pixels to voxels: Modeling visual representation in the human brain,” arXiv:1407.5104, 2014. [13] S.-M. Khaligh-Razavi and N. Kriegeskorte, “Deep supervised, but not unsupervised, models may explain IT cortical representation,” PLOS Computational Biology, vol. 10, p. e1003915, nov 2014. [14] C. F. Cadieu, H. Hong, D. L. K. Yamins, N. Pinto, D. Ardila, E. A. Solomon, N. J. Majaj, and J. J. DiCarlo, “Deep neural networks rival the representation of primate IT cortex for core visual object recognition,” PLOS Computational Biology, vol. 10, p. e1003963, dec 2014. [15] T. Horikawa and Y. Kamitani, “Generic decoding of seen and imagined objects using hierarchical visual features,” arXiv:1510.06479, 2015. [16] R. M. Cichy, A. Khosla, D. Pantazis, A. Torralba, and A. Oliva, “Deep neural networks predict hierarchical spatio-temporal cortical dynamics of human visual object recognition,” arXiv:1601.02970, 2016. [17] D. Seibert, D. L. Yamins, D. Ardila, H. Hong, J. J. DiCarlo, and J. L. Gardner, “A performance-optimized model of neural responses across the ventral visual stream,” bioRxiv, 2016. [18] R. M. Cichy, A. Khosla, D. Pantazis, and A. Oliva, “Dynamics of scene representations in the human brain revealed by magnetoencephalography and deep neural networks,” NeuroImage, apr 2016. [19] U. Güçlü and M. A. J. van Gerven, “Deep neural networks reveal a gradient in the complexity of neural representations across the ventral stream,” Journal of Neuroscience, vol. 35, pp. 10005–10014, jul 2015. [20] U. Güçlü and M. A. J. van Gerven, “Increasingly complex representations of natural movies across the dorsal stream are shared between subjects,” NeuroImage, dec 2015. [21] A. Kell, D. Yamins, S. Norman-Haignere, and J. McDermott, “Speech-trained neural networks behave like human listeners and reveal a hierarchy in auditory cortex,” in COSYNE, 2016. [22] E. Law, K. West, M. Mandel, M. Bay, and J. S. Downie, “Evaluation of algorithms using games: The case of music tagging,” in ISMIR, 2009. [23] M. Hanke, R. Dinga, C. Häusler, J. S. Guntupalli, M. Casey, F. R. Kaule, and J. Stadler, “Highresolution 7-tesla fMRI data on the perception of musical genres – an extension to the studyforrest dataset,” F1000Research, jun 2015. [24] K. N. Kay, A. Rokem, J. Winawer, R. F. Dougherty, and B. A. Wandell, “GLMdenoise: a fast, automated technique for denoising task-based fMRI data,” Frontiers in Neuroscience, vol. 7, 2013. [25] J. M. McFarland, Y. Cui, and D. A. Butts, “Inferring nonlinear neuronal computation based on physiologically plausible inputs,” PLOS Computational Biology, vol. 9, p. e1003143, jul 2013. [26] A. Krizhevsky, I. Sutskever, and G. E. Hinton, “ImageNet classification with deep convolutional neural networks,” in NIPS, 2012. [27] S. Ioffe and C. Szegedy, “Batch normalization: Accelerating deep network training by reducing internal covariate shift,” arXiv:1502.03167, 2015. [28] D. Kingma and J. Ba, “Adam: A method for stochastic optimization,” arXiv:1412.6980, 2014. [29] X. Glorot and Y. Bengio, “Understanding the difficulty of training deep feedforward neural networks,” in AISTATS, 2010. [30] F. Chollet, “Keras.” https://github.com/fchollet/keras, 2015. [31] N. Kriegeskorte, “Representational similarity analysis – connecting the branches of systems neuroscience,” Frontiers in Systems Neuroscience, 2008. [32] S. Dieleman and B. Schrauwen, “End-to-end learning for music audio,” in ICASSP, 2014. [33] S. Dieleman and B. Schrauwen, “Multiscale approaches to music audio feature learning,” in ISMIR, 2013. [34] A. van den Oord, S. Dieleman, and B. Schrauwen, “Transfer learning by supervised pre-training for audio-based music classification,” in ISMIR, 2014. [35] N. Kriegeskorte, R. Goebel, and P. Bandettini, “Information-based functional brain mapping,” Proceedings of the National Academy of Sciences, vol. 103, pp. 3863–3868, feb 2006. 9 | 2016 | 428 |
6,359 | Local Minimax Complexity of Stochastic Convex Optimization Yuancheng Zhu Wharton Statistics Department University of Pennsylvania Sabyasachi Chatterjee Department of Statistics University of Chicago John Duchi Department of Statistics Department of Electrical Engineering Stanford University John Lafferty Department of Statistics Department of Computer Science University of Chicago Abstract We extend the traditional worst-case, minimax analysis of stochastic convex optimization by introducing a localized form of minimax complexity for individual functions. Our main result gives function-specific lower and upper bounds on the number of stochastic subgradient evaluations needed to optimize either the function or its “hardest local alternative” to a given numerical precision. The bounds are expressed in terms of a localized and computational analogue of the modulus of continuity that is central to statistical minimax analysis. We show how the computational modulus of continuity can be explicitly calculated in concrete cases, and relates to the curvature of the function at the optimum. We also prove a superefficiency result that demonstrates it is a meaningful benchmark, acting as a computational analogue of the Fisher information in statistical estimation. The nature and practical implications of the results are demonstrated in simulations. 1 Introduction The traditional analysis of algorithms is based on a worst-case, minimax formulation. One studies the running time, measured in terms of the smallest number of arithmetic operations required by any algorithm to solve any instance in the family of problems under consideration. Classical worst-case complexity theory focuses on discrete problems. In the setting of convex optimization, where the problem instances require numerical rather than combinatorial optimization, Nemirovsky and Yudin [12] developed an approach to minimax analysis based on a first order oracle model of computation. In this model, an algorithm to minimize a convex function can make queries to a first-order “oracle,” and the complexity is defined as the smallest error achievable using some specified minimum number of queries needed. Specifically, the oracle is queried with an input point x 2 C from a convex domain C, and returns an unbiased estimate of a subgradient vector to the function f at x. After T calls to the oracle, an algorithm A returns a value bxA 2 C, which is a random variable due to the stochastic nature of the oracle, and possibly also due to randomness in the algorithm. The Nemirovski-Yudin analysis reveals that, in the worst case, the number of calls to the oracle required to drive the expected error E(f(bxA) −infx2C f(x)) below ✏scales as T = O(1/✏) for the class of strongly convex functions, and as T = O(1/✏2) for the class of Lipschitz convex functions. In practice, one naturally finds that some functions are easier to optimize than others. Intuitively, if the function is “steep” near the optimum, then the subgradient may carry a great deal of information, and a stochastic gradient descent algorithm may converge relatively quickly. A minimax approach to analyzing the running time cannot take this into account for a particular function, as it treats the 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. worst-case behavior of the algorithm over all functions. It would be of considerable interest to be able to assess the complexity of solving an individual convex optimization problem. Doing so requires a break from traditional worst-case thinking. In this paper we revisit the traditional view of the complexity of convex optimization from the point of view of a type of localized minimax complexity. In local minimax, our objective is to quantify the intrinsic difficulty of optimizing a specific convex function f. With the target f fixed, we take an alternative function g within the same function class F, and evaluate how the maximum expected error decays with the number of calls to the oracle, for an optimal algorithm designed to optimize either f or g. The local minimax complexity RT (f; F) is defined as the least favorable alternative g: RT (f; F) = sup g2F inf A2AT max h2{f,g} error(A, h) (1) where error(A, h) is some measure of error for the algorithm applied to function h. Note that here the the algorithm A is allowed to depend on the function f and the selected worst-case g. In contrast, the traditional global worst-case performance of the best algorithm, as defined by the minimax complexity RT (F) of Nemirovsky and Yudin, is RT (F) = inf A2AT sup g2F error(A, g). (2) The local minimax complexity can be thought of as the difficulty of optimizing the hardest alternative to the target function. Intuitively, a difficult alternative is a function g for which querying the oracle with g gives results similar to querying with f, but for which the value of x 2 C that minimizes g is far from the value that minimizes f. Our analysis ties this function-specific notion of complexity to a localized and computational analogue of the modulus of continuity that is central to statistical minimax analysis [5, 6]. We show that the local minimax complexity gives a meaningful benchmark for quantifying the difficulty of optimizing a specific function by proving a superefficiency result; in particular, outperforming this benchmark at some function must lead to a larger error at some other function. Furthermore, we propose an adaptive algorithm in the one-dimensional case that is based on binary search, and show that this algorithm automatically achieves the local minimax complexity, up to a logarithmic factor. Our study of the algorithmic complexity of convex optimization is motivated by the work of Cai and Low [2], who propose an analogous definition in the setting of statistical estimation of a one-dimensional convex function. The present work can thus be seen as exposing a close connection between statistical estimation and numerical optimization of convex functions. In particular, our results imply that the local minimax complexity can be viewed as a computational analogue of Fisher information in classical statistical estimation. In the following section we establish our notation, and give a technical overview of our main results, which characterize the local minimax complexity in terms of the computational modulus of continuity. In Section 2.2, we demonstrate the phenomenon of superefficiency of the local minimax complexity. In Section 3 we present the algorithm that adapts to the benchmark, together with an analysis of its theoretical properties. We also present simulations of the algorithm and comparisons to traditional stochastic gradient descent. Finally, we conclude with a brief review of related work and a discussion of future research directions suggested by our results. 2 Local minimax complexity In this section, we first establish notation and define a modulus of continuity for a convex function f. We then state our main result, which links the local minimax complexity to this modulus of continuity. Let F be the collection of Lipschitz convex functions defined on a compact convex set C ⇢Rd. Given a function f 2 F, our goal is to find a minimum point, x⇤ f 2 arg minx2C f(x). However, our knowledge about f can only be gained through a first-order oracle. The oracle, upon being queried with x 2 C, returns f 0(x) + ⇠, where f 0(x) is a subgradient of f at x and ⇠⇠N(0, σ2Id). When the oracle is queried with a non-differentiable point x of f, instead of allowing the oracle to return an arbitrary subgradient at x, we assume that it has a deterministic mechanism for producing f 0(x). That is, when we query the oracle with x twice, it should return two random vectors with the same mean f 0(x). Such an oracle can be realized, for example, by taking f 0(x) = arg minz2@f(x) kzk. Here and throughout the paper, k · k denotes the Euclidean norm. 2 f(x) g(x) flat set f 0(x) g0(x) ✏ !(✏; f) Figure 1: Illustration of the flat set and the modulus of continuity. Both the function f (left) and its derivative f 0 (right) are shown (black curves), along with one of the many possible alternatives, g and its derivative g0 (solid gray curves), that achieve the sup in the definition of !f(✏). The flat set contains all the points for which |f 0(x)| < ✏, and !f(✏) is the larger half width of the flat set. Consider optimization algorithms that make a total of T queries to this first-order oracle, and let AT be the collection of all such algorithms. For A 2 AT , denote by bxA the output of the algorithm. We write err(x, f) for a measure of error for using x as the estimate of the minimum point of f 2 F. In this notation, the usual minimax complexity is defined as RT (F) = inf A2AT sup f2F Ef err(bxA, f). (3) Note that the algorithm A queries the oracle at up to T points xt 2 C selected sequentially, and the output bxA is thus a function of the entire sequence of random vectors vt ⇠N(f 0(xt), σ2Id) returned by the oracle. The expectation Ef denotes the average with respect to this randomness (and any additional randomness injected by the algorithm itself). The minimax risk RT (F) characterizes the hardness of the entire class F. To quantify the difficulty of optimizing an individual function f, we consider the following local minimax complexity, comparing f to its hardest local alternative RT (f; F) = sup g2F inf A2AT max h2{f,g} Eh err(bxA, h). (4) We now proceed to define a computational modulus of continuity that characterizes the local minimax complexity. Let X ⇤ f = arg minx2C f(x) be the set of minimum points of function f. We consider err(x, f) = infy2X ⇤ f kx −yk as our measure of error. Define d(f, g) = infx2X ⇤ f ,y2X ⇤ g kx −yk for f, g 2 F. It is easy to see that err(x, f) and d(f, g) satisfy the exclusion inequality err(x, f) < 1 2d(f, g) implies err(x, g) ≥1 2d(f, g). (5) Next we define (f, g) = sup x2C kf 0(x) −g0(x)k (6) where f 0(x) is the unique subgradient of f that is returned as the mean by the oracle when queried with x. For example, if we take f 0(x) = arg minz2@f(x) kzk, we have (f, g) = sup x2C kProj@f(x)(0) −Proj@g(x)(0)k (7) where ProjB(z) is the projection of z to the set B. Thus, d(f, g) measures the dissimilarity between two functions in terms of the distance between their minimizers, whereas (f, g) measures the dissimilarity by the largest separation between their subgradients at any given point. Given d and , we define the modulus of continuity of d with respect to at the function f by !f(✏) = sup {d(f, g) : g 2 F, (f, g) ✏} . (8) We now show how to calculate the modulus for some specific functions. Example 1. Suppose that f is a convex function on a one-dimensional interval C ⇢R. If we take f 0(x) = arg minz2@f(x) kzk, then !f(✏) = sup ( inf x2X ⇤ f |x −y| : y 2 C, |f 0(y)| < ✏ ) . (9) 3 The proof of this claim is given in the appendix. This result essentially says that the modulus of continuity measures the size (in fact, the larger half-width) of the the “flat set” where the magnitude of the subderivative is smaller than ✏. See Figure 1 for an illustration Thus, for the class of symmetric functions f(x) = 1 k|x|k over C = [−1, 1], with k > 1, !f(✏) = ✏ 1 k−1 . (10) For the asymmetric case f(x) = 1 kl |x|klI(−1 x 0) + 1 kr |x|krI(0 < x 1) with kl, kr > 1, !f(✏) = ✏ 1 kl_kr−1 . (11) That is, the size of the flat set depends on the flatter side of the function. 2.1 Local minimax is characterized by the modulus We now state our main result linking the local minimax complexity to the modulus of continuity. We say that the modulus of the continuity has polynomial growth if there exists ↵> 0 and ✏0, such that for any c ≥1 and ✏✏0/c !f(c✏) c↵!f(✏). (12) Our main result below shows that the modulus of continuity characterizes the local minimax complexity of optimization of a particular convex function, in a manner similar to how the modulus of continuity quantifies the (local) minimax risk in a statistical estimation setting [2, 5, 6], relating the objective to a geometric property of the function. Theorem 1. Suppose that f 2 F and that !f(✏) has polynomial growth. Then there exist constants C1 and C2 independent of T and T0 > 0 such that for all T > T0 C1 !f ✓σ p T ◆ RT (f; F) C2 !f ✓σ p T ◆ . (13) Remark 1. We use the error metric err(x, f) = infy2X ⇤ f kx −yk here. For a given a pair (err, d) that satisfies the exclusion inequality (5), our proof technique applies to yield the corresponding lower bound. For example, we could use err(x, f) = infy2X ⇤ f |vT (x −y)| for some vector v. This error metric would be suitable when we wish to estimate vT x⇤ f, for example, the first coordinate of x⇤ f. Another natural choice of error metric is err(x, f) = f(x) −infx2C f(x), with a corresponding distance d(f, g) = infx2C |f(x) −infx f(x) + g(x) −infx g(x)|. For this case, while the proof of the lower bound stays exactly the same, further work is required for the upper bound, which is beyond the scope of this paper. Remark 2. The results can be extended to oracles with more general noise models. In particular, the lower bounds will still hold with more general noise distributions, as long as Gaussian noise is a subclass. Indeed, in proving lower bounds assuming Gaussianity only makes solving the optimization problem easier. Our algorithm and upper bound analysis will go through for all sub-Gaussian noise oracles. For the ease of presentation, we will focus on Gaussian noise model for the current paper. Remark 3. Although the theorem gives an upper bound for the local minimax complexity, this does not guarantee the existence of an algorithm that achieves the local complexity for any function. Therefore, it is important to design an algorithm that adapts to this benchmark for each individual function. We solve this problem in the one-dimensional case in Section 3. The proof of this theorem is given in the appendix. We now illustrate the result with examples that verify the intuition that different functions should have different degrees of difficulty for stochastic convex optimization. Example 2. For the function f(x) = 1 k|x|k with x 2 [−1, 1] for k > 1, we have RT (f; F) = O & T − 1 2(k−1) ' . This agrees with the minimax risk complexity for the class of Lipschitz convex functions that satisfy f(x) −f(x⇤ f) ≥λ 2 kx −x⇤ fkk [14]. In particular, when k = 2, we recover the strongly convex case, where the (global) minimax complexity is O & 1/ p T ' with respect to the error err(x, f) = infy2X ⇤ f kx −yk. We see a faster rate of convergence for k < 2. As k ! 1, we also see that the error fails to decrease as T gets large. This corresponds to the worst case for any Lipschitz convex function. In the asymmetric setting with f(x) = 1 kl |x|klI(−1 x 0) + 1 kr |x|krI(0 < x 1) with kl, kr > 1, we have RT (f; F) = O(T − 1 2(kl_kr−1) ). 4 The following example illustrates that the local minimax complexity and modulus of continuity are consistent with known behavior of stochastic gradient descent for strongly convex functions. Example 3. In this example we consider the error err(x, f) = infy2X ⇤ f |vT (x −y)| for some vector v, and let f be an arbitrary convex function satisfying r2f(x⇤ f) ≻0 with Hessian continuous around x⇤ f. Thus the optimizer x⇤ f is unique. If we define gw(x) = f(x) −wT r2f(x⇤ f)x, then gw(x) is a convex function with unique minimizer and (f, gw) = sup x ())rf(x) −(rf(x) −r2f(x⇤ f)w) )) = ))r2f(x⇤ f)w )) . (14) Thus, defining δ(w) = x⇤ f −x⇤ gw, !f ✓σ p T ◆ ≥sup w {|vT δ(w)| : ))r2f(x⇤ f)w )) σ/ p T} ≥sup u ++++vT δ ✓σ p T r2f(x⇤ f)−1u ◆++++ . (15) By the convexity of gw, we know that x⇤ gw satisfies rf(x⇤ gw) −r2f(x⇤ f)−1w = 0, and therefore by the implicit function theorem, x⇤ gw = x⇤ f + w + o(kwk) as w ! 0. Thus, !f ✓σ p T ◆ ≥ σ p T ))r2f(x⇤ f)−1v )) + o ✓σ p T ◆ as T ! 1. (16) In particular, we have the local minimax lower bound lim inf T !1 p TRT (f; F) ≥C1σ ))r2f(x⇤ f)−1v )) (17) where C1 is the same constant appearing in Theorem 1. This shows that the local minimax complexity captures the function-specific dependence on the constant in the strongly convex case. Stochastic gradient descent with averaging is known to adapt to this strong convexity constant [16, 13, 10]. Note that lower bounds of similar forms on the minimax complexity have been obtained in [11]. 2.2 Superefficiency Having characterized the local minimax complexity in terms of a computational modulus of continuity, we would now like to show that there are consequences to outperforming it at some function. This will strengthen the case that the local minimax complexity serves as a meaningful benchmark to quantify the difficulty of optimizing any particular convex function. Suppose that f is any one-dimensional function such that X ⇤ f = [xl, xr], which has as asymptotic expansion around {xl, xr} of the form f(xl −δ) = f(xl) + λlδkl + o(δkl) and f(xr + δ) = f(xr) + λrδkr + o(δkr) (18) for δ > 0, some powers kl, kr > 1, and constants λl, λr > 0. The following result shows that if any algorithm significantly outperforms the local modulus of continuity on such a function, then it underperforms the modulus on a nearby function. Proposition 1. Let f be any convex function satisfying the asymptotic expansion (21) around its optimum. Suppose that A 2 AT is any algorithm that satisfies Ef err(bxA, f) q Ef err(bxA, f)2 δT !f ✓σ p T ◆ , (19) where δT < C1. Define g−1(x) = f(x) −✏T x and g1(x) = f(x) + ✏T x, where ✏T is given by ✏T = q σ2 log & C1 δT ' /T. Then for some g 2 {g−1, g1}, there exists T0 such that T ≥T0 implies Eg err(bxA, g) ≥C !g 0 @ s σ2 log & C1/δT ' T 1 A (20) for some constant C that only depends on k = kl _ kr. 5 A proof of this result is given in the appendix, where it is derived as a consequence of a more general statement. We remark that while condition (19) involves the squared error p Ef err(bxA, f)2, we expect that the result holds with only the weaker inequality on the absolute error Ef err(bxA, f). It follows from this proposition that if an algorithm A significantly outperforms the local minimax complexity in the sense that (19) holds for some sequence δT ! 0 with lim infT eT δT = 1, then there exists a sequence of convex functions gT with (f, gT ) ! 0, such that lim inf T !1 EgT err(bxA, gT ) !gT ⇣q σ2 log & C1 δT ' /T ⌘> 0. (21) This is analogous to the phenomenon of superefficiency in classical parametric estimation problems, where outperforming the asymptotically optimal rate given by the Fisher information implies worse performance at some other point in the parameter space. In this sense, !f can be viewed as a computational analogue of Fisher information in the setting of convex optimization. We note that superefficiency has also been studied in nonparametric settings [1], and a similar result was shown by Cai and Low [2] for local minimax estimation of convex functions. 3 An adaptive optimization algorithm In this section, we show that a simple stochastic binary search algorithm achieves the local minimax complexity in the one-dimensional case. The general idea of the algorithm is as follows. Suppose that we are given a budget of T queries to the oracle. We divide this budget into T0 = bT/Ec queries over each of E = br log Tc many rounds, where r > 0 is a constant to be specified later. In each round, we query the oracle T0 times for the derivative at the mid-point of the current interval. Estimating the derivative by averaging over the queries, we proceed to the left half of the interval if the estimated sign is positive, and to the right half of the interval if the estimated sign is negative. The details are given in Algorithm 1. Algorithm 1 Sign testing binary search Input: T, r. Initialize: (a0, b0), E = br log Tc, T0 = bT/Ec. for e = 1, . . . , E do Query xe = (ae + be)/2 for T0 times to get Z(e) t for t = 1, . . . , T0. Calculate the average ¯Z(e) T0 = 1 T0 PT0 t=1 Z(e) t . If ¯Z(e) T0 > 0, set (ae+1, be+1) = (ae, xe). If ¯Z(e) T0 0, set (ae+1, be+1) = (xe, be). end for Output: xE. We will show that this algorithm adapts to the local minimax complexity up to a logarithmic factor. First, the following result shows that the algorithm gets us close to the “flat set” of the function. Proposition 2. For δ 2 (0, 1), let Cδ = σ p 2 log(E/δ). Define Iδ = ⇢ y 2 dom(f) : |f 0(y)| < Cδ pT0 7 . (22) Suppose that (a0, b0) \ Iδ 6= ;. Then dist(xE, Iδ) 2−E(b0 −a0) (23) with probability at least 1 −δ. This proposition tells us that after E rounds of bisection, we are at most a distance 2−E(b0 −a0) from the flat set Iδ. In terms of the distance to the minimum point, we have inf x2X ⇤ f |xE −x| 2−E(b0 −a0) + sup n inf x2X ⇤ f |x −y| : y 2 Iδ o . (24) If the modulus of continuity satisfies the polynomial growth condition, we then obtain the following. 6 t risk t risk k = 1.5 100 1000 10000 5e-06 5e-05 5e-04 5e-03 t risk t risk k = 2 100 1000 10000 0.001 0.005 0.020 0.100 t risk t risk k = 3 100 1000 10000 0.01 0.05 0.20 0.50 t risk 100 1000 10000 0.002 0.010 0.050 t risk kl = 1.5, kr = 2 t risk 100 1000 10000 0.02 0.05 0.10 0.20 t risk kl = 1.5, kr = 3 t risk 100 1000 10000 0.02 0.05 0.10 0.20 t risk kl = 2, kr = 3 binary search SGD, ⌘(t) = 1/t SGD, ⌘(t) = 1/ p t theoretic Figure 2: Simulation results: Averaged risk versus number of queries T. The black curves correspond to the risk of the stochastic binary search algorithm. The red and blue curves are for the stochastic gradient descent methods, red for stepsize 1/t and blue for 1/ p t. The dashed gray lines indicate the optimal convergence rate. Note that the plots are on a log-log scale. The plots on the top panels are for the symmetric cases f(x) = 1 k|x −x⇤|k; the lower plots are for the asymmetric cases. Corollary 1. Let ↵0 > 0. Suppose !f satisfies the polynomial growth condition (12) with constant ↵↵0. Let r = 1 2↵0. Then with probability at least 1 −δ and for large enough T, inf x2X ⇤ f |xE −x| eC!f ✓σ p T ◆ (25) where the term eC hides a dependence on log T and log(1/δ). The proofs of these results are given in the appendix. 3.1 Simulations showing adaptation to the benchmark We now demonstrate the performance of the stochastic binary search algorithm, making a comparision to stochastic gradient descent. For the stochastic gradient descent algorithm, we perform T steps of update xt+1 = xt −⌘(t) · bg(xt) (26) where ⌘(t) is a stepsize function, chosen as either ⌘(t) = 1 t or ⌘(t) = 1 p t. We first consider the following setup with symmetric functions f: 1. The function to optimize is fk(x) = 1 k|x −x⇤|k for k = 3 2, 2 or 3. 2. The minimum point x⇤⇠Unif(−1, 1) is selected uniformaly at random over the interval. 3. The oracle returns the derivative at the query point with additive N(0, σ2) noise, σ = 0.1. 4. The optimization algorithms know a priori that the minimum point is inside the interval (−2, 2). Therefore, the binary search starts with interval (−2, 2) and the stochastic gradient descent starts at x0 ⇠Unif(−2, 2) and project the query points to the interval (−2, 2). 7 5. We carry out the simulation for values of T on a logarithmic grid between 100 and 10,000. For each setup, we average the error |bx −x⇤| over 1,000 runs. The simulation results are shown in the top 3 panels of Figure 2. Several properties predicted by our theory are apparent from the simulations. First, the risk curves for the stochastic binary search algorithm parallel the gray curves. This indicates that the optimal rate of convergence is achieved. Thus, the stochastic binary search adapts to the curvature of different functions and yields the optimal local minimax complexity, as given by our benchmark. Second, the stochastic gradient descent algorithms with stepsize 1/t achieve the optimal rate when k = 2, but not when k = 3; with stepsize 1/ p t SGD gets close to the optimal rate when k = 3, but not when k = 2. Neither leads to the faster rate when k = 3 2. This is as expected, since the stepsize needs to be adapted to the curvature at the optimum in order to achieve the optimal rate. Next, we consider a set of asymmetric functions. Using the same setup as in the symmetric case, we consider the functions of the form f(x) = 1 kl |x −x⇤|klI(x −x⇤0) + 1 kr |x −x⇤|krI(x −x⇤> 0), for exponent pairs (k1, k2) chosen to be ( 3 2, 2), ( 3 2, 3) and (2, 3). The simulation results are shown in the bottom three panels of Figure 2. We observe that the stochastic binary search once again achieves the optimal rate, which is determined by the flatter side of the function, that is, the larger of kl and kr. 4 Related work and future directions In related recent work, Ramdas and Singh [14] study minimax complexity for the class of Lipschitz convex functions that satisfy f(x) −f(x⇤ f) ≥λ 2 kx −x⇤ fkk. They show that the minimax complexity under the function value error is of the order T − k 2(k−1) . Juditski and Nesterov [8] also consider minimax complexity for the class of k-uniformly convex functions for k > 2. They give an adaptive algorithm based on stochastic gradient descent that achieves the minimax complexity up to a logarithmic factor. Connections with active learning are developed in [15], with related ideas appearing in [3]. Adaptivity in this line of work corresponds to the standard notion in statistical estimation, which seeks to adapt to a large subclass of a parameter space. In contrast, the results in the current paper quantify the difficulty of stochastic convex optimization at a much finer scale, as the benchmark is determined by the specific function to be optimized. The stochastic binary search algorithm presented in Section 3, despite being adaptive, has a few drawbacks. It requires the modulus of continuity of the function to satisfy polynomial growth, with a parameter ↵bounded away from 0. This rules out cases such as f(x) = |x|, which should have an error that decays exponentially in T; it is of interest to handle this case as well. It would also be of interest to construct adaptive optimization procedures tuned to a fixed numerical precision. Such procedures should have different running times depending on the hardness of the problem. Progress on both problems has been made, and will be reported elsewhere. Another challenge is to remove the logarithmic factors appearing in the binary search algorithm developed in Section 3. In one dimension, stochastic convex optimization is intimately related to a noisy root finding problem for a monotone function taking values in [−a, a] for some a > 0. Karp and Kleinberg [9] study optimal algorithms for such root finding problems in a discrete setting. A binary search algorithm that allows backtracking is proposed, which saves log factors in the running time. It would be interesting to study the use of such techniques in our setting. Other areas that warrant study involve the dependence on dimension. The scaling with dimension of the local minimax complexity and modulus of continuity is not fully revealed by the current analysis. Moreover, the superefficiency result and the adaptive algorithm presented here are only for the one-dimensional case. We note that a form of adaptive stochastic gradient algorithm for the class of uniformly convex functions in general, fixed dimension is developed in [8]. Finally, a more open-ended direction is to consider larger classes of stochastic optimization problems. For instance, minimax results are known for functions of the form f(x) := E F(x; ⇠) where ⇠is a random variable and x 7! F(x; ⇠) is convex for any ⇠, when f is twice continuously differentiable around the minimum point with positive definite Hessian. However, the role of the local geometry is not well understood. It would be interesting to further develop the local complexity techniques introduced in the current paper, to gain insight into the geometric structure of more general stochastic optimization problems. 8 Acknowledgments Research supported in part by ONR grant 11896509 and NSF grant DMS-1513594. The authors thank Tony Cai, Praneeth Netrapalli, Rob Nowak, Aaron Sidford, and Steve Wright for insightful discussions and valuable comments on this work. References [1] Lawrence Brown and Mark Low. A constrained risk inequality with applications to nonparametric functional estimation. Annals of Statistics, 24(6):2524–2535, 1996. [2] Tony Cai and Mark Low. A framework for estimation of convex functions. Statistica Sinica, pages 423–456, 2015. [3] Rui Castro and Robert Nowak. Minimax bounds for active learning. Information Theory, IEEE Transactions on, 54(5):2339–2353, 2008. [4] David Donoho. Statistical estimation and optimal recovery. The Annals of Statistics, pages 238–270, 1994. [5] David Donoho and Richard Liu. Geometrizing rates of convergence, I. Technical report, University of California, Berkeley, 1987. Department of Statistics, Technical Report 137. [6] David Donoho and Richard Liu. Geometrizing rates of convergence, II. Annals of Statistics, 19: 633–667, 1991. [7] Jean-Baptiste Hiriart-Urruty and Claude Lemaréchal. Convex Analysis and Minimization Algorithms I & II. Springer, New York, 1993. [8] Anatoli Juditski and Yuri Nesterov. Deterministic and stochastic primal-dual subgradient methods for minimizing uniformly convex functions. Stochastic System, 4(1):44–80, 2014. [9] Richard M Karp and Robert Kleinberg. Noisy binary search and its applications. In Proceedings of the eighteenth annual ACM-SIAM symposium on Discrete algorithms, pages 881–890. Society for Industrial and Applied Mathematics, 2007. [10] Eric Moulines and Francis Bach. Non-asymptotic analysis of stochastic approximation algorithms for machine learning. In J. Shawe-Taylor, R. S. Zemel, P. L. Bartlett, F. Pereira, and K. Q. Weinberger, editors, Advances in Neural Information Processing Systems 24, pages 451–459, 2011. [11] Aleksandr Nazin. Informational inequalities in gradient stochastic optimization optimal feasible algorithms. Automation and Remote Control, 50(4):531–540, 1989. [12] Arkadi Nemirovsky and David Yudin. Problem Complexity and Method Efficiency in Optimization. John Wiley & Sons, 1983. [13] Boris Polyak and Anatoli Juditsky. Acceleration of stochastic approximation by averaging. SIAM Journal on Control and Optimization, 30(4):838–855, 1992. [14] Aaditya Ramdas and Aarti Singh. Optimal rates for stochastic convex optimization under Tsybakov noise condition. In Proceedings of The 30th International Conference on Machine Learning, pages 365–373, 2013. [15] Aaditya Ramdas and Aarti Singh. Algorithmic connections between active learning and stochastic convex optimization. arxiv:1505.04214, 2015. [16] David Ruppert. Efficient estimations from a slowly convergent Robbins-Monro process. Technical report, Report 781, Cornell University Operations Research and Industrial Engineering, 1988. [17] Alexandre Tsybakov. Introduction to Nonparametric Estimation. Springer, 2009. 9 | 2016 | 429 |
6,360 | A Communication-Efficient Parallel Algorithm for Decision Tree Qi Meng1,∗, Guolin Ke2,∗, Taifeng Wang2, Wei Chen2, Qiwei Ye2, Zhi-Ming Ma3, Tie-Yan Liu2 1Peking University 2Microsoft Research 3Chinese Academy of Mathematics and Systems Science 1qimeng13@pku.edu.cn; 2{Guolin.Ke, taifengw, wche, qiwye, tie-yan.liu}@microsoft.com; 3mazm@amt.ac.cn Abstract Decision tree (and its extensions such as Gradient Boosting Decision Trees and Random Forest) is a widely used machine learning algorithm, due to its practical effectiveness and model interpretability. With the emergence of big data, there is an increasing need to parallelize the training process of decision tree. However, most existing attempts along this line suffer from high communication costs. In this paper, we propose a new algorithm, called Parallel Voting Decision Tree (PV-Tree), to tackle this challenge. After partitioning the training data onto a number of (e.g., M) machines, this algorithm performs both local voting and global voting in each iteration. For local voting, the top-k attributes are selected from each machine according to its local data. Then, globally top-2k attributes are determined by a majority voting among these local candidates. Finally, the full-grained histograms of the globally top-2k attributes are collected from local machines in order to identify the best (most informative) attribute and its split point. PV-Tree can achieve a very low communication cost (independent of the total number of attributes) and thus can scale out very well. Furthermore, theoretical analysis shows that this algorithm can learn a near optimal decision tree, since it can find the best attribute with a large probability. Our experiments on real-world datasets show that PV-Tree significantly outperforms the existing parallel decision tree algorithms in the trade-off between accuracy and efficiency. 1 Introduction Decision tree [16] is a widely used machine learning algorithm, since it is practically effective and the rules it learns are simple and interpretable. Based on decision tree, people have developed other algorithms such as Random Forest (RF) [3] and Gradient Boosting Decision Trees (GBDT) [7], which have demonstrated very promising performances in various learning tasks [5]. In recent years, with the emergence of very big training data (which cannot be held in one single machine), there has been an increasing need of parallelizing the training process of decision tree. To this end, there have been two major categories of attempts: 2. ∗Denotes equal contribution. This work was done when the first author was visiting Microsoft Research Asia. 2There is another category of works that parallelize the tasks of sub-tree training once a node is split [15], which require the training data to be moved from machine to machine for many times and are thus inefficient. Moreover, there are also some other works accelerating decision tree construction by using pre-sorting [13] [19] [11] and binning [17] [8] [10], or employing a shared-memory-processors approach [12] [1]. However, they are out of our scope. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Attribute-parallel: Training data are vertically partitioned according to the attributes and allocated to different machines, and then in each iteration, the machines work on non-overlapping sets of attributes in parallel in order to find the best attribute and its split point (suppose this best attribute locates at the i-th machine) [19] [11] [20]. This process is communicationally very efficient. However, after that, the re-partition of the data on other machines than the i-th machine will induce very high communication costs (proportional to the number of data samples). This is because those machines have no information about the best attribute at all, and in order to fulfill the re-partitioning, they must retrieve the partition information of every data sample from the i-th machine. Furthermore, as each worker still has full sample set, the partition process is not parallelized, which slows down the algorithm. Data-parallel: Training data are horizontally partitioned according to the samples and allocated to different machines. Then the machines communicate with each other the local histograms of all attributes (according to their own data samples) in order to obtain the global attribute distributions and identify the best attribute and split point [12] [14]. It is clear that the corresponding communication cost is very high and proportional to the total number of attributes and histogram size. To reduce the cost, in [2] and [21] [10], it was proposed to exchange quantized histograms between machines when estimating the global attribute distributions. However, this does not really solve the problem – the communication cost is still proportional to the total number of attributes, not to mentioned that the quantization may hurt the accuracy. In this paper, we proposed a new data-parallel algorithm for decision tree, called Parallel Voting Decision Tree (PV-Tree), which can achieve much better balance between communication efficiency and accuracy. The key difference between conventional data-parallel decision tree algorithm and PV-Tree lies in that the former only trusts the globally aggregated histogram information, while the latter leverages the local statistical information contained in each machine through a two-stage voting process, thus can significantly reduce the communication cost. Specifically, PV-Tree contains the following steps in each iteration. 1) Local voting. On each machine, we select the top-k attributes based on its local data according to the informativeness scores (e.g., risk reduction for regression, and information gain for classification). 2) Global voting. We determine global top-2k attributes by a majority voting among the local candidates selected in the previous step. That is, we rank the attributes according to the number of local machines who select them, and choose the top 2k attributes from the ranked list. 3) Best attribute identification. We collect the full-grained histograms of the globally top-2k attributes from local machines in order to compute their global distributions. Then we identify the best attribute and its split point according to the informativeness scores calculated from the global distributions. It is easy to see that PV-Tree algorithm has a very low communication cost. It does not need to communicate the information of all attributes, instead, it only communicates indices of the locally top-k attributes per machine and the histograms of the globally top-2k attributes. In other words, its communication cost is independent of the total number of attributes. This makes PV-Tree highly scalable. On the other hand, it can be proven that PV-Tree can find the best attribute with a large probability, and the probability will approach 1 regardless of k when the training data become sufficiently large. In contrast, the data-parallel algorithm based on quantized histogram could fail in finding the best attribute, since the bias introduced by histogram quantization cannot be reduced to zero even if the training data are sufficiently large. We have conducted experiments on real-world datasets to evaluate the performance of PV-Tree. The experimental results show that PV-Tree has consistently higher accuracy and training speed than all the baselines we implemented. We further conducted experiments to evaluate the performance of PV-Tree in different settings (e.g., with different numbers of machines, different values of k). The experimental results are in accordance with our theoretical analysis. 2 Decision Tree Suppose the training data set Dn = {(xi,j, yi); i = 1, · · · , n, j = 1, · · · , d} are independently sampled from Qd j=1 Xj × Y according to (Qd j=1 PXj)PY |X. The goal is to learn a regression or classification model f ∈F : Qd j=1 Xj →Y by minimizing loss functions on the training data, which hopefully could achieve accurate prediction for the unseen test data. 2 Decision tree[16, 18] is a widely used model for both regression [4] and classification [18]. A typical decision tree algorithm is described in Alg 1. As can be seen, the tree growth procedure is recursive, and the nodes will not stop growing until they reach the stopping criteria. There are two important functions in the algorithm: FindBestSplit returns the best split point {attribute, threshold} of a node, and Split splits the training data according to the best split point. The details of FindBestSplit is given in Alg 2: first histograms of the attributes are constructed (for continuous attributes, one usually converts their numerical values to finite bins for ease of compuation) by going over all training data on the current node; then all bins (split points) are traversed from left to right, and leftSum and rightSum are used to accumulate sum of left and right parts of the split point respectively. When selecting the best split point, an informativeness measure is adopted. The widely used informative measures are information gain and variance gain for classification and regression, respectively. Algorithm 1 BulidTree Input: Node N, Dateset D if StoppingCirteria(D) then N.output = Prediction(D) else bestSplit = FindBestSplit(D) (DL, DR) = Split(D, N, bestSplit) BuildTree(N.leftChild, DL) BuildTree(N.rightChild, DR) end if Definition 2.1 [6][16] In classification, the information gain (IG) for attribute Xj ∈[w1, w2] at node O, is defined as the entropy reduction of the output Y after splitting node O by attribute Xj at w, i.e., IGj(w; O) = Hj −(Hl j(w) + Hr j(w)) = P(w1 ≤Xj ≤w2)H(Y |w1 ≤Xj ≤w2) −P(w1 ≤Xj < w)H(Y |w1 ≤Xj < w) −P(w ≤Xj ≤w2)H(Y |w ≤Xj ≤w2), where H(·|·) denotes the conditional entropy. In regression, the variance gain (VG) for attribute Xj ∈[w1, w2] at node O, is defined as variance reduction of the output Y after splitting node O by attribute Xj at w, i.e., V Gj(w; O) = σj −(σl j(w) + σr j (w)) = P(w1 ≤Xj ≤w2)V ar[Y |w1 ≤Xj ≤w2] −P(w1 ≤Xj < w)V ar[Y |w1 ≤Xj < w] −P(w2 ≥Xj ≥w)V ar[Y |w2 ≥Xj ≥w], where V ar[·|·] denotes the conditional variance. 3 PV-Tree In this section, we describe our proposed PV-Tree algorithm for parallel decision tree learning, which has a very low communication cost, and can achieve a good trade-off between communication efficiency and learning accuracy. PV-Tree is a data-parallel algorithm, which also partitions the training data onto M machines just like in [2] [21]. However, its design principal is very different. In [2][21], one does not trust the local information about the attributes in each machine, and decides the best attribute and split point only based on the aggregated global histograms of the attributes. In contrast, in PV-Tree, we leverage the meaningful statistical information about the attributes contained in each local machine, and make decisions through a two-stage (local and then global) voting process. In this way, we can significantly reduce the communication cost since we do not need to communicate the histogram information of all the attributes across machines, instead, only the histograms of those attributes that survive in the voting process. The flow of PV-tree algorithm is very similar to the standard decision tree, except function FindBestSplit. So we only give the new implementation of this function in Alg 3, which contains following three steps: Local Voting: We select the top-k attributes for each machine based on its local data set (according to the informativeness scores, e.g., information gain for classification and variance reduction for regression), and then exchange indices of the selected attributes among machines. Please note that the communication cost for this step is very low, because only the indices for a small number of (i.e., k × M) attributes need to be communicated. Global Voting: We determine the globally top-2k attributes by a majority voting among all locally selected attributes in the previous step. That is, we rank the attributes according to the number of 3 local machines who select them, and choose the top-2k attributes from the ranked list. It can be proven that when the local data are big enough to be statistically representative, there is a very high probability that the top-2k attributes obtained by this majority voting will contain the globally best attribute. Please note that this step does not induce any communication cost. Best Attribute Identification: We collect full-grained histograms of the globally top-2k attributes from local machines in order to compute their global distributions. Then we identify the best attribute and its split point according to the informativeness scores calculated from the global distributions. Please note that the communication cost for this step is also low, because we only need to communicate the histograms of 2k pre-selected attributes (but not all attributes).3 As a result, PV-Tree algorithm can scale very well since its communication cost is independent of both the total number of attributes and the total number of samples in the dataset. In next section, we will provide theoretical analysis on accuracy guarantee of PV-Tree algorithm. Algorithm 2 FindBestSplit Input: DataSet D for all X in D.Attribute do ▷Construct Histogram H = new Histogram() for all x in X do H.binAt(x.bin).Put(x.label) end for ▷Find Best Split leftSum = new HistogramSum() for all bin in H do leftSum = leftSum + H.binAt(bin) rightSum = H.AllSum - leftSum split.gain = CalSplitGain(leftSum, rightSum) bestSplit = ChoiceBetterOne(split,bestSplit) end for end for return bestSplit Algorithm 3 PV-Tree_FindBestSplit Input: Dataset D localHistograms = ConstructHistograms(D) ▷Local Voting splits = [] for all H in localHistograms do splits.Push(H.FindBestSplit()) end for localTop = splits.TopKByGain(K) ▷Gather all candidates allCandidates = AllGather(localTop) ▷Global Voting globalTop = allCandidates.TopKByMajority(2*K) ▷Merge global histograms globalHistograms = Gather(globalTop, localHistograms) bestSplit = globalHistograms.FindBestSplit() return bestSplit 4 Theoretical Analysis In this section, we conduct theoretical analysis on proposed PV-Tree algorithm. Specifically, we prove that, PV-Tree can select the best (most informative) attribute in a large probability, for both classification and regression. In order to better present the theorem, we firstly introduce some notations4 In classification, we denote IGj = maxw IGj(w), and rank {IGj; j ∈[d]} from large to small as {IG(1), ..., IG(d)}. We call the attribute j(1) the most informative attribute. Then, we denote l(j)(k) = |IG(1)−IG(j)| 2 , ∀j ≥k + 1 to indicate the distance between the largest and the k-th largest IG. In regression, l(j)(k) is defined in the same way, except replacing IG with VG. Theorem 4.1 Suppose we have M local machines, and each one has n training data. PV-Tree at an arbitrary tree node with local voting size k and global majority voting size 2k will select the most informative attribute with a probability at least M X m=[M/2+1] Cm M 1 − d X j=k+1 δ(j)(n, k) m d X j=k+1 δ(j)(n, k) M−m , where δ(j)(n, k) = α(j)(n) + 4e−c(j)n(l(j)(k)) 2 with limn→∞α(j)(n) = 0 and c(j) is constant. Due to space restrictions, we briefly illustrate the proof idea here and leave detailed proof to supplementary materials. Our proof contains two parts. (1) For local voting, we find a sufficient condition to guarantee a similar rank of attributes ordered by information gain computed based on local data and full data. Then, we derive a lower bound of probability to make the sufficient condition holds by 3As indicated by our theoretical analysis and empirical study (see the next sections), a very small k already leads to good performance in PV-Tree algorithm. 4Since all analysis are for one arbitrarily fixed node O, we omit the notation O here. 4 using concentration inequalities. (2) For global voting, we select top-2k attributes. It’s easy to proof that we can select the most informative attribute if only no less than [M/2 + 1] of all machines select it.5 Therefore, we can calculate the probability in the theorem using binomial distribution. Regarding Theorem 4.1, we have following discussions on factors that impact the lower bound for probability of selecting the best attribute. 1.Size of local training data n: Since δ(j)(n, k) decreased with n, with more and more local training data, the lower bound will increase. That means, if we have sufficiently large data, PV-Tree will select the best attribute with almost probability 1. 2. Input dimension d: It is clear that for fixed local voting size k and global voting size 2k, with d increasing, the lower bound is decreasing. Consider the case that the number of attributes become 100 times larger. Then the terms in the summation (from Pd j=k+1 to P100d j=k+1) is roughly 100 times larger for a relatively small k. But there must be many attributes away from attribute (1) and l(j)(k) is a large number which results in a small δ(j)(n, k). Thus we can say that the bound in the theorem is not sensitive with d. 3. Number of machines M: We assume the whole training data size N is fixed and the local data size n = N M . Then on one hand, as M increases, n decreases, and therefore the lower bound will decrease due to larger δj(n, k). On the other hand, because function PM m=[M/2+1] Cm Mpm(1 −p)M−m will approach 1 as M increases when p > 0.5 [[23]], the lower bound will increase. In other words, the number of machines M has dual effect on the lower bound: with more machines, local data size becomes smaller which reduces the accuracy of local voting, however, it also leads to more copies of local votes and thus increase the reliability of global voting. Therefore, in terms of accuracy, there should be an optimal number of machines given a fixed-size training data.6 4. Local/Global voting size k/2k: Local/Global voting size k/2k influence l(j)(k) and the terms in the summation in the lower bound . As k increases, l(j)(k) increases and the terms in the summation decreases, and the lower bound increases. But increasing k will bring more communication and calculating time. Therefore, we should better select a moderate k. For some distributions, especially for the distributions over high-dimensional space, l(j)(k) is less sensitive to k, then we can choose a relatively smaller k to save communication time. As a comparison, we also prove a theorem for the data-parallel algorithm based on quantized histogram as follows (please refer to the supplementary material for its proof). The theorem basically tells us that the bias introduced by histogram quantization cannot be reduced to zero even if the training data are sufficiently large, and as a result the corresponding algorithm could fail in finding the best attribute.7 This could be the critical weakness of this algorithm in big data scenario. Theorem 4.2 We denote quantized histogram with b bins of the underlying distribution P as P b, that of the empirical distribution Pn as P b n, the information gain of Xj calculated under the distribution P b and P b n as IGb j and IGb n,j respectively, and fj(b) ≜|IGj −IGb j|. Then, for ϵ ≤minj=1,··· ,d fj(b), with probability at least δj(n, fj(b) −ϵ)), we have |IGb n,j −IGj| > ϵ. 5 Experiments In this section, we report the experimental comparisons between PV-Tree and baseline algorithms. We used two data sets, one for learning to rank (LTR) and the other for ad click prediction (CTR)8 (see Table 1 for details). For LTR, we extracted about 1200 numerical attributes per data sample, and used NDCG [5] as the evaluation measure. For CTR, we extracted about 800 numerical attributes [9], and used AUC as the evaluation measure. 5In fact, the global voting size can be βk with β > 1. Then the sufficient condition becomes that no less than [M/β + 1] of all machines select the most informative attribute. 6Please note that using more machines will reduce local computing time, thus the optimal value of machine number may be larger in terms of speed-up. 7The theorem for regression holds in the same way, with replacing IG with VG. 8We use private data in LTR experiments and data of KDD Cup 2012 track 2 in CTR experiments. 5 Table 1: Datasets Task #Train #Test #Attribute Source LTR 11M 1M 1200 Private CTR 235M 31M 800 KDD Cup Table 2: Convergence time (seconds) Task Sequential DataAttributePV-Tree Parallel Parallel LTR 28690 32260 14660 5825 CTR 154112 9209 26928 5349 According to recent industrial practices, a single decision tree might not be strong enough to learn an effective model for complicated tasks like ranking and click prediction. Therefore, people usually use decision tree based boosting algorithms (e.g., GBDT) to perform tasks. In this paper, we also use GBDT as a platform to examine the efficiency and effectiveness of decision tree parallelization. That is, we used PV-Tree or other baseline algorithms to parallelize the decision tree construction process in each iteration of GBDT, and compare their performance. Our experimental environment is a cluster of servers (each with 12 CPU cores and 32 GB RAM) inter-connected with 1 Gbps Ethernet. For the experiments on LTR, we used 8 machines for parallel training; and for the experiments on CTR, we used 32 machines since the dataset is much larger. 5.1 Comparison with Other Parallel Decision Trees For comparison with PV-Tree, we have implemented an attribute-parallel algorithm, in which a binary vector is used to indicate the split information and exchanged across machines. In addition, we implemented a data-parallel algorithm according to [2, 21], which can communicate both full-grained histograms and quantized histograms. All parallel algorithms and sequential(single machine) version are compared together. The experimental results can be found in Figure 1a and 1b. From these figures, we have the following observations: For LTR, since the number of data samples is relatively small, the communication of the split information about the samples does not take too much time. As a result, the attribute-parallel algorithm appears to be efficient. Since most attributes take numerical values in this dataset, the fullgrained histogram has quite a lot of bins. Therefore, the data-parallel algorithm which communicates full-grained histogram is quite slow, even slower than the sequential algorithm. When reducing the bins in the histogram to 10%, the data-parallel algorithm becomes much more efficient, however, its convergence point is not good (consistent with our theory – the bias in quantized histograms leads to accuracy drop). For CTR, attribute-parallel algorithm becomes very slow since the number of data samples is very large. In contrast, many attributes in CTR take binary or discrete values, which make the full-grained histogram have limited number of bins. As a result, the data-parallel algorithm with full-grain histogram is faster than the sequential algorithm. The data-parallel algorithm with quantized histograms is even faster, however, its convergence point is once again not very good. PV-Tree reaches the best point achieved by sequential algorithm within the shortest time in both LTR and CTR task. For a more quantitative comparison on efficiency, we list the time for each algorithm (8 machines for LTR and 32 machines for CTR) to reach the convergent accuracy of the sequential algorithm in Table 2. From the table, we can see that, for LTR, it costed PV-Tree 5825 seconds, while it costed the data-parallel algorithm (with full-grained histogram9) and attribute-parallel algorithm 32260 and 14660 seconds respectively. As compared with the sequential algorithm (which took 28690 seconds to converge), PV-Tree achieves 4.9x speed up on 8 machines. For CTR, it costed PV-Tree 5349 seconds, while it costed the data-parallel algorithm (with full-grained histogram) and attributeparallel algorithm 9209 and 26928 seconds respectively. As compared with the sequential algorithm (which took 154112 seconds to converge), PV-Tree achieves 28.8x speed up on 32 machines. We also conducted independent experiments to get a clear comparison of communication cost for different parallel algorithms given some typical big data workload setting. The result is listed in Table 3. We find the cost of attribute-parallel algorithm is relative to the size of training data N, and the cost of data-parallel algorithm is relative to the number of attributes d. In contrast, the cost of PV-Tree is constant. 9The data-parallel algorithm with 10% bins could not achieve the same accuracy with the sequential algorithm and thus we did not put it in the table. 6 Table 3: Comparison of communication cost, train one tree with depth=6. Data size Attribute Data PV-Tree Palallel Parallel k=15 N=1B, 750MB 424MB 10MB d=1200 N=100M, 75MB 424MB 10MB d=1200 N=1B, 750MB 70MB 10MB d=200 N=100M, 75MB 70MB 10MB d=200 Table 4: Convergence time and accuracy w.r.t. global voting parameter k for PV-Tree. k=1 k=5 k=10 k=20 k=40 LTR 11256/ 9906/ 9065/ 8323/ 9529/ M=4 0.7905 0.7909 0.7909 0.7909 0.7909 LTR 8211/ 8131/ 8496/ 10320/ 12529/ M=16 0.7882 0.7893 0.7897 0.7906 0.7909 CTR 9131/ 9947/ 9912/ 10309/ 10877/ M=16 0.7535 0.7538 0.7538 0.7538 0.7538 CTR 1806/ 1745/ 2077/ 2133/ 2564/ M=128 0.7533 0.7536 0.7537 0.7537 0.7538 (a) LTR, 8 machines (b) CTR, 32 machines Figure 1: Performances of different algorithms 5.2 Tradeoff between Speed-up and Accuracy in PV-Tree In the previous subsection, we have shown that PV-tree is more efficient than other algorithms. Here we make a deep dive into PV-tree to see how its key parameters affect the trade-off between efficiency and accuracy. According to Theorem 4.1, the following two parameters are critical to PV-Tree: the number of machines M and the size of voting k. 5.2.1 On Different Numbers of Machines When more machines join the distributed training process, the data throughput will grow larger but the amortized training data on each machine will get smaller. When the data size on each machine becomes too small, there will be no guarantee on the accuracy of the voting procedure, according to our theorem. So it is important to appropriately set the number of machines. To gain more insights on this, we conducted some additional experiments, whose results are shown in Figure 2a and 2b. From these figures, we can see that for LTR, when the number of machines grows from 2 to 8, the training process is significantly accelerated. However, when the number goes up to 16, the convergence speed is even lower than that of using 8 machines. Similar results can be observed for CTR. These observations are consistent with our theoretical findings. Please note that PV-Tree is designed for the big data scenario. Only when the entire training data are huge (and thus distribution of the training data on each local machine can be similar to that of the entire training data), the full power of PV-Tree can be realized. Otherwise, we need to have a reasonable expectation on the speed-up, and should choose to use a smaller number of machines to parallelize the training. 5.2.2 On Different Sizes of Voting In PV-Tree, we have a parameter k, which controls the number of top attributes selected during local and global voting. Intuitively, larger k will increase the probability of finding the globally best attribute from the local candidates, however, it also means higher communication cost. According to our theorem, the choice of k should depend on the size of local training data. If the size of local training data is large, the locally best attributes will be similar to the globally best one. In this case, one can safely choose a small value of k. Otherwise, we should choose a relatively larger k. To gain more insights on this, we conducted some experiments, whose results are shown in Table 4, where M refers to the number of machines. From the table, we have the following observations. First, for both cases, in order to achieve good accuracy, one does not need to choose a large k. When k ≤40, the 7 (a) LTR (b) CTR Figure 2: PV-Tree on different numbers of machines (a) LTR, 8 machines (b) CTR, 32 machines Figure 3: Comparison with parallel boosting algorithms accuracy has been very good. Second, we find that for the cases of using small number of machines, k can be set to an even smaller value, e.g., k = 5. This is because, given a fixed-size training data, when using fewer machines, the size of training data per machine will become larger and thus a smaller k can already guarantee the approximation accuracy. 5.3 Comparison with Other Parallel GBDT Algorithms While we mainly focus on how to parallelize the decision tree construction process inside GBDT in the previous subsections, one could also parallelize GBDT in other ways. For example, in [22, 20], each machine learns its own decision tree separately without communication. After that, these decision trees are aggregated by means of winner-takes-all or output ensemble. Although these works are not the focus of our paper, it is still interesting to compare with them. For this purpose, we implemented both the algorithms proposed in [22] and [20]. For ease of reference, we denote them as Svore and Yu respectively. Their performances are shown in Figure 3a and 3b. From the figures, we can see that PV-Tree outperforms both Svore and Yu: although these two algorithms converge at a similar speed to PV-Tree, they have much worse converge points. According to our limited understanding, these two algorithms are lacking solid theoretical guarantee. Since the candidate decision trees are trained separately and independently without necessary information exchange, they may have non-negligible bias, which will lead to accuracy drop at the end. In contrast, we can clearly characterize the theoretical properties of PV-tree, and use it in an appropriate setting so as to avoid observable accuracy drop. To sum up all the experiments, we can see that with appropriately-set parameters, PV-Tree can achieve a very good trade-off between efficiency and accuracy, and outperforms both other parallel decision tree algorithms designed specifically for GBDT parallelization. 6 Conclusions In this paper, we proposed a novel parallel algorithm for decision tree, called Parallel Voting Decision Tree (PV-Tree), which can achieve high accuracy at a very low communication cost. Experiments on both ranking and ad click prediction indicate that PV-Tree has its advantage over a number of baselines algorithms. As for future work, we plan to generalize the idea of PV-Tree to parallelize other machine learning algorithms. Furthermore, we will open-source PV-Tree algorithm to benefit more researchers and practitioners. 8 References [1] Rakesh Agrawal, Ching-Tien Ho, and Mohammed J Zaki. Parallel classification for data mining in a shared-memory multiprocessor system, 2001. US Patent 6,230,151. [2] Yael Ben-Haim and Elad Tom-Tov. A streaming parallel decision tree algorithm. In The Journal of Machine Learning Research, volume 11, pages 849–872, 2010. [3] Leo Breiman. Random forests. In Machine learning, volume 45, pages 5–32. Springer, 2001. [4] Leo Breiman, Jerome Friedman, Charles J Stone, and Richard A Olshen. Classification and regression trees. CRC press, 1984. [5] Christopher JC Burges. From ranknet to lambdarank to lambdamart: An overview. In Learning, volume 11, pages 23–581, 2010. [6] Jerome Friedman, Trevor Hastie, and Robert Tibshirani. The elements of statistical learning, volume 1. Springer series in statistics Springer, Berlin, 2001. [7] Jerome H Friedman. Greedy function approximation: a gradient boosting machine. In Annals of statistics, pages 1189–1232. JSTOR, 2001. [8] Johannes Gehrke, Venkatesh Ganti, Raghu Ramakrishnan, and Wei-Yin Loh. Boat—optimistic decision tree construction. In ACM SIGMOD Record, volume 28, pages 169–180. ACM, 1999. [9] Michael Jahrer, A Toscher, JY Lee, J Deng, H Zhang, and J Spoelstra. Ensemble of collaborative filtering and feature engineered models for click through rate prediction. In KDDCup Workshop, 2012. [10] Ruoming Jin and Gagan Agrawal. Communication and memory efficient parallel decision tree construction. In SDM, pages 119–129. SIAM, 2003. [11] Mahesh V Joshi, George Karypis, and Vipin Kumar. Scalparc: A new scalable and efficient parallel classification algorithm for mining large datasets. In Parallel processing symposium, 1998. IPPS/SPDP 1998, pages 573–579. IEEE, 1998. [12] Richard Kufrin. Decision trees on parallel processors. In Machine Intelligence and Pattern Recognition, volume 20, pages 279–306. Elsevier, 1997. [13] Manish Mehta, Rakesh Agrawal, and Jorma Rissanen. Sliq: A fast scalable classifier for data mining. In Advances in Database Technology—EDBT’96, pages 18–32. Springer, 1996. [14] Biswanath Panda, Joshua S Herbach, Sugato Basu, and Roberto J Bayardo. Planet: massively parallel learning of tree ensembles with mapreduce. In Proceedings of the VLDB Endowment, volume 2, pages 1426–1437. VLDB Endowment, 2009. [15] Robert Allan Pearson. A coarse grained parallel induction heuristic. University College, University of New South Wales, Department of Computer Science, Australian Defence Force Academy, 1993. [16] J. Ross Quinlan. Induction of decision trees. In Machine learning, volume 1, pages 81–106. Springer, 1986. [17] Sanjay Ranka and V Singh. Clouds: A decision tree classifier for large datasets. In Knowledge discovery and data mining, pages 2–8, 1998. [18] S Rasoul Safavian and David Landgrebe. A survey of decision tree classifier methodology. IEEE transactions on systems, man, and cybernetics, 21(3):660–674, 1991. [19] John Shafer, Rakesh Agrawal, and Manish Mehta. Sprint: A scalable parallel classi er for data mining. In Proc. 1996 Int. Conf. Very Large Data Bases, pages 544–555. Citeseer, 1996. [20] Krysta M Svore and CJ Burges. Large-scale learning to rank using boosted decision trees. Scaling Up Machine Learning: Parallel and Distributed Approaches, 2, 2011. [21] Stephen Tyree, Kilian Q Weinberger, Kunal Agrawal, and Jennifer Paykin. Parallel boosted regression trees for web search ranking. In Proceedings of the 20th international conference on World wide web, pages 387–396. ACM, 2011. [22] C Yu and DB Skillicorn. Parallelizing boosting and bagging. Queen’s University, Kingston, Canada, Tech. Rep, 2001. [23] Zhi-Hua Zhou. Ensemble methods: foundations and algorithms. CRC Press, 2012. 9 | 2016 | 43 |
6,361 | Kronecker Determinantal Point Processes Zelda Mariet Massachusetts Institute of Technology Cambridge, MA 02139 zelda@csail.mit.edu Suvrit Sra Massachusetts Institute of Technology Cambridge, MA 02139 suvrit@mit.edu Abstract Determinantal Point Processes (DPPs) are probabilistic models over all subsets a ground set of N items. They have recently gained prominence in several applications that rely on “diverse” subsets. However, their applicability to large problems is still limited due to O(N 3) complexity of core tasks such as sampling and learning. We enable efficient sampling and learning for DPPs by introducing KRONDPP, a DPP model whose kernel matrix decomposes as a tensor product of multiple smaller kernel matrices. This decomposition immediately enables fast exact sampling. But contrary to what one may expect, leveraging the Kronecker product structure for speeding up DPP learning turns out to be more difficult. We overcome this challenge, and derive batch and stochastic optimization algorithms for efficiently learning the parameters of a KRONDPP. 1 Introduction Determinantal Point Processes (DPPs) are discrete probability models over the subsets of a ground set of N items. They provide an elegant model to assign probabilities to an exponentially large sample, while permitting tractable (polynomial time) sampling and marginalization. They are often used to provide models that balance “diversity” and quality, characteristics valuable to numerous problems in machine learning and related areas [17]. The antecedents of DPPs lie in statistical mechanics [24], but since the seminal work of [15] they have made inroads into machine learning. By now they have been applied to a variety of problems such as document and video summarization [6, 21], sensor placement [14], recommender systems [31], and object retrieval [2]. More recently, they have been used to compress fullyconnected layers in neural networks [26] and to provide optimal sampling procedures for the Nyström method [20]. The more general study of DPP properties has also garnered a significant amount of interest, see e.g., [1, 5, 7, 12, 16–18, 23]. However, despite their elegance and tractability, widespread adoption of DPPs is impeded by the O(N 3) cost of basic tasks such as (exact) sampling [12, 17] and learning [10, 12, 17, 25]. This cost has motivated a string of recent works on approximate sampling methods such as MCMC samplers [13, 20] or core-set based samplers [19]. The task of learning a DPP from data has received less attention; the methods of [10, 25] cost O(N 3) per iteration, which is clearly unacceptable for realistic settings. This burden is partially ameliorated in [9], who restrict to learning low-rank DPPs, though at the expense of being unable to sample subsets larger than the chosen rank. These considerations motivate us to introduce KRONDPP, a DPP model that uses Kronecker (tensor) product kernels. As a result, KRONDPP enables us to learn large sized DPP kernels, while also permitting efficient (exact and approximate) sampling. The use of Kronecker products to scale matrix models is a popular and effective idea in several machine-learning settings [8, 27, 28, 30]. But as we will see, its efficient execution for DPPs turns out to be surprisingly challenging. To make our discussion more concrete, we recall some basic facts now. Suppose we have a ground set of N items Y = {1, . . . , N}. A discrete DPP over Y is a probability measure P on 2Y 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. parametrized by a positive definite matrix K (the marginal kernel) such that 0 ⪯K ⪯I, so that for any Y ∈2Y drawn from P, the measure satisfies ∀A ⊆Y, P(A ⊆Y ) = det(KA), (1) where KA is the submatrix of K indexed by elements in A (i.e., KA = [Kij]i,j∈A). If a DPP with marginal kernel K assigns nonzero probability to the empty set, the DPP can alternatively be parametrized by a positive definite matrix L (the DPP kernel) so that P(Y ) ∝det(LY ) =⇒ P(Y ) = det(LY ) det(L + I). (2) A brief manipulation (see e.g., [17, Eq. 15]) shows that when the inverse exists, L = K(I −K)−1. The determinants, such as in the normalization constant in (2), make operations over DPPs typically cost O(N 3), which is a key impediment to their scalability. Therefore, if we consider a class of DPP kernels whose structure makes it easy to compute determinants, we should be able to scale up DPPs. An alternative approach towards scalability is to restrict the size of the subsets, as done in k-DPP [16] or when using rank-k DPP kernels [9] (where k ≪N). Without further assumptions, both approaches still require O(N 3) preprocessing for exact sampling; another caveat is that they limit the DPP model by assigning zero probabilities to sets of cardinality greater than k. In contrast, KRONDPP uses a kernel matrix of the form L = L1 ⊗. . . ⊗Lm, where each subkernel Li is a smaller positive definite matrix. This decomposition has two key advantages: (i) it significantly lowers the number of parameters required to specify the DPP from N 2 to O(N 2/m) (assuming the sub-kernels are roughly the same size); and (ii) it enables fast sampling and learning. For ease of exposition, we describe specific details of KRONDPP for m = 2; as will become clear from the analysis, typically the special cases m = 2 and m = 3 should suffice to obtain lowcomplexity sampling and learning algorithms. Contributions. Our main contribution is the KRONDPP model along with efficient algorithms for sampling from it and learning a Kronecker factored kernel. Specifically, inspired by the algorithm of [25], we develop KRK-PICARD (Kronecker-Kernel Picard), a block-coordinate ascent procedure that generates a sequence of Kronecker factored estimates of the DPP kernel while ensuring monotonic progress on its (difficult, nonconvex) objective function. More importantly, we show how to implement KRK-PICARD to run in O(N 2) time when implemented as a batch method, and in O(N 3/2) time and O(N) space, when implemented as a stochastic method. As alluded to above, unlike many other uses of Kronecker models, KRONDPP does not admit trivial scaling up, largely due to extensive dependence of DPPs on arbitrary submatrices of the DPP kernel. An interesting theoretical nugget that arises from our analysis is the combinatorial problem that we call subset clustering, a problem whose (even approximate) solution can lead to further speedups of our algorithms. 2 Preliminaries We begin by recalling basic properties of Kronecker products needed in our analysis; we omit proofs of these well-known results for brevity. The Kronecker (tensor) product of A ∈Rp×q with B ∈ Rr×s two matrices is defined as the pr × qs block matrix A ⊗B = [aijB]p,q i,j=1. We denote the block aijB in A ⊗B by (A ⊗B)(ij) for any valid pair (i, j), and extend the notation to non-Kronecker product matrices to indicate the submatrix of size r × s at position (i, j). Proposition 2.1. Let A, B, C, D be matrices of sizes so that AC and BD are well-defined. Then, (i) If A, B ⪰0, then, A ⊗B ⪰0; (ii) If A and B are invertible then so is A ⊗B, with (A ⊗B)−1 = A−1 ⊗B−1; (iii) (A ⊗B)(C ⊗D) = (AC) ⊗(BD). An important consequence of Prop. 2.1(iii) is the following corollary. Corollary 2.2. Let A = PADAP ⊤ A and B = PBDBP ⊤ B be the eigenvector decompositions of A and B. Then, A ⊗B diagonalizes as (PA ⊗PB)(DA ⊗DB)(PA ⊗PB)⊤. 2 We will also need the notion of partial trace operators, which are perhaps less well-known: Definition 2.3. Let A ∈RN1N2×N1N2. The partial traces Tr1(A) and Tr2(A) are defined as follows: Tr1(A) := [ Tr(A(ij)) ] 1≤i,j≤N1 ∈RN1×N1, Tr2(A) := ∑N1 i=1 A(ii) ∈RN2×N2. The action of partial traces is easy to visualize: indeed, Tr1(A ⊗B) = Tr(B)A and Tr2(A ⊗B) = Tr(A)B. For us, the most important property of partial trace operators is their positivity. Proposition 2.4. Tr1 and Tr2 are positive operators, i.e., for A ≻0, Tr1(A) ≻0 and Tr2(A) ≻0. Proof. Please refer to [4, Chap. 4]. 3 Learning the kernel matrix for KRONDPP In this section, we consider the key difficult task for KRONDPPs: learning a Kronecker product kernel matrix from n observed subsets Y1, . . . , Yn. Using the definition (2) of P(Yi), maximumlikelihood learning of a DPP with kernel L results in the optimization problem: arg max L≻0 ϕ(L), ϕ(L) = 1 n n ∑ i=1 (log det(LYi) −log det(L + I)) . (3) This problem is nonconvex and conjectured to be NP-hard [15, Conjecture 4.1]. Moreover the constraint L ≻0 is nontrivial to handle. Writing Ui as the indicator matrix for Yi of size N × |Yi| so that LYi = U ⊤ i LUi, the gradient of ϕ is easily seen to be ∆:= ∇ϕ(L) = 1 n ∑n i=1 UiL−1 Yi U ⊤ i −(L + I)−1. (4) In [25], the authors derived an iterative method (“the Picard iteration”) for computing an L that solves ∆= 0 by running the simple iteration L ←L + L∆L. (5) Moreover, iteration (5) is guaranteed to monotonically increase the log-likelihood ϕ [25]. But these benefits accrue at a cost of O(N 3) per iteration, and furthermore a direct application of (5) cannot guarantee the Kronecker structure required by KRONDPP. 3.1 Optimization algorithm Our aim is to obtain an efficient algorithm to (locally) optimize (3). Beyond its nonconvexity, the Kronecker structure L = L1 ⊗L2 imposes another constraint. As in [25] we first rewrite ϕ as a function of S = L−1, and re-arrange terms to write it as ϕ(S) = log det(S) | {z } f(S) + 1 n ∑n i=1 log det ( U ⊤ i S−1Ui ) −log det(I + S) | {z } g(S) . (6) It is easy to see that f is concave, while a short argument shows that g is convex [25]. An appeal to the convex-concave procedure [29] then shows that updating S by solving ∇f(S(k+1))+∇g(S(k)) = 0, which is what (5) does [25, Thm. 2.2], is guaranteed to monotonically increase ϕ. But for KRONDPP this idea does not apply so easily: due the constraint L = L1 ⊗L2 the function g⊗: (S1, S2) →1 n ∑n i=1 log det ( U ⊤ i (S1 ⊗S2)−1Ui ) −log det(I + S1 ⊗S2), fails to be convex, precluding an easy generalization. Nevertheless, for fixed S1 or S2 the functions {f1 : S1 7→f(S1 ⊗S2) g1 : S1 7→g(S1 ⊗S2) , {f2 : S2 →f(S1 ⊗S2) g2 : S2 →g(S1 ⊗S2) are once again concave or convex. Indeed, the map ⊗: S1 →S1 ⊗S2 is linear and f is concave, and f1 = f ◦⊗is also concave; similarly, f2 is seen to be concave and g1 and g2 are convex. Hence, by generalizing the arguments of [29, Thm. 2] to our “block-coordinate” setting, updating via ∇fi ( Si (k+1)) = −∇gi ( Si (k)) , for i = 1, 2, (7) should increase the log-likelihood ϕ at each iteration. We prove below that this is indeed the case, and that updating as per (7) ensure positive definiteness of the iterates as well as monotonic ascent. 3 3.1.1 Positive definite iterates and ascent In order to show the positive definiteness of the solutions to (7), we first derive their closed form. Proposition 3.1 (Positive definite iterates). For S1 ≻0, S2 ≻0, the solutions to (7) are given by the following expressions: ∇f1(X) = −∇g1(S1) ⇐⇒X−1 = Tr1((I ⊗S2)(L + L∆L)) /N2 ∇f2(X) = −∇g2(S2) ⇐⇒X−1 = Tr2 ((S1 ⊗I)(L + L∆L)) /N1. Moreover, these solutions are positive definite. Proof. The details are somewhat technical, and are hence given in Appendix A. We know that L ≻0 =⇒L + L∆L ≥0, because L −L(I + L)−1L ≻0. Since the partial trace operators are positive (Prop. 2.4), it follows that the solutions to (7) are also positive definite. We are now ready to establish that these updates ensure monotonic ascent in the log-likelihood. Theorem 3.2 (Ascent). Starting with L(0) 1 ≻0, L(0) 2 ≻0, updating according to (7) generates positive definite iterates L(k) 1 and L(k) 2 , and the sequence { ϕ ( L(k) 1 ⊗L(k) 2 )} k≥0 is non-decreasing. Proof. Updating according to (7) generates positive definite matrices Si, and hence positive definite subkernels Li = Si. Moreover, due to the convexity of g1 and concavity of f1, for matrices A, B ≻0 f1(B) ≤f1(A) + ∇f1(A)⊤(B −A), g1(A) ≥g1(B) + ∇g1(B)⊤(A −B). Hence, f1(A) + g1(A) ≥f1(B) + g1(B) + (∇f1(A) + ∇g1(B))⊤(A −B). Thus, if S(k) 1 , S(k+1) 1 verify (7), by setting A = S(k+1) 1 and B = S(k) 1 we have ϕ ( L(k+1) 1 ⊗L(k) 2 ) = f1 ( S(k+1) 1 ) + g1 ( S(k+1) 1 ) ≥f1 ( S(k) 1 ) + g1 ( S(k) 1 ) = ϕ ( L(k) 1 ⊗L(k) 2 ) . The same reasoning holds for L2, which proves the theorem. As Tr1((I ⊗S2)L) = N2L1 (and similarly for L2), updating as in (7) is equivalent to updating L1 ←L1 + Tr1 ( (I ⊗L−1 2 )(L∆L) ) /N2, L2 ←L2 + Tr2 ( (L−1 1 ⊗I)(L∆L) ) /N1. Generalization. We can generalize the updates to take an additional step-size parameter a: L1 ←L1 + a Tr1 ( (I ⊗L−1 2 )(L∆L) ) /N2, L2 ←L2 + a Tr2 ( (L−1 1 ⊗I)(L∆L) ) /N1. Experimentally, a > 1 (as long as the updates remain positive definite) can provide faster convergence, although the monotonicity of the log-likelihood is no longer guaranteed. We found experimentally that the range of admissible a is larger than for Picard, but decreases as N grows larger. The arguments above easily generalize to the multiblock case. Thus, when learning L = L1 ⊗· · · ⊗ Lm, by writing Eij the matrix with a 1 in position (i, j) and zeros elsewhere, we update Lk as (Lk)ij ←(Lk)ij + Nk/(N1 . . . Nm) Tr [(L1 ⊗. . . ⊗Lk−1 ⊗Eij ⊗Lk+1 ⊗. . . ⊗Lm)(L∆L)] . From the above updates it is not transparent whether the Kronecker product saves us any computation. In particular, it is not clear whether the updates can be implemented to run faster than O(N 3). We show below in the next section how to implement these updates efficiently. 3.1.2 Algorithm and complexity analysis From Theorem 3.2, we obtain Algorithm 1 (which is different from the Picard iteration in [25], because it operates alternatingly on each subkernel). It is important to note that a further speedup to Algorithm 1 can be obtained by performing stochastic updates, i.e., instead of computing the full gradient of the log-likelihood, we perform our updates using only one (or a small minibatch) subset Yi at each step instead of iterating over the entire training set; this uses the stochastic gradient ∆= UiL−1 Yi U ⊤ i −(I + L)−1. The crucial strength of Algorithm 1 lies in the following result: 4 Algorithm 1 KRK-PICARD iteration Input: Matrices L1, L2, training set T, parameter a. for i = 1 to maxIter do L1 ←L1 + a Tr1 ( (I ⊗L−1 2 )(L∆L) ) /N2 // or update stochastically L2 ←L2 + a Tr2 ( (L−1 1 ⊗I)(L∆L) ) /N1 // or update stochastically end for return (L1, L2) Theorem 3.3 (Complexity). For N1 ≈N2 ≈ √ N, the updates in Algorithm 1 can be computed in O(nκ3+N 2) time and O(N 2) space, where κ is the size of the largest training subset. Furthermore, stochastic updates can be computed in O(Nκ2 + N 3/2) time and O(N + κ2) space. Indeed, by leveraging the properties of the Kronecker product, the updates can be obtained without computing L∆L. This result is non-trivial: the components of ∆, 1 n ∑ i UiL−1 Yi U ⊤ i and (I + L)−1, must be considered separately for computational efficiency. The proof is provided in App. B. However, it seems that considering more than 2 subkernels does not lead to further speed-ups. This is a marked improvement over [25], which runs in O(N 2) space and O(nκ3 + N 3) time (nonstochastic) or O(N 3) time (stochastic); Algorithm 1 also provides faster stochastic updates than [9]1. However, one may wonder if by learning the sub-kernels by alternating updates the log-likelihood converges to a sub-optimal limit. The next section discusses how to jointly update L1 and L2. 3.2 Joint updates We also analyzed the possibility of updating L1 and L2 jointly: we update L ←L + L∆L and then recover the Kronecker structure of the kernel by defining the updates L′ 1 and L′ 2 such that: {(L′ 1, L′ 2) minimizes ∥L + L∆L −L′ 1 ⊗L′ 2∥2 F L′ 1 ≻0, L′ 2 ≻0, ∥L′ 1∥= ∥L′ 2∥ (8) We show in appendix C that such solutions exist and can be computed from the first singular value and vectors of the matrix R = [ vec((L−1 + ∆)(ij))⊤]N1 i,j=1. Note however that in this case, there is no guaranteed increase in log-likelihood. The pseudocode for the related algorithm (JOINT-PICARD) is given in appendix C.1. An analysis similar to the proof of Thm. 3.3 shows that the updates can be obtained O(nκ3 + max(N1, N2)4). 3.3 Memory-time trade-off Although KRONDPPS have tractable learning algorithms, the memory requirements remain high for non-stochastic updates, as the matrix Θ = 1 n ∑ i UiL−1 Yi U ⊤ i needs to be stored, requiring O(N 2) memory. However, if the training set can be subdivided such that {Y1, . . . , Yn} = ∪m k=1Sk s.t. ∀k, |∪Y ∈SkY | < z, (9) Θ can be decomposed as 1 n ∑m k=1 Θk with Θk = ∑ Yi∈Sk UiL−1 Yi U ⊤ i . Due to the bound in Eq. 9, each Θk will be sparse, with only z2 non-zero coefficients. We can then store each Θk with minimal storage and update L1 and L2 in O(nκ3 + mz2 + N 3/2) time and O(mz2 + N) space. Determining the existence of such a partition of size m is a variant of the NP-Hard Subset-Union Knapsack Problem (SUKP) [11] with m knapsacks and where the value of each item (i.e. each Yi) is equal to 1: a solution to SUKP of value n with m knapsacks is equivalent to a solution to Eq. 9. However, an approximate partition can also be simply constructed via a greedy algorithm. 4 Sampling Sampling exactly (see Alg. 2 and [17]) from a full DPP kernel costs O(N 3 + Nk3) where k is the size of the sampled subset. The bulk of the computation lies in the initial eigendecomposition of L; 1For example, computing matrix B in [9] (defined after Eq. 7), which is a necessary step for (stochastic) gradient ascent, costs O(N 2) due to matrix multiplications. 5 the k orthonormalizations cost O(Nk3). Although the eigendecomposition need only happen once for many iterations of sampling, exact sampling is nonetheless intractable in practice for large N. Algorithm 2 Sampling from a DPP kernel L Input: Matrix L. Eigendecompose L as {(λi, vi)}1≤i≤N. J ←∅ for i = 1 to N do J →J ∪{i} with probability λi/(λi + 1). end for V ←{vi}i∈J, Y ←∅ while |V | > 0 do Sample i from {1 . . . N} with probability 1 |V | ∑ v∈V v2 i Y ←Y ∪{i}, V ←V⊥, where V⊥is an orthonormal basis of the subspace of V orthonormal to ei end while return Y It follows from Prop. 2.2 that for KRONDPPS, the eigenvalues λi can be obtained in O(N 3 1 + N 3 2 ), and the k eigenvectors in O(kN) operations. For N1 ≈N2 ≈ √ N, exact sampling thus only costs O(N 3/2 + Nk3). If L = L1 ⊗L2 ⊗L3, the same reasoning shows that exact sampling becomes linear in N, only requiring O(Nk3) operations. One can also resort to MCMC sampling; for instance such a sampler was considered in [13] (though with an incorrect mixing time analysis). The results of [20] hold only for k-DPPs, but suggest their MCMC sampler may possibly take O(N 2 log(N/ϵ)) time for full DPPs, which is impractical. Nevertheless if one develops faster MCMC samplers, they should also be able to profit from the Kronecker product structure offered by KRONDPP. 5 Experimental results In order to validate our learning algorithm, we compared KRK-PICARD to JOINT-PICARD and to the Picard iteration (PICARD) on multiple real and synthetic datasets.2 5.1 Synthetic tests To enable a fair comparison between algorithms, we test them on synthetic data drawn from a full (non-Kronecker) ground-truth DPP kernel. The sub-kernels were initialized by Li = X⊤X, with X’s coefficients drawn uniformly from [0, √ 2]; for PICARD, L was initialized with L1 ⊗L2. For Figures 1a and 1b, training data was generated by sampling 100 subsets from the true kernel with sizes uniformly distributed between 10 and 190. . . . PICARD . . JOINT-PICARD . . KRK-PICARD . . KRK-PICARD (stochastic) . 0 . 100 . 200 . −8 . −6 . −4 . −2 . 0 . ·103 . time (s) . Normalized log-likelihood (a) N1 = N2 = 50 . 0 . 200 . 400 . 600 . −4 . −2 . 0 . ·104 . time (s) (b) N1 = N2 = 100 . 0 . 20 . 40 . 60 . 80 . −3 . −2 . −1 . 0 . ·105 . time (s) (c) N1 = 100, N2 = 500 Figure 1: a = 1; the thin dotted lines indicated the standard deviation from the mean. 2All experiments were repeated 5 times and averaged, using MATLAB on a Linux Mint system with 16GB of RAM and an i7-4710HQ CPU @ 2.50GHz. 6 To evaluate KRK-PICARD on matrices too large to fit in memory and with large κ, we drew samples from a 50 · 103×50 · 103 kernel of rank 1, 000 (on average |Yi| ≈1, 000), and learned the kernel stochastically (only KRK-PICARD could be run due to the memory requirements of other methods); the likelihood drastically improves in only two steps (Fig.1c). As shown in Figures 1a and 1b, KRK-PICARD converges significantly faster than PICARD, especially for large values of N. However, although JOINT-PICARD also increases the log-likelihood at each iteration, it converges much slower and has a high standard deviation, whereas the standard deviations for PICARD and KRK-PICARD are barely noticeable. For these reasons, we drop the comparison to JOINT-PICARD in the subsequent experiments. 5.2 Small-scale real data: baby registries We compared KRK-PICARD to PICARD and EM [10] on the baby registry dataset (described indepth in [10]), which has also been used to evaluate other DPP learning algorithms [9, 10, 25]. The dataset contains 17 categories of baby-related products obtained from Amazon. We learned kernels for the 6 largest categories (N = 100); in this case, PICARD is sufficiently efficient to be prefered to KRK-PICARD; this comparison serves only to evaluate the quality of the final kernel estimates. The initial marginal kernel K for EM was sampled from a Wishart distribution with N degrees of freedom and an identity covariance matrix, then scaled by 1/N; for PICARD, L was set to K(I − K)−1; for KRK-PICARD, L1 and L2 were chosen (as in JOINT-PICARD) by minimizing ∥L − L1 ⊗L2∥. Convergence was determined when the objective change dipped below a threshold δ. As one EM iteration takes longer than one Picard iteration but increases the likelihood more, we set δPIC = δKRK = 10−4 and δEM = 10−5. The final log-likelihoods are shown in Table 1; we set the step-sizes to their largest possible values, i.e. aPIC = 1.3 and aKRK = 1.8. Table 1 shows that KRK-PICARD obtains comparable, albeit slightly worse log-likelihoods than PICARD and EM, which confirms that for tractable N, the better modeling capability of full kernels make them preferable to KRONDPPS. Table 1: Final log-likelihoods for each large category of the baby registries dataset (a) Training set Category EM PICARD KRK-PICARD apparel -10.1 -10.2 -10.7 bath -8.6 -8.8 -9.1 bedding -8.7 -8.8 -9.3 diaper -10.5 -10.7 -11.1 feeding -12.1 -12.1 -12.5 gear -9.3 -9.3 -9.6 (b) Test set Category EM PICARD KRK-PICARD apparel -10.1 -10.2 -10.7 bath -8.6 -8.8 -9.1 bedding -8.7 -8.8 -9.3 diaper -10.6 -10.7 -11.2 feeding -12.2 -12.2 -12.6 gear -9.2 -9.2 -9.5 5.3 Large-scale real dataset: GENES Finally, to evaluate KRK-PICARD on large matrices of real-world data, we train it on data from the GENES [3] dataset (which has also been used to evaluate DPPs in [3, 19]). This dataset consists in 10,000 genes, each represented by 331 features corresponding to the distance of a gene to hubs in the BioGRID gene interaction network. We construct a ground truth Gaussian DPP kernel on the GENES dataset and use it to obtain 100 training samples with sizes uniformly distributed between 50 and 200 items. Similarly to the synthetic experiments, we initialized KRK-PICARD’s kernel by setting Li = X⊤ i Xi where Xi is a random matrix of size N1 × N1; for PICARD, we set the initial kernel L = L1 ⊗L2. Figure 2 shows the performance of both algorithms. As with the synthetic experiments, KRKPICARD converges much faster; stochastic updates increase its performance even more, as shown in Fig. 2b. Average runtimes and speed-up are given in Table 2: KRK-PICARD runs almost an order of magnitude faster than PICARD, and stochastic updates are more than two orders of magnitude faster, while providing slightly larger initial increases to the log-likelihood. 7 . . . PICARD . . KRK-PICARD . . KRK-PICARD (stochastic) . 0 . 100 . 200 . 300 . −40 . −30 . −20 . −10 . 0 . ·103 . time (s) . Normalized log-likelihood (a) Non-stochastic learning . 0 . 50 . 100 . −40 . −30 . −20 . −10 . 0 . ·103 . time (s) (b) Stochastic vs. non-stochastic Figure 2: n = 150, a = 1. Table 2: Average runtime and performance on the GENES dataset for N1 = N2 = 100 PICARD KRK-PICARD KRK-PICARD (stochastic) Average runtime 161.5 ± 17.7 s 8.9 ± 0.2 s 1.2 ± 0.02 s NLL increase (1st iter.) (2.81 ± 0.03) · 104 (2.96 ± 0.02) · 104 (3.13 ± 0.04) · 104 6 Conclusion and future work We introduced KRONDPPS, a variant of DPPs with kernels structured as the Kronecker product of m smaller matrices, and showed that typical operations over DPPs such as sampling and learning the kernel from data can be made efficient for KRONDPPS on previously untractable ground set sizes. By carefully leveraging the properties of the Kronecker product, we derived for m = 2 a lowcomplexity algorithm to learn the kernel from data which guarantees positive iterates and a monotonic increase of the log-likelihood, and runs in O(nκ3 + N 2) time. This algorithm provides even more significant speed-ups and memory gains in the stochastic case, requiring only O(N 3/2 +Nκ2) time and O(N + κ2) space. Experiments on synthetic and real data showed that KRONDPPS can be learned efficiently on sets large enough that L does not fit in memory. Our experiments showed that KRONDPP’s reduced number of parameters (compared to full kernels) did not impact its performance noticeably. However, a more in-depth investigation of its expressivity may be valuable for future study. Similarly, a deeper study of initialization procedures for DPP learning algorithms, including KRK-PICARD, is an important question. While discussing learning the kernel, we showed that L1 and L2 cannot be updated simultaneously in a CCCP-style iteration since g is not convex over (S1, S2). However, it can be shown that g is geodesically convex over the Riemannian manifold of positive definite matrices, which suggests that deriving an iteration which would take advantage of the intrinsic geometry of the problem may be a viable line of future work. KRONDPPS also enable fast sampling, in O(N 3/2 + Nk3) operations when using two sub-kernels, and in O(Nk3) when using three sub-kernels. This speedup allows for exact sampling at comparable or even better costs than previous algorithms for approximate sampling. However, the subset size k is still limiting, due to the O(Nk3) cost of sampling and learning. A key aspect of future work on obtaining truly scalable DPPs is to overcome this computational bottleneck. Acknowledgements SS acknowledges partial support from NSF grant IIS-1409802. 8 References [1] R. Affandi, A. Kulesza, E. Fox, and B. Taskar. Nyström approximation for large-scale Determinantal Point Processes. In Artificial Intelligence and Statistics (AISTATS), 2013. [2] R. Affandi, E. Fox, R. Adams, and B. Taskar. Learning the parameters of Determinantal Point Process kernels. In ICML, 2014. [3] N. K. Batmanghelich, G. Quon, A. Kulesza, M. Kellis, P. Golland, and L. Bornn. Diversifying sparsity using variational determinantal point processes. arXiv:1411.6307, 2014. [4] R. Bhatia. Positive Definite Matrices. Princeton University Press, 2007. [5] A. Borodin. Determinantal point processes. arXiv:0911.1153, 2009. [6] W. Chao, B. Gong, K. Grauman, and F. Sha. Large-margin determinantal point processes. In Uncertainty in Artificial Intelligence (UAI), 2015. [7] L. Decreusefond, I. Flint, N. Privault, and G. L. Torrisi. Determinantal point processes, 2015. [8] S. Flaxman, A. Wilson, D. Neill, H. Nickisch, and A. Smola. Fast Kronecker inference in Gaussian processes with non-Gaussian likelihoods. In ICML, pages 607–616, 2015. [9] M. Gartrell, U. Paquet, and N. Koenigstein. Low-rank factorization of determinantal point processes for recommendation. arXiv:1602.05436, 2016. [10] J. Gillenwater, A. Kulesza, E. Fox, and B. Taskar. Expectation-Maximization for learning Determinantal Point Processes. In NIPS, 2014. [11] O. Goldschmidt, D. Nehme, and G. Yu. Note: On the set-union knapsack problem. Naval Research Logistics, 41:833–842, 1994. [12] J. B. Hough, M. Krishnapur, Y. Peres, and B. Virág. Determinantal processes and independence. Probability Surveys, 3(206–229):9, 2006. [13] B. Kang. Fast determinantal point process sampling with application to clustering. In Advances in Neural Information Processing Systems 26, pages 2319–2327. Curran Associates, Inc., 2013. [14] A. Krause, A. Singh, and C. Guestrin. Near-optimal sensor placements in Gaussian processes: theory, efficient algorithms and empirical studies. JMLR, 9:235–284, 2008. [15] A. Kulesza. Learning with Determinantal Point Processes. PhD thesis, University of Pennsylvania, 2013. [16] A. Kulesza and B. Taskar. k-DPPs: Fixed-size Determinantal Point Processes. In ICML, 2011. [17] A. Kulesza and B. Taskar. Determinantal Point Processes for machine learning, volume 5. Foundations and Trends in Machine Learning, 2012. [18] F. Lavancier, J. Møller, and E. Rubak. Determinantal point process models and statistical inference. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 77(4):853–877, 2015. [19] C. Li, S. Jegelka, and S. Sra. Efficient sampling for k-determinantal point processes. arXiv:1509.01618, 2015. [20] C. Li, S. Jegelka, and S. Sra. Fast DPP sampling for Nyström with application to kernel methods. arXiv:1603.06052, 2016. [21] H. Lin and J. Bilmes. Learning mixtures of submodular shells with application to document summarization. In Uncertainty in Artificial Intelligence (UAI), 2012. [22] C. V. Loan and N. Pitsianis. Approximation with kronecker products. In Linear Algebra for Large Scale and Real Time Applications, pages 293–314. Kluwer Publications, 1993. [23] R. Lyons. Determinantal probability measures. Publications Mathématiques de l’Institut des Hautes Études Scientifiques, 98(1):167–212, 2003. [24] O. Macchi. The coincidence approach to stochastic point processes. Adv. Appl. Prob., 7(1), 1975. [25] Z. Mariet and S. Sra. Fixed-point algorithms for learning determinantal point processes. In ICML, 2015. [26] Z. Mariet and S. Sra. Diversity networks. Int. Conf. on Learning Representations (ICLR), 2016. URL arXiv:1511.05077. [27] J. Martens and R. B. Grosse. Optimizing neural networks with Kronecker-factored approximate curvature. In ICML, 2015. [28] G. Wu, Z. Zhang, and E. Y. Chang. Kronecker factorization for speeding up kernel machines. In SIAM Data Mining (SDM), pages 611–615, 2005. [29] A. L. Yuille and A. Rangarajan. The concave-convex procedure (cccp). In Advances in Neural Information Processing Systems 14, pages 1033–1040. MIT Press, 2002. [30] X. Zhang, F. X. Yu, R. Guo, S. Kumar, S. Wang, and S.-F. Chang. Fast orthogonal projection based on kronecker product. In ICCV, 2015. [31] T. Zhou, Z. Kuscsik, J.-G. Liu, M. Medo, J. R. Wakeling, and Y.-C. Zhang. Solving the apparent diversityaccuracy dilemma of recommender systems. PNAS, 107(10):4511–4515, 2010. 9 | 2016 | 430 |
6,362 | Normalized Spectral Map Synchronization Yanyao Shen UT Austin Austin, TX 78712 shenyanyao@utexas.edu Qixing Huang TTI Chicago and UT Austin Austin, TX 78712 huangqx@cs.utexas.edu Nathan Srebro TTI Chicago Chicago, IL 60637 nati@ttic.edu Sujay Sanghavi UT Austin Austin, TX 78712 sanghavi@mail.utexas.edu Abstract Estimating maps among large collections of objects (e.g., dense correspondences across images and 3D shapes) is a fundamental problem across a wide range of domains. In this paper, we provide theoretical justifications of spectral techniques for the map synchronization problem, i.e., it takes as input a collection of objects and noisy maps estimated between pairs of objects along a connected object graph, and outputs clean maps between all pairs of objects. We show that a simple normalized spectral method (or NormSpecSync) that projects the blocks of the top eigenvectors of a data matrix to the map space, exhibits surprisingly good behavior — NormSpecSync is much more efficient than state-of-the-art convex optimization techniques, yet still admitting similar exact recovery conditions. We demonstrate the usefulness of NormSpecSync on both synthetic and real datasets. 1 Introduction The problem of establishing maps (e.g., point correspondences or transformations) among a collection of objects is connected with a wide range of scientific problems, including fusing partially overlapped range scans [1], multi-view structure from motion [2], re-assembling fractured objects [3], analyzing and organizing geometric data collections [4] as well as DNA sequencing and modeling [5]. A fundamental problem in this domain is the so-called map synchronization, which takes as input noisy maps computed between pairs of objects, and utilizes the natural constraint that composite maps along cycles are identity maps to obtain improved maps. Despite the importance of map synchronization, the algorithmic advancements on this problem remain limited. Earlier works formulate map synchronization as solving combinatorial optimizations [1, 6, 7, 8]. These formulations are restricted to small-scale problems and are susceptible to local minimums. Recent works establish the connection between the cycle-consistency constraint and the low-rank property of the matrix that stores pairwise maps in blocks; they cast map synchronization as low-rank matrix inference [9, 10, 11]. These techniques exhibit improvements on both the theoretical and practical sides. In particular, they admit exact recovery conditions (i.e., on the underlying maps can be recovered from noisy input maps). Yet due to the limitations of convex optimization, all of these methods do not scale well to large-scale datasets. In contrast to convex optimizations, we demonstrate that spectral techniques work remarkably well for map synchronization. We focus on the problem of synchronizing permutations and introduce a robust and efficient algorithm that consists of two simple steps. The first step computes the top eigenvectors of a data matrix that encodes the input maps, and the second step rounds each block of 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. the top-eigenvector matrix into a permutation matrix. We show that such a simple algorithm possesses a remarkable denoising ability. In particular, its exact recovery conditions match the state-of-the-art convex optimization techniques. Yet computation-wise, it is much more efficient, and such a property enables us to apply the proposed algorithm on large-scale dataset (e.g., many thousands of objects). Spectral map synchronization has been considered in [12, 13] for input observations between all pairs of objects. In contrast to these techniques, we consider incomplete pair-wise observations, and provide theoretical justifications on a much more practical noise model. 2 Algorithm In this section, we describe the proposed algorithm for permutation synchronization. We begin with the problem setup in Section 2.1. Then we introduce the algorithmic details in Section 2.2. 2.1 Problem Setup Suppose we have n objects S1, · · · , Sn. Each object is represented by m points (e.g., feature points on images and shapes). We consider bijective maps φij : Si →Sj, 1 ≤i, j ≤n between pairs of objects. Following the convention, we encode each such map φij as a permutation matrix Xij ∈Pm, where Pm is the space of permutation matrices of dimension m: Pm := {X|X ∈[0, 1]m×m, X1m = 1m, XT 1m = 1m}, where 1m = (1, · · · , 1)T ∈Rm is the vector whose elements are 1. The input permutation synchronization consists of noisy permutations Xin ij ∈G along a connected object graph G. As described in [4, 9], a widely used pipeline to generate such input is to 1) establish the object graph G by connecting each object and similar objects using object descriptors (e.g., HOG [14] for images) , and 2) apply off-the-shelf pair-wise object matching methods to compute the input pair-wise maps (e.g., SIFTFlow [15] for images and BIM [16] for 3D shapes). The output consists of improved maps between all of objects Xij, 1 ≤i, j ≤n. 2.2 Algorithm We begin with defining a data matrix Xobs ∈Rnm×nm that encodes the initial pairwise maps in blocks: Xobs ij = ( 1 √ didj Xin ij, (i, j) ∈G 0, otherwise (1) where di := |{Sj|(Si, Sj) ∈G}| is the degree of object Si in graph G. Remark 1. Note that the way we encode the data matrix is different from [12, 13] in the sense that we follow the common strategy for handling irregular graphs and use a normalized data matrix. The proposed algorithm is motivated from the fact that when the input pair-wise maps are correct, the correct maps between all pairs of objects can be recovered from the leading eigenvectors of Xobs: Proposition 2.1. Suppose there exist latent maps (e.g., the ground-truth maps to one object) Xi, 1 ≤ i ≤n so that Xin ij = XT j Xi, (i, j) ∈G. Denote W ∈Rnm×m as the matrix that collects the first m eigenvectors of Xobs in its columns. Then the underlying pair-wise maps can be computed from the corresponding matrix blocks of matrix WW T : XT j Xi = Pn i=1 di p didj (WW T )ij, 1 ≤i, j ≤n. (2) The key insight of the proposed approach is that even when the input maps are noisy (i.e., the blocks of Xobs are corrupted), the leading eigenvectors of Xobs are still stable under these perturbations (we will analyze this stability property in Section 3). This motivates us to design a simple two-step permutation synchronization approach called NormSpecSync. The first step of NormSpecSync computes the leading eigenvectors of W; the second step of NormSpecSync rounds the induced 2 Algorithm 1 NormSpecSync Input: Xobs based on (1), δmax Initialize W0: set W0 as an initial guess for the top-m orthonormal eigenvectors, k ←0 while ∥W (k) −W (k−1)∥> δmax do W (k+1)+ = Xobs · W (k), W (k+1)R(k+1) = W (k+1)+, (QR factorization), k ←k + 1. end while Set W = W (k) and X spec i1 = (WW T )i1. Round each X spec i1 into the corresponding Xi1 by solving (3). Output: Xij = XT j1Xi1, 1 ≤i, j ≤n. matrix blocks (2) into permutations. In the following, we elaborate these two steps and analyze the complexity. Algorithm 1 provides the pseudo-code. Leading eigenvector computation. Since we only need to compute the leading m eigenvectors of Xobs, we propose to use generalized power method. This is justified by the observation that usually there exists a gap between λm and λm+1. In fact, when the input pair-wise maps are correct, it is easy to derive that the leading eigenvectors of Xobs are given by: λ1(Xobs) = · · · = λm(Xobs) = 1, λm+1(Xobs) = λn−1(G), where λn−1(G) is the second largest eigenvalue of the normalized adjacency matrix of G. As we will see later, the eigen-gap λm(Xobs) −λm+1(Xobs) is still persistent in the presence of corrupted pair-wise maps, due to the stability of eigenvalues under perturbation. Projection onto Pm. Denote Xspec ij := Pn i=1 di √ didj (WW T )ij. Since the underlying ground-truth maps Xij, 1 ≤i, j ≤n obey Xij = XT jkXik, 1 ≤i, j ≤n for any fixed k, we only need to round Xspec ik into Xik. Without losing generality, we set k = 1 in this paper. The rounding is done by solving the following constrained optimization problem, which projects Xobs i1 onto the space of permutations via the Frobenius norm: Xi1 = arg min X∈Pm ∥X −Xobs i1 ∥2 F = arg min X∈Pm ∥X∥2 F + ∥Xobs i1 ∥2 F −2⟨X, Xobs i1 ⟩ = arg max X∈Pm ⟨X, Xobs i1 ⟩. (3) The optimization problem described in (3) is the so-called linear assignment problem, which can be solved exactly using the Hungarian algorithm whose complexity is O(m3) (c.f. [17]). Note that the optimal solution of (3) is invariant under global scaling and shifting of Xobs i1 , so we omit Pn i=1 di √ didj and 1 m11T when generating Xobs ij (See Algorithm 1). Time complexity of NormSpecSync. Each step of the generalized power method consists of a matrixvector multiplication and a QR factorization. The complexity of the matrix-vector multiplication, which leverages of the sparsity in Xobs, is O(nE · m2), where nE is the number of edges in G. The complexity of each QR factorization is O(nm3). As we will analyze laser, generalized power method converges linearly, and setting δmax = 1/n provides a sufficiently accurate estimation of the leading eigenvectors. So the total time complexity of the Generalized power method is O (nEm2 + nm3 log(n)). The time complexity of the rounding step is O(nm3). In summary, the total complexity of NormSpecSync is O (nEm2 + nm3 log(n)). In comparison, the complexity of the SDP formulation [9], even when it is solved using the fast ADMM method (alternating direction of multiplier method), is at least O(n3m3nadmm. So NormSpecSync exhibits significant speedups when compared to SDP formulations. 3 3 Analysis In this section, we provide an analysis of NormSpecSync under a generalized Erd˝os-Rényi noise model. 3.1 Noise Model The noise model we consider is given by two parameters m and p. Specifically, we assume the observation graph G is fixed. Then independently for each edge (i, j) ∈E, Xin ij = Im with probability p Pij with probability 1 −p (4) where Pij ∈Pm is a random permutation. Remark 2. The noise model described above assumes the underlying permutations are identity maps. In fact, one can assume a generalized noise model Xin ij = XT j1Xi1 with probability p Pij with probability 1 −p where Xi1, 1 ≤i ≤n are pre-defined underlying permutations from object Si to the first object S1. However, since Pij are independent of Xi1. It turns out the model described above is equivalent to Xj1Xin ijXT i1 = Im with probability p Pij with probability 1 −p Where Pij are independent random permutations. This means it is sufficient to consider the model described in (4). Remark 3. The fundamental difference between our model and the one proposed in [11] or the ones used in low-rank matrix recovery [18] is that the observation pattern (i.e., G) is fixed, while in other models it also follows a random model. We argue that our assumption is more practical because the observation graph is constructed by comparing object descriptors and it is dependent on the distribution of the input objects. On the other hand, fixing G significantly complicates the analysis of NormSpecSync, which is the main contribution of this paper. 3.2 Main Theorem Now we state the main result of the paper. Theorem 3.1. Let dmin := min1≤i≤n di, davg := P i di/n, and denote ρ as the second top eigenvalue of normalized adjacency matrix of G. Assume dmin = Ω(√n ln3 n), davg = O(dmin), ρ < min{p, 1/2}. Then under the noise model described above, NormSpecSync recovers the underlying pair-wise maps with high probability if p > C · ln3 n dmin/√n, (5) for some constant C. Proof Roadmap. The proof of Theorem 3.1 combines two stability bounds. The first one considers the projection step: Proposition 3.1. Consider a permutation matrix X = (xij) ∈Pm and another matrix X = (xij) ∈ Rm×m. If ∥X −X∥< 1 2, then X = arg min Y ∈Pm ∥Y −X∥2 F . Proof. The proof is quite straight-forward. In fact, ∥X −X∥∞≤∥X −X∥< 1 2. 4 Varying graph density Graph density 0.1 0.3 0.5 0.7 0.9 p-true 0.1 0.2 0.3 0.4 0.5 Varying graph density Graph density 0.1 0.3 0.5 0.7 0.9 p-true 0.1 0.2 0.3 0.4 0.5 Varying graph density Graph density 0.1 0.3 0.5 0.7 0.9 p-true 0.1 0.2 0.3 0.4 0.5 (a) NormSpecSync (2.25 seconds) (b) SDP (203.12 seconds) (c) DiffSync(1.07 seconds) Figure 1: Comparisons between NormSpecSync, SDP[9], DiffSync[13] on the noise model described in Sec. 2. This means the corresponding element xij of each non-zero element in xij is dominant in its row and column, i.e., xij ̸= 0 ↔xij > max(max k̸=j xik, max k̸=i xkj), which ends the proof. ■ The second bound concerns the block-wise stability of the leading eigenvectors of Xobs: Lemma 3.1. Under the assumption of Theorem 3.1, then w.h.p.,
Pn i=1 di √did1 (WW T )i1 −Im
< 1 3, 1 ≤i ≤n. (6) It is easy to see that we can prove Theorem 3.1 by combing Lemma 3.1 and Prop. 3.1. Yet unlike Prop. 3.1, the proof of Lemma 3.1 is much harder. The major difficulty is that (6) requires controlling each block of the leading eigenvectors, namely, it requires a L∞bound, whereas most stability results on eigenvectors are based on the L2-norm. Due to space constraint, we defer the proof of Lemma 3.1 to Appendix A and the supplemental material. ■ Near-optimality of NormSpecSync. Theorem 3.1 implies that NormSpecSync is near-optimal with respect to the information theoretical bound described in [19]. In fact, when G is a clique, (5) becomes p > C · ln3(n) √n , which aligns with the lower bound in [19] up to a polylogarithmic factor. Following the model described in [19], we can also assume that the observation graph G is sampled with a density factor q, namely, two objects are connected independently with probability q. In this case, it is easy to see that dmin > O(nq/ ln n) w.h.p., and (5) becomes p > C · ln4 n √nq . This bound also stays within a polylogarithmic factor from the lower bound in [19], indicating the near-optimality of NormSpecSync. 4 Experiments In this section, we perform quantitative evaluations of NormSpecSync on both synthetic and real examples. Experimental results show that NormSpecSync is superior to state-of-the-art map synchronization methods in the literature. We organize the remainder of this section as follows. In Section 4.1, we evaluate NormSpecSync on synthetic examples. Then in section 4.2, we evaluate NormSpecSync on real examples. 4.1 Quantitative Evaluations on Synthetic Examples We generate synthetic data by following the same procedure described in Section 2. Specifically, each synthetic example is controlled by three parameters G, m, and p. Here G specifies the input graph; m describes the size of each permutation matrix; p controls the noise level of the input maps. The input maps follow a generalized Erdos-Renyi model, i.e., independently for each edge (i, j) ∈G in the input graph, with probability p the input map Xin ij = Im, and otherwise Xin ij is a random permutation. To simplify the discussion, we fix m = 10, n = 200 and vary the observation graph G and p to evaluate NormSpecSync and existing algorithms. 5 Varying vertex degrees Irregularty 0.0 0.1 0.2 0.3 0.4 p-true 0.1 0.2 0.3 0.4 0.5 Varying vertex degrees Irregularty 0.0 0.1 0.2 0.3 0.4 p-true 0.1 0.2 0.3 0.4 0.5 (a) NormSpecSync (b) SpecSync Figure 2: Comparison between NorSpecSync and SpecSync on irregular observation graphs. Dense graph versus sparse graph. We first study the performance of NormSpecSync with respect to the density of the graph. In this experiment, we control the density of G by following a standard Erd˝os-Rényi model with parameter q, namely independently, each edge is connected with probability q. For each pair of fixed p and q, we generate 10 examples. We then apply NormSpecSync and count the ratio that the underlying permutations are recovered. Figure 1(a) illustrates the success rate of NormSpecSync on a grid of samples for p and q. Blue and yellow colors indicate it succeeded and failed on all the examples, respectively, and the colors in between indicate a mixture of success and failure. We can see that NormSpecSync tolerates more noise when the graph becomes denser. This aligns with our theoretical analysis result. NormSpecSync versus SpecSync. We also compare NormSpecSync with SpecSync [12], and show the advantage of NormSpecSync on irregular observation graphs. To this end, we generate G using a different model. Specifically, we let the degree of the vertex to be uniformly distribute between ( 1 2 −q)n and ( 1 2 + q)n. As illustrated in Figure 2, when q is small, i.e., all the vertices have similar degrees, the performance of NormSpecSync and SpecSync are similar. When q is large, i.e., G is irregular, NormSpecSync tend to tolerate more noise than SpecSync. This shows the advantage of utilizing a normalized data matrix. NormSpecSync versus DiffSync. We proceed to compare NormSpecSync with DiffSync [13], which is a permutation synchronization method based on diffusion distances. NormSpecSync and DiffSync exhibit similar computation efficiency. However, NormSpecSync can tolerate significantly more noise than DiffSync, as illustrated in Figure 1(c). NormSpecSync versus SDP. Finally, we compare NormSpecSync with SDP [9], which formulates permutation synchronization as solving a semidefinite program. As illustrated in Figure 1(b), the exact recovery ability of NormSpecSync and SDP are similar. This aligns with our theoretical analysis result, which shows the near-optimality of NormSpecSync under the noise model of consideration. Yet computationally, NormSpecSync is much more efficient than SDP. The averaged running time for SpecSync is 2.25 second. In contrast, SDP takes 203.12 seconds in average. 4.2 Quantitative Evaluations on Real Examples In this section, we present quantitative evaluation of NormSpecSync on real datasets. CMU Hotel/House. We first evaluate NormSpecSync on CMU Hotel and CMU House datasets [20]. The CMU Hotel dataset contains 110 images, where each image has 30 marked feature points. In our experiment, we estimate the initial map between a pair of images using RANSAC [21]. We consider two observation graphs: a clique observation graph Gfull, where we have initial maps computed between all pairs of images, and a sparse observation graph Gsparse. Gsparse is constructed to only connect similar images. In this experiment, we connect an edge between two images if the difference in their HOG descriptors [22] is smaller than 1 2 of the average descriptor differences among all pairs of images. Note that Gsparse shows high variance in terms of vertex 6 Euclidean distance (pixels) 0 1 2 3 4 5 6 % correspondences 0 10 20 30 40 50 60 70 80 90 100 CMU-G-Full RANSAC DiffSync SpecSync NonSpecSync SDP Euclidean distance (pixels) 0 1 2 3 4 5 6 % correspondences 0 10 20 30 40 50 60 70 80 90 100 CMU-G-Sparse RANSAC DiffSync SpecSync NonSpecSync SDP Geodesic distance (diameter) 0 0.05 0.1 0.15 0.2 % correspondences 0 10 20 30 40 50 60 70 80 90 100 SCAPE-G-Full RANSAC DiffSync SpecSync NonSpecSync SDP Geodesic distance (diameter) 0 0.05 0.1 0.15 0.2 % correspondences 0 10 20 30 40 50 60 70 80 90 100 SCAPE-G-Sparse RANSAC DiffSync SpecSync NonSpecSync SDP Figure 3: Comparison between NorSpecSync, SpecSync, DiffSync and SDP on CMU Hotel/House and SCAPE. In each dataset, we consider a full observation graph and a sparse observation graph that only connects potentially similar objects. degree. The CMU House dataset is similar to CMU Hotel, containing 100 images and exhibiting slightly bigger intra-cluster variability than CMU Hotel. We construct the observation graphs and the initial maps in a similar fashion. For quantitative evaluation, we measure the cumulative distribution of distances between the predicted target points and the ground-truth target points. Figure 3(Left) compares NormSpecSync with the SDP formulation, SpecSync, and DiffSync. On both full and sparse observation graphs, we can see that NormSpecSync, SDP and SpecSync are superior to DiffSync. The performance of NormSpecSync and SpecSync on Gfull is similar, while on Gsparse, NormSpecSync shows a slight advantage, due to its ability to handle irregular graphs. Moreover, although the performance of NormSpecSync and SDP are similar, SDP is much slower than NormSpecSync. For example, on Gsparse, SDP took 1002.4 seconds, while NormSpecSync only took 3.4 seconds. SCAPE. Next we evaluate NormSpecSync on the SCAPE dataset. SCAPE consists of 71 different poses of a human subject. We uniformly sample 128 points on each model. Again we consider a full observation graph Gfull and a sparse observation graph Gsparse. Gsparse is constructed in the same way as above, except we use the shape context descriptor [4] for measuring the similarity between 3D models. In addition, the initial maps are computed from blended-intrinsic-map [16], which is the state-of-the-art technique for computing dense correspondences between organic shapes. For quantitative evaluation, we measure the cumulative distribution of geodesic distances between the predicted target points and the ground-truth target points. As illustrated in Figure 3(Right), the relative performance between NormSpecSync and the other three algorithms is similar to CMU Hotel and CMU House. In particular, NormSpecSync shows an advantage over SpecSync on Gsparse. Yet in terms of computational efficiency, NormSpecSync is far better than SDP. 5 Conclusions In this paper, we propose an efficient algorithm named NormSpecSync towards solving the permutation synchronization problem. The algorithm adopts a spectral view of the mapping problem and exhibits surprising behavior both in terms of computation complexity and exact recovery conditions. The theoretical result improves upon existing methods from several aspects, including a fixed obser7 vation graph and a practical noise method. Experimental results demonstrate the usefulness of the proposed approach. There are multiple opportunities for future research. For example, we would like to extend NormSpecSync to handle the case where input objects only partially overlap with each other. In this scenario, developing and analyzing suitable rounding procedures become subtle. Another example is to extend NormSpecSync for rotation synchronization, e.g., by applying Spectral decomposition and rounding in an iterative manner. Acknowledgement. We would like to thank the anonymous reviewers for detailed comments on how to improve the paper. The authors would like to thank the support of DMS-1700234, CCF-1302435, CCF-1320175, CCF-1564000, CNS-0954059, IIS-1302662, and IIS-1546500. A Proof Architecture of Lemma 3.1 In this section, we provide a roadmap for the proof of Lemma 3.1. The detailed proofs are deferred to the supplemental material. Reformulate the observation matrix. The normalized adjacency matrix ¯A = D−1 2 AD−1 2 can be decomposed as ¯A = ssT + V ΛV T , where the dominant eigenvalue is 1 and corresponding eigenvector is s. We reformulate the observation matrix as 1 pM = ¯A ⊗Im + ˜N, and it is clear to see that the ground truth result relates to the term (ssT ) ⊗Im, while the noise comes from two terms: (V ΛV T ) ⊗Im and ˜N. More specifically, the noise not only comes from the randomness of uncertainty of the measurements, but also from the graph structure, and we use ρ to represent the spectral norm of Λ. When the graph is disconnected or near disconnected, ρ is close to 1 and it is impossible to recover the ground truth. Bound the spectral norm of ˜N. The noise term ˜N consists of random matrices with mean zero in each block. In a complete graph, the spectral norm is bounded by O( 1 p√n), however, when considering the graph structure, we give a O( 1 p√dmin ) bound. Measure the block-wise distance between U and s ⊗Im. Let M = UΣU T + U2Σ2U T 2 , we want to show the distance between U and s ⊗1m is small, where the distance function dist(·) is defined as: dist(U, V ) = min R:RRT =I
U −V R
B, (7) and this B−norm for any matrix X represented in the form X = [XT 1 , · · · , XT n ]T ∈Rmn×m is defined as ∥X∥B = max i ∥Xi∥F . (8) More specifically, we bound the distance between U and s ⊗Im by constructing a series of matrix {Ak}, and we can show for some k = O(log n), the distances from s ⊗Ak to both U and s ⊗Im are small. Therefore, by using the triangle inequality, we can show that U and s ⊗Im is close. Sketch proof of Lemma 3.1. Once we are able to show that there exists some rotation matrix R, such that dist(U, s ⊗Im) is in the order of o( 1 √n), then it is straightforward to prove Lemma 3.1. Intuitively, this is because the measurements from the eigenvectors is close enough to the ground truth, hence their second moment will still be close. Formally speaking,
UiU T j −(si · Im)(sj · Im)
(9) =
UiRRT U T j −(si · Im)(sj · Im)
(10) =
UiR(RT U T j −(sj · Im)T ) + (UiR −si · Im)(sj · Im)T
(11) ≤
Ui
· dist(U, s ⊗Im) + dist(U, s ⊗Im) ·
sj · Im
(12) On the other hand, notice that
Pn i=1 di p didj UiU T j −Im
= Pn i=1 di p didj
UiU T j −(si · Im)(sj · Im)
, (13) and we only need to show that (13) is in the order of o(1). The details are included in the supplemental material. 8 References [1] D. F. Huber, “Automatic three-dimensional modeling from reality,” Tech. Rep., 2002. [2] D. Crandall, A. Owens, N. Snavely, and D. Huttenlocher, “Discrete-continuous optimization for large-scale structure from motion,” in IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2011, pp. 3001–3008. [3] Q.-X. Huang, S. Flöry, N. Gelfand, M. Hofer, and H. Pottmann, “Reassembling fractured objects by geometric matching,” in ACM SIGGRAPH 2006 Papers, 2006, pp. 569–578. [4] V. G. Kim, W. Li, N. Mitra, S. DiVerdi, and T. Funkhouser, “Exploring collections of 3D models using fuzzy correspondences,” Transactions on Graphics (Proc. of SIGGRAPH 2012), vol. 31, no. 4, Aug. 2012. [5] W. Marande and G. Burger, “Mitochondrial dna as a genomic jigsaw puzzle,” Science, vol. 318, Jul. 2007. [6] C. Zach, M. Klopschitz, and M. Pollefeys, “Disambiguating visual relations using loop constraints.” in IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2010, pp. 1426–1433. [7] D. Crandall, A. Owens, N. Snavely, and D. Huttenlocher, “Discrete-continuous optimization for large-scale structure from motion,” in IEEE Conference on Computer Vision and Pattern Recognition (CVPR). IEEE, 2011, pp. 3001–3008. [8] A. Nguyen, M. Ben-Chen, K. Welnicka, Y. Ye, and L. Guibas, “An optimization approach to improving collections of shape maps,” in Eurographics Symposium on Geometry Processing (SGP), 2011, pp. 1481– 1491. [9] Q. Huang and L. Guibas, “Consistent shape maps via semidefinite programming,” Computer Graphics Forum, Proc. Eurographics Symposium on Geometry Processing (SGP), vol. 32, no. 5, pp. 177–186, 2013. [10] L. Wang and A. Singer, “Exact and stable recovery of rotations for robust synchronization,” CoRR, vol. abs/1211.2441, 2012. [11] Y. Chen, L. J. Guibas, and Q. Huang, “Near-optimal joint object matching via convex relaxation,” 2014. [Online]. Available: http://arxiv.org/abs/1402.1473 [12] D. Pachauri, R. Kondor, and V. Singh, “Solving the multi-way matching problem by permutation synchronization,” in Advances in Neural Information Processing Systems, 2013, pp. 1860–1868. [13] D. Pachauri, R. Kondor, G. Sargur, and V. Singh, “Permutation diffusion maps (pdm) with application to the image association problem in computer vision,” in Advances in Neural Information Processing Systems, 2014, pp. 541–549. [14] N. Dalal and B. Triggs, “Histograms of oriented gradients for human detection,” in Proceedings of the 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR’05) - Volume 1 Volume 01, ser. CVPR ’05, 2005, pp. 886–893. [15] C. Liu, J. Yuen, A. Torralba, J. Sivic, and W. T. Freeman, “Sift flow: Dense correspondence across different scenes,” in Proceedings of the 10th European Conference on Computer Vision: Part III, ser. ECCV ’08, 2008, pp. 28–42. [16] V. G. Kim, Y. Lipman, and T. Funkhouser, “Blended intrinsic maps,” in ACM Transactions on Graphics (TOG), vol. 30, no. 4. ACM, 2011, p. 79. [17] R. Burkard, M. Dell’Amico, and S. Martello, Assignment Problems. Philadelphia, PA, USA: Society for Industrial and Applied Mathematics, 2009. [18] E. J. Candès, X. Li, Y. Ma, and J. Wright, “Robust principal component analysis?” J. ACM, vol. 58, no. 3, pp. 11:1–11:37, Jun. 2011. [Online]. Available: http://doi.acm.org/10.1145/1970392.1970395 [19] Y. Chen, C. Suh, and A. J. Goldsmith, “Information recovery from pairwise measurements: A shannontheoretic approach,” CoRR, vol. abs/1504.01369, 2015. [20] T. S. Caetano, L. Cheng, Q. V. Le, and A. J. Smola, “Learning graph matching,” in Computer Vision, 2007. ICCV 2007. IEEE 11th International Conference on. IEEE, 2007, pp. 1–8. [21] M. A. Fischler and R. C. Bolles, “Random sample consensus: A paradigm for model fitting with applications to image analysis and automated cartography,” Commun. ACM, vol. 24, no. 6, pp. 381–395, Jun. 1981. [22] R. Osada, T. Funkhouser, B. Chazelle, and D. Dobkin, ACM Trans. Graph., vol. 21, no. 4, pp. 807–832, 2002. 9 | 2016 | 431 |
6,363 | Error Analysis of Generalized Nyström Kernel Regression Hong Chen Computer Science and Engineering University of Texas at Arlington Arlington, TX, 76019 chenh@mail.hzau.edu.cn Haifeng Xia Mathematics and Statistics Huazhong Agricultural University Wuhan 430070,China haifeng.xia0910@gmail.com Weidong Cai School of Information Technologies University of Sydney NSW 2006, Australia tom.cai@sydney.edu.au Heng Huang Computer Science and Engineering University of Texas at Arlington Arlington, TX, 76019 heng@uta.edu Abstract Nyström method has been successfully used to improve the computational efficiency of kernel ridge regression (KRR). Recently, theoretical analysis of Nyström KRR, including generalization bound and convergence rate, has been established based on reproducing kernel Hilbert space (RKHS) associated with the symmetric positive semi-definite kernel. However, in real world applications, RKHS is not always optimal and kernel function is not necessary to be symmetric or positive semi-definite. In this paper, we consider the generalized Nyström kernel regression (GNKR) with ℓ2 coefficient regularization, where the kernel just requires the continuity and boundedness. Error analysis is provided to characterize its generalization performance and the column norm sampling strategy is introduced to construct the refined hypothesis space. In particular, the fast learning rate with polynomial decay is reached for the GNKR. Experimental analysis demonstrates the satisfactory performance of GNKR with the column norm sampling. 1 Introduction The high computational complexity makes kernel methods unfeasible to deal with large-scale data. Recently, the Nyström method and its alternatives (e.g., the random Fourier feature technique [15], the sketching method [25]) have been used to scale up kernel ridge regression (KRR) [4, 23, 27]. The key step of Nyström method is to construct a subsampled matrix, which only contains part columns of the original empirical kernel matrix. Therefore, the sampling criterion on the matrix column affects heavily on the learning performance. The subsampling strategies of Nyström method can be categorized into two types: uniform sampling and non-uniform sampling. The uniform sampling is the simplest strategy, which has shown satisfactory performance on some applications [16, 23, 24]. From different theoretical aspects, several non-uniform sampling approaches have been proposed such as the square ℓ2 column-norm sampling [3, 4], the leverage score sampling [5, 8, 12], and the adaptive sampling [11]. Besides the sampling strategies, there exist learning bounds for Nyström kernel regression from three measurements: the matrix approximation [4, 5, 11], the coefficient approximation [9, 10], and the excess generalization error [2, 16, 24]. Despite rapid progress on theory and applications, the following critical issues should be further addressed for Nyström kernel regression. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. • Nyström regression with general kernel. The previous algorithms are mainly limited to KRR with symmetric and positive semi-definite kernels. For real-world applications, this restriction may be not necessary. Several general kernels have shown the competitive performance in machine learning, e.g., the indefinite kernels for regularized algorithms [14, 20, 26] and PCA [13]. Therefore, it is important to formulate the learning algorithm for Generalized Nyström Kernel Regression (GNKR). • Generalization analysis and sampling criterion. Previous theoretical results rely on the symmetric positive semi-definite (SPSD) matrix associated with a Mercer kernel [17]. However, this condition is not satisfied for GNKR, which induces the additional difficulty on error analysis. Can we get the generalization error analysis for GNKR? It is also interesting to explore the sampling strategy for GNKR, e.g., the column-norm sampling in [3, 4]. To address the above issues, we propose the GNKR algorithm and investigate its theoretical properties on generalization bound and learning rate. Inspired from the recent studies for data dependent hypothesis spaces [7, 19], we establish the error analysis for GNKR, which implies that the learning rate with polynomial decay can be reached under proper parameter selection. Meanwhile, we extend the ℓ2 column norm subsampling in the linear regression [16, 22] to the GNKR setting. The main contributions of this paper can be summarized as below: • GNKR with ℓ2 regularization. Due to the lack of Mercer condition associated with general kernel, coefficient regularization becomes a natural choice to replace the kernel norm regularization in KRR. Note that Nyström approximation has the similar role with the ℓ1 regularization in [7, 18, 20], which addresses the sample sparsity on hypothesis function. Hence, we formulate GNKR by combining the Nyström method and the least squares regression with ℓ2 regularization in [19, 21]. • Theoretical and empirical evaluations. From the view of learning with data dependent hypothesis spaces, theoretical analysis of GNKR is established to illustrate its generalization bound and learning rate. In particular, the fast learning rate arbitrarily close to O(m−1) is obtained under mild conditions, where m is the size of subsampled set. The effectiveness of GNKR is also supported by experiments on synthetic and real-world data sets. 2 Related Works Due to the flexibility and adaptivity, least squares regression algorithms with general kernel have been proposed involving various types of regularization, e.g., the ℓ1-regularizer [18, 21], the ℓ2-regularizer [19, 20], and the elastic net regularization [7]. For the Mercer kernel, these algorithms are related closely with the KRR, which has been well understand in learning theory. For the general kernel setting, theoretical foundations of regression with coefficient regularization have been studied recently via the analysis techniques with the operator approximation [20] and the empirical covering numbers [7, 18, 19]. Although rich results on theoretical analysis, the previous works mainly focus on the prediction accuracy without considering the computation complexity for large scale data. Nyström approximation has been studied extensively for kernel methods recently. Almost all existing studies are relied on the fast approximation of SPSD matrix associated with a Mercer kernel. For the fixed design setting, the expectation of the excess generalization error is bounded for least square regression with the regularizer in RKHS [1, 2]. Recently, the probabilistic error bounds have been estimated for Nyström KRR in [16, 24]. In [24], the fast learning rate with O(m−1) is derived for the fixed design regression under the conditions on kernel matrix eigenvalues. In [16], the convergence rate is obtained under the capacity assumption and the regularity assumption. It is worthy notice that the learning bound in [16] is based on the estimates of the sample error, the computation error, and the approximation error. Indeed, the computation error is related with the sampling subset and can be considered as the hypothesis error in [18], which is induced by the variance of hypothesis spaces. Differently from previous works, our theoretical analysis of GNKR is dependent on general continuous kernel and ℓ2 coefficient regularization. 3 Generalized Nyström Kernel Regression Let ρ be a probability distribution on Z := X × Y, where X ⊂Rd and Y ⊂R are viewed as the input space and the output space, respectively. Let ρ(·|x) be the conditional distribution of ρ for 2 given x ∈X and let F be a measurable function space on X. In statistical learning, the samples z := {zi}n i=1 = {(xi, yi)}n i=1 are drawn independently and identically from an unknown distribution ρ. The task of least squares regression is to find a prediction function f : X →R such that the expected risk E(f) = Z Z (y −f(x))2dρ(x, y) as small as possible. From the viewpoint of approximation theory, this means to search a good approximation of the regression function fρ(x) = Z Y ydρ(y|x) based on the empirical risk Ez(f) = 1 n n X i=1 (yi −f(xi))2. Let K : X × X →R be a continuous and bounded kernel function. Without loss of generality, we assume that κ := sup x,x′∈X K(x, x′) ≤1 and for all |y| ≤1 for all y ∈Y throughout this paper. Besides the given samples z, the hypothesis function space is crucial to reach well learning performance. The following data dependent hypothesis space has been used for kernel regression with coefficient regularization: Hn = n f(x) = n X i=1 ˜αiK(xi, x) : ˜α = (˜α1, ..., ˜αn) ∈Rn, x ∈X o . Given z, kernel regression with ℓ2 regularization [19, 20] is formulated as ˜fz = f˜αz = n X i=1 ˜αz,iK(xi, ·) (1) with ˜αz = arg min ˜α∈Rn n 1 n∥Knn˜α −Y ∥2 2 + λn˜αT ˜α o , where Knn = (K(xi, xj))n i,j=1, Y = (y1, · · · , yn)T , and λ > 0 is a regularization parameter. Even the positive semi-definiteness is not required for the kernel, (3) also can be solved by the following linear system (see Theorem 3.1 in [20]) (KT nnKnn + λn2In)˜α = KT nnY, (2) where In is the n-order unit matrix. From the viewpoint of learning function in Hn, (1) can be rewritten as ˜fz = arg min f∈Hn n Ez(f) + λn∥f∥2 ℓ2 o , (3) where ∥f∥2 ℓ2 = inf n n X i=1 ˜α2 i : f = n X i=1 ˜αiK(xi, ·) o . In a standard implementation of (2), the computational complexity is O(n3). This computation requirement becomes the bottleneck of (3) when facing large data sets. To reduce the computational burden, we consider to find the predictor in a smaller hypothesis space Hm = n f(x) = m X i=1 αiK(¯xi, x) : α = (α1, ..., αm) ∈Rm, x ∈X, {¯xi}m i=1 ⊂{xi}n i=1 o . 3 The generalized Nyström kernel regression (GNKR) can be formulated as fz = arg min f∈Hm n Ez(f) + λm∥f∥2 ℓ2 o . (4) Denote (Knm)ij = K(xi, ¯xj), (Kmm)jk = K(¯xi, ¯xj) for i ∈{1, ..., n}, j, k ∈{1, ..., m}. We can deduce that fz = m X i=1 αz,iK(¯xi, ·) with (KT nmKnm + λmnIm)αz = KT nmY. (5) The key problem of (4) is how to select the subset {¯xi}m i=1 such that the computational complexity can be decreased efficiently while satisfactory accuracy can be guaranteed. For the KRR, there are several strategies to select the subset with different motivations [5, 11, 12]. In this paper we preliminarily consider the following two strategies with low computational complexity: • Uniform Subsampling. The subset {¯xi}m i=1 is drawn uniformly at random from the input {xi}n i=1. • Column-norm Subsampling. The subset {¯xi}m i=1 is drawn from {xi}n i=1 independently with probabilities pi = ∥Ki∥2 Pn i=1 ∥Ki∥2 , where Ki = (K(x1, xi), ..., K(xn, xi))T ∈Rn. Some discussions for the column-norm subsampling will be provided in Section 4. 4 Learning Theory Analysis In this section, we will introduce our theoretical results on generalization bound and learning rate. The detailed proofs can be found in the supplementary materials. Inspired from analysis technique in [7, 19], we introduce the intermediate function for error decomposition firstly. Let F be the square integrable space on X with norm ∥· ∥L2ρX . For any bounded continuous kernel K : X × X →R, the integral operator LK : F →F is defined as LKf(x) = Z X K(x, t)f(t)dρX (t), ∀x ∈X, where ρX is the marginal distribution of ρ. Given F and LK, introduce the function space H = n g = LKf, f ∈F o with ∥g∥H = inf ∥f∥L2ρX : g = LKf . Since H is sample independent, the intermediate function can be constructed as gλ = LKfλ, where fλ = arg min f∈F n E(LKf) −E(fρ) + λ∥f∥2 L2 ρX o . (6) In learning theory, usually gλ is called as the regularized function and D(λ) = inf g∈H{E(g) −E(fρ) + λ∥g∥2 H} = E(LKfλ) −E(fρ) + λ∥fλ∥2 L2ρX is called the approximation error To further bridge the gap between gλ and fz, we construct the stepping stone function ˆgλ = 1 m m X i=1 fλ(¯xi)K(¯xi, ·). (7) The following condition on K is used in this paper, which has been well studied in learning theory literature [18, 19]. Examples include Gaussian kernel, the sigmoid kernel [17], and the fractional power polynomials [13]. 4 Definition 1 The kernel function K is a Cs kernel with s > 0 if there exists some constant cs > 0, such that |K(t, x) −K(t, x′)| ≤cs∥x −x′∥s 2, ∀t, x, x′ ∈X. The definition of fρ tells us |fρ(x)| ≤1, so it is natural to restrict the predictor to [−1, 1]. The projection operator π(f)(x) = min{1, f(x)}I{f(x) ≥0} + max{−1, f(x)}I{f(x) < 0} has been extensively used in learning theory analysis, e.g. [6]. It is a position to present our result on the generalization error bound. Theorem 1 Suppose that X is compact subset of Rd and K ∈Cs(X × X) for some s > 0. For any 0 < δ < 1, with confidence 1 −δ, there holds E(π(fz)) −E(fρ) ≤˜c1 log2(8/δ) (1 + m−1λ−1 + m−2λ−2 + n− 2 2+p λ−2)D(λ) + n− 2 2+p λ− p 2+p , where constant ˜c1 is independent of m, n, δ, and p = ( 2d/(d + 2s), if 0 < s ≤1; 2d/(d + 2), if 1 < s ≤1 + d/2; d/s, if s > 1 + d/2. (8) Theorem 1 is a general result that applies to Lipschitz continuous kernel. Although the statement appears somewhat complicated at first sight, it yields fast convergence rate on the error when specialized to particular kernels. Before doing so, let us provide a few heuristic arguments for intuition. Theorem 1 guarantees an upper bound of the form ∥π(fz) −fρ∥2 L2ρX ≤O c(m, n, λ) inf f {E(LKf) −E(fρ) + λ∥f∥2 L2ρX } + n− 2 2+p λ− p 2+p . (9) Note that a smaller value of λ reduces the approximation error term, but increases the second term associated with the sample error. This inequality demonstrates that the proper λ should be selected to balance the two terms. This quantitative relationship (9) also can be considered as the oracle inequality for GNKR, where the approximation error D(λ) only can be obtained by an oracle knowing the distribution. Theorem 1 tells us that the generalization bound of GNKR depends on the numbers of samples m, n, the continuous degree s, and the approximation error D(λ). In essential, the subsampling number m has double impact on generalization error: one is the complexity of data dependent hypothesis space Hm and the other is the selection of parameter λ. Now we introduce the characterization of approximation error, which has been studied in [19, 20]. Definition 2 The target function fρ can be approximated with exponent 0 < β ≤1 in H if there exists a constant cβ ≥1 such that D(λ) ≤cβλβ for any λ > 0. If the kernel is not symmetric or positive semi-definite, the approximation condition holds true for β = 2r 3 when fρ ∈L−r ˜ K ∈L2 ρX , where L ˜ K is the integral operator associated with ˜K(u, v) = R X K(u, x)K(v, x)dρX , (u, v) ∈X 2 (see [7]). Now we state our main results on the convergence rate. Theorem 2 Let X be a compact subset of Rd. Assume that fρ can be approximated with exponent 0 < β ≤1 in H and K ∈Cs(X × X) for some s > 0. Choose m ≤n 1 2+p and λ = m−θ for some θ > 0. For any 0 < δ < 1, with confidence 1 −δ, there holds E(π(fz)) −E(fρ) ≤˜c2 log2(8/δ)m−γ, where constant ˜c2 is independent of m, δ, and γ = min n 2 − pθ 2 + p, 2 + βθ −2θ, βθ, 1 + βθ −θ o . 5 Theorem 2 states the polynomial convergence rate of GNKR and indicates its dependence on the subsampling size m as n ≥m2+p. Similar observation also can be found in Theorem 2 [16] for Nyström KRR, where the fast learning rate also is relied on the grow of m under fixed hypothesis space complexity. However, even we do not consider the complexity of hypothesis space, the increase of m will add the computation complexity. Hence, a suitable size of m is a trade off between the approximation performance and the computation complexity. When p ∈(0, 2), m = n 1 2+p means that m can be chosen between n 1 4 and 1 2 under the conditions in Theorem 4. In particular, the fast convergence rate O(m−1) can be obtained as K ∈C∞, θ →1, and β →1. The most related works with Theorems 1 and 2 are presented in [16, 24], where learning bounds are established for Nyström KRR. Compared with the previous results, the features of this paper can be summarized as below. • Learning model. This paper considered Nyström regression with data dependent hypothesis space and coefficient regularization, which can employ general kernel including the indefinite kernel and nonsymmetric kernel. However, the previous analysis just focuses on the positive semi-definite kernel and the regularizer in RKHS. For a fixed design KRR, the fast convergence O(m−1) in [24] depends on the eigenvalue condition of kernel matrix. Differently from [24], our result relies on the Lipschitz continuity of kernel and the approximation condition D(λ) for the statistical learning setting. • Analysis technique. The previous analysis in [16, 24] utilizes the theoretical techniques for operator approximation and matrix decomposition, which depends heavily on the symmetric positive semi-definite kernel. For GNKR (4), the previous analysis is not valid directly since the kernel is not necessary to satisfy the positive semi-definite or symmetric condition. The flexibility on kernel and the adaptivity on hypothesis space induce the additional difficulty on error analysis. Fortunately, the error analysis is obtained by incorporating the error decomposition ideas in [7] and the concentration estimate techniques in [18, 19]. An interesting future work is to establish the optimal bound of GNKR to extend Theorem 2 in [16] to the general setting. For the proofs of Theorem 1 and 2, the key idea is using ˆgλ as the stepping stone function to bridge fz and gλ. Additionally, the connection between gλ = LKfλ and fρ has been well studied in learning theory. Hence, the proofs in Appendix follow from the approximation decomposition. In remainder of this section, we present a simple analysis for column-norm subsampling. Given the full samples z = {(xi, yi)}n i=1 and sampling number m, the key of subsampling is to select a subset of z with strong inference ability. In other words, we should select the subset with small divergence with the full sample estimator. Following this idea, the optimal subsampling criterion is studied in [28, 22] for the linear regression. Given z = {zi}n i=1 and Knn, we introduce the objective function S(p) := S(p1, ..., pn) = Pn i=1 1−Lii pi ∥Ki∥2 2 by extending (16) in [28] to the kernel-based setting. Here {pi}n i=1 are the sampling probabilities with respect to {xi}n i=1 and Lii = (Knn(KT nnKnn + λn2In)−1KT nn)ii, i ∈{1, ..., n} are basic leverage values obtained from (2). For the fixed design setting, assume that yi = KT i α0 + εi, i = 1, ..., n, α0 ∈Rn, where {εi}n i=1 are drawn identically and independently from N(0, σ2). Then, for λ = 0, min p S(p1, ..., pn) can be transformed as min p Etr((Knn)T (diag(p))−1Knn), which is related with the A-optimality or A-criterion for subset selection in [22]. When Lii →0 for any i ∈{1, ..., n}, we can get the following sampling probabilities. Theorem 3 When hii = o(1) for 1 ≤i ≤n, the minimizer of S(p1, ..., pn) can be approximated by pi = ∥Ki∥2 Pn i=1 ∥Ki∥2 , i ∈{1, ..., n}. Usually, the leverage values are computed by fast approximation algorithms [1, 16] since Lii involves the inverse matrix. Different from the leverage values, the sampling probabilities in Theorem 3 can be computed directly, which just involves the ℓ2 column-norm of empirical matrix. 6 Table 1: Average RMSE of GNKR with Gaussian(G)/Epanechnikov(E) kernel under different sampling strategies and sampling size. US:=Uniform subsampling, CS: Column-norm subsampling. Function Algorithm ♯300 ♯400 ♯500 ♯600 ♯700 ♯800 ♯900 ♯1000 f1(x) = x sin x G-GNKR-US 0.03412 0.03145 0.02986 0.02919 0.02897 0.02906 0.02896 0.02908 x ∈[0, 2π] G-GNKR-CS 0.03420 0.03086 0.02954 0.02911 0.02890 0.02878 0.02891 0.02889 E-GNKR-US 0.10159 0.09653 0.09081 0.08718 0.08515 0.08278 0.08198 0.08024 E-GNKR-CS 0.09941 0.09414 0.08908 0.08631 0.08450 0.08237 0.08118 0.07898 f2(x) = sin x x G-GNKR-US 0.03442 0.03434 0.03418 0.03409 0.03404 0.03400 0.03398 0.03395 x ∈[−2π, 2π] G-GNKR-CS 0.03444 0.03423 0.03419 0.03408 0.03397 0.03397 0.03396 0.03389 E-GNKR-US 0.04786 0.04191 0.04073 0.03692 0.03582 0.03493 0.03470 0.03440 E-GNKR-CS 0.04607 0.03865 0.03709 0.03573 0.03510 0.03441 0.03316 0.03383 f3(x) = sign(x) G-GNKR-US 0.29236 0.29102 0.29009 0.28908 0.28867 0.28839 0.28755 0.28742 x ∈[−3, 3] G-GNKR-CS 0.29319 0.29071 0.28983 0.28975 0.28903 0.28833 0.28797 0.28768 E-GNKR-US 0.16170 0.15822 0.15537 0.15188 0.15086 0.14889 0.14730 0.14726 E-GNKR-CS 0.16500 0.15579 0.15205 0.15201 0.14949 0.14698 0.14597 0.14566 f4(x) = cos(ex) + sin x x G-GNKR-US 0.34916 0.35158 0.35155 0.35148 0.35156 0.35140 0.35136 0.35139 x ∈[−2, 4] G-GNKR-CS 0.34909 0.35171 0.35168 0.35133 0.35153 0.35145 0.35141 0.35138 E-GNKR-US 0.22298 0.21012 0.20265 0.19977 0.19414 0.19126 0.18916 0.18560 E-GNKR-CS 0.21624 0.20783 0.20024 0.19698 0.19260 0.18996 0.18702 0.18662 5 Experimental Analysis Since kernel regression with different types of regularization has been well studied in [7, 20, 21], this section just presents the empirical evaluation of GNKR to illustrate the roles of sampling strategy and kernel function. Gaussian kernel KG(x, t) = exp −∥x−t∥2 2 2σ2 is used for simulated data and real data. Epanechnikov kernel KE(x, t) = 1 −∥x−t∥2 2 2σ2 + is used in the simulated experiment. Here, σ denotes the scale parameter selected form [10−5 : 10 : 104]. Following the discussion on parameter selection in [16], we select the regularization parameter of GNKR from [10−15 : 10 : 10−3]. The best results are reported according to the measure of Root Mean Squared Error (RMSE). 5.1 Experiments on synthetic data Following the empirical studies in [20, 21], we design simulation experiments on f1(x) = x sin x, x ∈ [0, 2π], f2(x) = sin x x , x ∈[−2π, 2π], f3(x) = sign(x), x ∈[−3, 3], and f4(x) = cos(ex) + sin x x , x ∈[−2, 4]. The function fi is considered as the truly regression function for 1 ≤i ≤4. Note that f1, f2 are smooth, f3 is not continuous, and f4 embraces a highly oscillatory part. First, we select 10000 points randomly from the preset interval and generate the dependent variable y according to the corresponding function. Then we divided these data into two parts with equal size. we chose one part as the training samples and the other is regarded as testing samples. For the training samples, the output y is contaminated by Gaussian noise N(0, 1). For each function and each kernel, we run the experiment 20 times. The average RMSE is shown in Table 1. The results indicate that the column norm subsampling can achieve the satisfactory performance. In particular, GNKR with the indefinite Epanechnikov kernel has better performance than Gaussian kernel for the noncontinuous function f3 and the non-flat function f4. This observation is consistent with the empirical result in [21]. 5.2 Experiments on real data In order to better evaluate the empirical performance, four data sets are used in our study including the Wine Quality, CASP, Year Prediction datasets (http://archive.ics.uci.edu/ml/) and the census-house dataset (http://www.cs.toronto.edu/ delve/data/census-house/desc.html). The detailed information about the data sets are showed in Table 2. Firstly, each data set is standardized by subtracting its mean and dividing its standard deviation. Then, each input vector is unitized. For CASP and Year Prediction, 20000 samples are drawn randomly from data sets, where half is used for training and the rest is for testing. For other datasets, we random select part samples to training and use the rest part as test set. Table 3 reports the average RMSE over ten trials. Table 3 shows the performance of two sampling strategies. For CASP, and Year Prediction, we can see that GNKR with 100 selected samples can achieve the satisfactory performance, which reduce the computation complexity of (2) efficiently. Additionally, the competitive performance of GNKR with Epanechnikov kernel is demonstrated via the experimental results on the four data sets. These empirical examples support the effectiveness of the proposed method. 7 Table 2: Statistics of data sets Dataset #Features #Instances #Train #Test Dataset #Feature #Instance #Train #Test Wine Quality 12 4898 2000 2898 CASP 9 45730 10000 10000 Year Prediction 90 515345 10000 10000 census-house 139 22784 12000 10784 Table 3: Average RMSE (×10−3) with Gaussian(G)/Epanechnikov(E) kernel under different sampling levels and strategies. US:=Uniform subsampling, CS: Column-norm subsampling. Function Algorithm ♯50 ♯100 ♯200 ♯400 ♯600 ♯800 ♯1000 Wine Quality G-GNKR-US 14.567 14.438 14.382 14.292 14.189 14.103 13.936 G-GNKR-CS 14.563 14.432 14.394 14.225 14.138 14.014 13.936 E-GNKR-US 13.990 13.928 13.807 13.636 13.473 13.381 13.217 E-GNKR-CS 13.969 13.899 13.798 13.601 13.445 13.362 13.239 CASP G-GNKR-US 9.275 9.238 9.205 9.222 9.204 9.207 9.205 G-GNKR-CS 9.220 9.196 9.205 9.193 9.198 9.199 9.198 E-GNKR-US 4.282 4.196 4.213 4.153 4.181 4.174 4.180 E-GNKR-CS 4.206 4.249 4.206 4.182 4.172 4.165 4.118 Year Prediction G-GNKR-US 8.806 8.802 8.798 8.795 8.792 8.790 8.782 G-GNKR-CS 8.806 8.801 8.798 8.793 8.792 8.789 8.781 E-GNKR-US 7.013 6.842 6.739 6.700 6.676 6.671 6.637 E-GNKR-CS 7.006 6.861 6.804 6.705 6.697 6.663 6.662 census-house G-GNKR-US 111.084 111.083 111.082 111.079 111.077 111.074 111.071 G-GNKR-CS 111.083 111.080 111.080 111.079 111.075 111.071 111.068 E-GNKR-US 102.731 99.535 99.698 99.718 99.715 99.714 99.713 E-GNKR-CS 102.703 99.528 99.697 99.716 99.714 99.714 99.712 6 Conclusion This paper focuses on the learning theory analysis of Nyström kernel regression. One key difference with the previous related work is that GNKR uses general continuous kernel function and ℓ2 coefficient regularization. The stepping-stone functions are constructed to overcome the analysis difficulty induced by the difference. The learning bound with fast convergence is derived under mild conditions and empirical analysis is provided to verify our theoretical analysis. Acknowledgments This work was partially supported by U.S. NSF-IIS 1302675, NSF-IIS 1344152, NSF-DBI 1356628, NSF-IIS 1619308, NSF-IIS 1633753, NIH AG049371, and by National Natural Science Foundation of China (NSFC) 11671161. We thank the anonymous NIPS reviewers for insightful comments. References [1] A. Alaoui and M. W. Mahoney. Fast randomized kernel methods with statistical guarantees. In NIPS, pp. 775–783, 2015. [2] F. Bach. Sharp analysis of low-rank kernel matrix approximations. In COLT, 2013. [3] P. Drineas, R. Kannan, and M.W. Mahoney. Fast Monte Carlo algorithms for matrices I: Computing a low-rank approximation to a matrix. SIAM Journal on Computing, pp. 158–183, 2006. [4] P. Drineas and M.W. Mahoney. On the Nyström method for approximating a Gram matrix for improved kernel-based learning. J. Mach. Learn. Res., 6: 2153–2175, 2005. [5] P. Drineas, M. Magdon-Ismail, M.W. Mahoney, and D.P. Woodruff. Fast approximation of matrix coherence and statistical leverage. J. Mach. Learn. Res., 13: 3475–3506, 2012. [6] M. Eberts and I. Steinwart. Optimal learning rates for least squares SVMs using Gaussian kernels. In NIPS, pp. 1539–1547, 2011. [7] Y. Feng, S. Lv, H. Huang, and J. Suykens. Kernelized elastic net regularization: generalization bounds and sparse recovery. Neural Computat., 28: 1–38, 2016. [8] A. Gittens and M.W. Mahoney. Revisiting the Nyström method for improved large-scale machine learning. In ICML, pp. 567–575, 2013 8 [9] C.J. Hsieh, S. Si, and I.S. Dhillon. Fast prediction for large scale kernel machines. In NIPS, pp. 3689–3697, 2014. [10] R. Jin, T. Yang, M. Mahdavi, Y. Li, and Z. Zhou. Improved bounds for the Nyström method with application to kernel classification. IEEE Trans. Inf. Theory, 59(10): 6939–6949, 2013. [11] S. Kumar, M. Mohri, and A. Talwalkar. Sampling methods for the Nyström method. J. Mach. Learn. Res., 13: 981–1006, 2012. [12] W. Lim, M. Kim, H. Park, and K. Jung. Double Nyström method: An efficient and accurate Nyström scheme for large-scale data sets. In ICML, pp. 1367–1375, 2015. [13] C. Liu. Gabor-based kernel PCA with fractional power polynomial models for face recognition. IEEE Trans. Pattern Anal. Mach. Intell., 26: 572–581, 2004. [14] E. Pekalska and B. Haasdonk. Kernel discriminant analysis with positive definite and indefinite kernels. IEEE Trans. Pattern. Anal. Mach. Intell.,31: 1017–1032, 2009. [15] A. Rahimi and B. Recht. Random features for large-scale kernel machines. In NIPS, pp. 1177– 1184, 2007. [16] A. Rudi, R. Camoriano, R. Rosasco. Less is more: Nyström computation regularization. In NIPS, 1657–1665, 2015. [17] B. Schölkopf and A.J. Smola. Learning with Kernels: Support Vector Machines, Regularization, Optimization, and Beyond . MIT Press, 2001. [18] L. Shi, Y. Feng, and D.X. Zhou. Concentration estimates for learning with ℓ1-regularizer and data dependent hypothesis spaces. Appl. Comput. Harmon. Anal., 31(2): 286–302, 2011. [19] L. Shi. Learning theory estimates for coefficient-based regularized regression. Appl. Comput. Harmon. Anal., 34(2): 252–265, 2013. [20] H. Sun and Q. Wu. Least square regression with indefinite kernels and coefficient regularization. Appl. Comput. Harmon. Anal., 30(1): 96–109, 2011. [21] H. Sun and Q. Wu. Sparse representation in kernel machines. IEEE Trans. Neural Netw. Learning Syst., 26(10): 2576–2582, 2015. [22] Y. Wang and A. Singh. Minimax subsampling for estimation and prediction in low-dimensional linear regression. arXiv, 2016 (https://arxiv.org/pdf/1601.02068v2.pdf). [23] C. Williams and M. Seeger. Using the Nyström method to speed up kernel machines. In NIPS, pp. 682–688, 2001. [24] T. Yang, Y.F. Li, M. Mahdavi, R. Jin, and Z.H. Zhou. Nyström method vs random Fourier features: A theoretical and empirical comparison. In NIPS, 2012, pp. 485–493. [25] Y. Yang, M. Pilanci and M. J. Wainwright. Randomized sketches for kernels: Fast and optimal non-parametric regression. arxiv:1501.06195, 2015.(http://arxiv.org/abs/1501.06195). [26] Y. Ying, C. Campbell, and M. Girolami. Analysis of SVM with indefinite kernels. In NIPS, pp. 2205–2213, 2009. [27] K. Zhang, I.W. Tsang, and J.T. Kwok. Improved Nyström low-rank approximation and error analysis. In ICML, pp. 1232–1239, 2008. [28] R. Zhu, P. Ma, M.W. Mahoney, and B. Yu. Optimal subsampling approaches for large sample linear regression. arXiv:1509.05111, 2015 (http://arxiv.org/abs/1509.05111). 9 | 2016 | 432 |
6,364 | Regularized Nonlinear Acceleration Damien Scieur INRIA & D.I., UMR 8548, École Normale Supérieure, Paris, France. damien.scieur@inria.fr Alexandre d’Aspremont CNRS & D.I., UMR 8548, École Normale Supérieure, Paris, France. aspremon@di.ens.fr Francis Bach INRIA & D.I., UMR 8548, École Normale Supérieure, Paris, France. francis.bach@inria.fr Abstract We describe a convergence acceleration technique for generic optimization problems. Our scheme computes estimates of the optimum from a nonlinear average of the iterates produced by any optimization method. The weights in this average are computed via a simple and small linear system, whose solution can be updated online. This acceleration scheme runs in parallel to the base algorithm, providing improved estimates of the solution on the fly, while the original optimization method is running. Numerical experiments are detailed on classical classification problems. 1 Introduction Suppose we want to solve the following optimization problem min x∈Rn f(x) (1) in the variable x ∈Rn, where f(x) is strongly convex with respect to the Euclidean norm with parameter µ, and has a Lipschitz continuous gradient with parameter L with respect to the same norm. This class of function is often encountered, for example in regression where f(x) is of the form f(x) = L(x) + Ω(x), where L(x) is a smooth convex loss function and Ω(x) is a smooth strongly convex penalty function. Assume we solve this problem using an iterative algorithm of the form xi+1 = g(xi), for i = 1, ..., k, (2) where xi ∈Rn and k the number of iterations. Here, we will focus on the problem of estimating the solution to (1) by tracking only the sequence of iterates xi produced by an optimization algorithm. This will lead to an acceleration of the speed of convergence, since we will be able to extrapolate more accurate solutions without any calls to the oracle g(x). Since the publication of Nesterov’s optimal first-order smooth convex minimization algorithm [1], a significant effort has been focused on either providing more explicit interpretable views on current acceleration techniques, or on replicating these complexity gains using different, more intuitive schemes. Early efforts were focused on directly extending the original acceleration result in [1] to broader function classes [2], allow for generic metrics, line searches or simpler proofs [5, 6], produce adaptive accelerated algorithms [7], etc. More recently however, several authors [8, 9] have started 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. using classical results from control theory to obtain numerical bounds on convergence rates that match the optimal rates. Others have studied the second order ODEs obtained as the limit for small step sizes of classical accelerated schemes, to better understand their convergence [10, 11]. Finally, recent results have also shown how to wrap classical algorithms in an outer optimization loop, to accelerate convergence [12] and reach optimal complexity bounds. Here, we take a significantly different approach to convergence acceleration stemming from classical results in numerical analysis. We use the iterates produced by any (converging) optimization algorithm, and estimate the solution directly from this sequence, assuming only some regularity conditions on the function to minimize. Our scheme is based on the idea behind Aitken’s ∆2 algorithm [13], generalized as the Shanks transform [14], whose recursive formulation is known as the ε-algorithm [15] (see e.g. [16, 17] for a survey). In a nutshell, these methods fit geometrical models to linearly converging sequences, then extrapolate their limit from the fitted model. In a sense, this approach is more statistical in nature. It assumes an approximately linear model holds for iterations near the optimum, and estimates this model using the iterates. In fact, Wynn’s algorithm [15] is directly connected to the Levinson-Durbin algorithm [18, 19] used to solve Toeplitz systems recursively and fit autoregressive models (the Shanks transform solves Hankel systems, but this is essentially the same problem [20]). The key difference here is that estimating the autocovariance operator is not required, as we only focus on the limit. Moreover, the method presents strong links with the conjugate gradient when applied to unconstrained quadratic optimization. We start from a slightly different formulation of these techniques known as minimal polynomial extrapolation (MPE) [17, 21] which uses the minimal polynomial of the linear operator driving iterations to estimate the optimum by nonlinear averaging (i.e., using weights in the average which are nonlinear functions of the iterates). So far, for all the techniques cited above, no proofs of convergence of these estimates were given in the case where the iterates made the estimation process unstable. Our contribution here is to add a regularization in order to produce explicit bounds on the distance to optimality by controlling the stability through the regularization parameter, thus explicitly quantifying the acceleration provided by these techniques. We show in several numerical examples that these stabilized estimates often speed up convergence by an order of magnitude. Furthermore this acceleration scheme thus runs in parallel to the original algorithm, providing improved estimates of the solution on the fly, while the original method is progressing. The paper is organized as follows. In section 2.1 we recall basic results behind MPE for linear iterations and we will introduce in section 2.2 a formulation of the approximate version of MPE and make a link with the conjugate gradient method. Then, in section 2.3, we generalize these results to generic nonlinear iterations and show, in section 2.4, how to fully control the impact of nonlinearity. We use these results to derive explicit bounds on the acceleration performance of our estimates. 2 Approximate Minimal Polynomial Extrapolation In what follows, we recall the key arguments behind minimal polynomial extrapolation (MPE) as derived in [22] or also [21]. We also explain a variant called approximate minimal polynomial extrapolation (AMPE) which allows to control the number of iterates used in the extrapolation, hence reduces its computational complexity. We begin by a simple description of the method for linear iterations, then extend these results to the generic nonlinear case. Finally, we fully characterize the acceleration factor provided by a regularized version of AMPE, using regularity properties of the function f(x), and the result of a Chebyshev-like, tractable polynomial optimization problem. 2.1 Linear Iterations Here, we assume that the iterative algorithm in (2) is in fact linear, with xi = A(xi−1 −x∗) + x∗, (3) where A ∈Rn×n (not necessarily symmetric) and x∗∈Rn. We assume that 1 is not an eigenvalue of A, implying that (3) admits a unique fixed point x∗. Moreover, if we assume that ∥A∥2 < 1, then xk converge to x∗at rate ∥xk −x∗∥2 ≤∥A∥k 2∥x0 −x∗∥. We now recall the minimal polynomial extrapolation (MPE) method as described in [21], starting with the following definition. 2 Definition 2.1 Given A ∈Rn×n, s.t. 1 is not an eigenvalue of A and v ∈Rn, the minimal polynomial of A with respect to the vector v is the lowest degree polynomial p(x) such that p(A)v = 0, p(1) = 1. Note that the degree of p(x) is always less than n and the condition p(1) = 1 makes p unique. Notice that because we assumed that 1 is not an eigenvalue of A, having p(1) = 1 is not restrictive since we can normalize each minimal polynomial with the sum of its coefficients (see Lemma A.1 in the supplementary material). Given an initial iterate x0, MPE starts by forming a matrix U whose columns are the increments xi+1 −xi, with ui = xi+1 −xi = (A −I)(xi −x∗) = (A −I)Ai(x0 −x∗). (4) Now, let p be the minimal polynomial of A with respect to the vector u0 (where p has coefficients ci and degree d), and U = [u0, u1, ..., ud]. So Pd i=0 ciui = Pd i=0 ciAiu0 = p(A)u0 = 0 , p(1) = Pd i=0 ci = 1. (5) We can thus solve the system Uc = 0, P i ci = 1 to find p. In this case, the fixed point x∗can be computed exactly as follows 0 = Pd i=0 ciAiu0 = Pd i=0 ciAi(A −I)(x0 −x∗) = (A −I) Pd i=0 ciAi(x0 −x∗) = (A −I) Pd i=0 ci(xi −x∗). Hence, using the fact that 1 is not an eigenvalue of A and p(1) = 1, (A −I) Pd i=0 ci(xi −x∗) = 0 ⇔ Pd i=0 ci(xi −x∗) = 0 ⇔ Pd i=0 cixi = x∗. This means that x∗is obtained by averaging iterates using the coefficients in c. The averaging in this case is called nonlinear, since the coefficients of c vary with the iterates themselves. 2.2 Approximate Minimal Polynomial Extrapolation (AMPE) Suppose now that we only compute a fraction of the iterates xi used in the MPE procedure. While the number of iterates k might be smaller than the degree of the minimal polynomial of A with respect to u0, we can still try to make the quantity pk(A)u0 small, where pk(x) is now a polynomial of degree at most k. The corresponding difference matrix U = [u0, u1, ..., uk] ∈Rn×(k+1) is rectangular. This is also known as the Eddy-Mešina method [3, 4] or reduced rank extrapolation with arbitrary k (see [21, §10]). The objective here is similar to (5), but the system is now overdetermined because k < deg(P). We will thus choose c to make ∥Uc∥2 = ∥p(A)u0∥2, for some polynomial p such that p(1) = 1, as small as possible, which means solving for c∗≜argmin ∥Uc∥2 s.t. 1T c = 1 (AMPE) in the variable c ∈Rk+1. The optimal value ∥Uc∗∥2 of this problem is decreasing with k, satisfies ∥Uc∗∥2 = 0 when k is greater than the degree of the minimal polynomial, and controls the approximation error in x∗with equation (4). Setting ui = (A −I)(xi −x∗), we have ∥Pk i=0 c∗ i xi −x∗∥2 = ∥(I −A)−1 Pk i=0 c∗ i ui∥2 ≤
(I −A)−1
2 ∥Uc∗∥2. We can get a crude bound on ∥Uc∗∥2 from Chebyshev polynomials, using only an assumption on the range of the spectrum of the matrix A. Assume A symmetric, 0 ⪯A ⪯σI ≺I and deg(p) ≤k. Indeed, ∥Uc∗∥2 = ∥p∗(A)u0∥2 ≤∥u0∥2 min p:p(1)=1 ∥p(A)∥2 ≤∥u0∥2 min p:p(1)=1 max A:0⪯A⪯σI ∥p(A)∥2, (6) where p∗is the polynomial with coefficients c∗. Since A is symmetric, we have A = QΛQT where Q is unitary. We can thus simplify the objective function: max A:0⪯A⪯σI ∥p(A)∥2 = max Λ:0⪯Λ⪯σI ∥p(Λ)∥2 = max Λ:0⪯Λ⪯σI max i |p(λi)| = max λ:0≤λ≤σ |p(λ)|. 3 We thus have ∥Uc∗∥2 ≤∥u0∥2 min p:p(1)=1 max λ:0≤λ≤σ |p(λ)|. So we must find a polynomial which takes small values in the interval [0, σ]. However, Chebyshev polynomials are known to be polynomials for which the maximal value in the interval [0, 1] is the smallest. Let Ck be the Chebyshev polynomial of degree k. By definition, Ck(x) is a monic polynomial1 which solves Ck(x) = argmin p:p is monic max x:x∈[−1,1] |p(x)|. We can thus use a variant of Ck(x) in order to solve the minimax problem min p:p(1)=1 max λ:0≤λ≤σ |p(λ)|. (7) The solution of this problem is given in [23] and admits an explicit formulation: T (x) = Ck(t(x)) Ck(t(1)) , t(x) = 2x −σ σ . Note that t(x) is simply a linear mapping from interval [0, σ] to [−1, 1]. Moreover, min p:p(1)=1 max λ:0≤λ≤σ |p(λ)| = max λ:0≤λ≤σ |Tk(λ)| = |Tk(σ)| = 2ζk 1 + ζ2k , (8) where ζ is ζ = (1 − √ 1 −σ)/(1 + √ 1 −σ) < σ. (9) Since ∥u0∥2 = ∥(A −I)(x0 −x∗)∥2 ≤∥A −I∥2∥x0 −x∗∥, we can bound (6) by ∥Uc∗∥2 ≤∥u0∥2 min p:p(1)=1 max λ:0≤λ≤σ |p(λ)| ≤∥A −I∥2 2ζk 1 + ζ2k ∥x0 −x∗∥2. This leads to the following proposition. Proposition 2.2 Let A be symmetric, 0 ⪯A ⪯σI ≺I and ci be the solution of (AMPE). Then
Pk i=0 c∗ i xi −x∗
2 ≤κ(A −I) 2ζk 1+ζ2k ∥x0 −x∗∥2, (10) where κ(A −I) is the condition number of the matrix A −I and ζ is defined in (9). Note that, when solving quadratic optimization problems, the rate in this bound matches that obtained using the optimal method in [6]. Also, the bound on the rate of convergence of this method is exactly the one of the conjugate gradient with an additional factor κ(A −I). Remark: This method presents a strong link with the conjugate gradient. Denote ∥v∥B = √ vT Bv the norm induced by the definite positive matrix B. By definition, at the k-th iteration, the conjugate gradient computes an approximation s of x∗which follows s = argmin ∥x −x∗∥A s.t. x ∈Kk , where Kk = {Ax∗, A2x∗, ..., Akx∗} is called a Krylov subspace. Since x ∈Kk, we have that x is a linear combination of the element in Kk, so x = Pk i=1 ciAix∗= q(A)x∗, where q(x) is a polynomial of degree k and q(0) = 0. So conjugate gradient solves s = argminq:q(0)=0 ∥q(A)x∗−x∗∥A = argminˆq:ˆq(0)=0 ∥ˆq(A)x∗∥A, which is very similar to equation (AMPE). However, while conjugate gradient has access to an oracle which gives the result of the product between matrix A and any vector v, the AMPE procedure can only use the iterations produced by (3) (meaning that the AMPE procedure does not need to know A). Moreover, we analyze the convergence of AMPE in another norm (∥· ∥2 instead of ∥· ∥A). These two reasons explain why a condition number appears in the rate of convergence of AMPE (10). 1A monic polynomial is a univariate polynomial in which the coefficient of highest degree is equal to 1. 4 2.3 Nonlinear Iterations We now go back to the general case where the iterative algorithm is nonlinear, with ˜xi+1 = g(˜xi), for i = 1, ..., k, (11) where ˜xi ∈Rn and the function g has a symmetric Jacobian at point x∗. We also assume that the method has a unique fixed point written x∗and linearize these iterations around x∗, to get ˜xi −x∗= A(˜xi−1 −x∗) + ei, (12) where A is now the Jacobian matrix (i.e., the first derivative) of g taken at the fixed point x∗and ei ∈Rn is a second order error term ∥ei∥2 = O(∥˜xi−1 −x∗∥2 2). Note that, by construction, the linear and nonlinear models share the same fixed point x∗. We write xi the iterates that would be obtained using the asymptotic linear model (starting at x0) xi −x∗= A(xi−1 −x∗). Running the algorithm described in (11), we thus observe the iterates ˜xi and build ˜U from their differences. As in (AMPE) we then compute ˜c using matrix ˜U and finally estimate ˜x∗= Pk i=0 ˜ci˜xi. In this case, our estimate for x∗is based on the coefficient ˜c, computed using the iterates ˜xi. We will now decompose the error made by the estimation by comparing it with the estimation which comes from the linear model:
Pk i=0 ˜ci˜xi −x∗
2 ≤
Pk i=0(˜ci −ci)xi
2 +
Pk i=0 ˜ci(˜xi −xi)
2 +
Pk i=0 cixi −x∗
2 . (13) This expression shows us that the precision is comparable to the precision of the AMPE process in the linear case (third term) with some perturbation. Also, if ∥ei∥2 is small then ∥xi −˜xi∥2 is small as well. But we need more information about ∥c∥2 and ∥˜c −c∥2 if we want to go further. We now show the following proposition computing the perturbation ∆c = (˜c∗−c∗) of the optimal solution of (AMPE), c∗, induced by E = ˜U −U. It will allow us to bound the first term on the right-hand side of (13) (see proof A.2 in the Appendix). For simplicity, we will use P = ˜U T ˜U −U T U. Proposition 2.3 Let c∗be the optimal solution to (AMPE) c∗= argmin 1T c=1 ∥Uc∥2 for some matrix U ∈Rn×k. Suppose U becomes ˜U = U + E and write c∗+ ∆c the perturbed solution to (AMPE). Let M = ˜U T ˜U and the perturbation matrix P = ˜U T ˜U −U T U. Then, ∆c = − I −M −111T 1T M −11 M −1Pc∗. (14) We see here that the perturbation can be potentially large. Even if ∥c∗∥2 and ∥P∥2 can be potentially small, ∥M −1∥2 is huge in general. It can be shown that U T U (the square of a Krylov-like matrix) presents an exponential condition number (see [24]) because the minimal eigenvalue decays very fast. Moreover, the eigenvalues are perturbed by P, leading to a potential huge perturbation ∆c, especially if ∥P∥2 is comparable (or bigger) to λmin(U T U). 2.4 Regularized AMPE The condition number of the matrix U T U in problem (AMPE) can be arbitrary large. Indeed, this condition number is related to the one of Krylov matrices which has been proved in [24] to be exponential in k. By consequence, this conditioning problem coupled with nonlinear errors lead to highly unstable solutions c∗(which we observe in our experiments). We thus study a regularized formulation of problem (AMPE), which reads minimize cT (U T U + λI)c subject to 1T c = 1 (RMPE) The solution of this problem may be computed with a linear system, and the regularization parameter controls the norm of the solution, as shown in the following Lemma (see proof A.3 in Appendix). 5 Lemma 2.4 Let c∗ λ be the optimal solution of problem (RMPE). Then c∗ λ = (U T U + λI)−11 1T (U T U + λI)−11 and ∥c∗ λ∥2 ≤ r λ + ∥U∥2 2 kλ . (15) This allows us to obtain the following corollary extending Proposition 2.3 to the regularized AMPE problem in (RMPE), showing that the perturbation of c is now controlled by the regulaization parameter λ. Corollary 2.5 Let c∗ λ, defined in (15), be the solution of problem (RMPE). Then the solution of problem (RMPE) for the perturbed matrix ˜U = U + E is given by c∗ λ + ∆cλ where ∆cλ = −WM −1 λ Pc∗ λ = −M −1 λ W T Pc∗ λ and ∥∆c∗ λ∥2 ≤∥P ∥2 λ ∥c∗ λ∥2, where Mλ = (U T U + P + λI) and W = I −M −1 λ 11T 1T M −1 λ 1 is a projector of rank k −1. These results lead us to the following simple algorithm. Algorithm 1 Regularized Approximate Minimal Polynomial Extrapolation (RMPE) Input: Sequence {x0, x1, ..., xk+1}, parameter λ > 0 Compute U = [x1 −x0, ..., xk+1 −xk] Solve the linear system (U T U + λI)z = 1 Set c = z/(zT 1) Output: Pk i=0 cixi, the approximation of the fixed point x∗ The computational complexity (with online updates or in batch mode) of the algorithm is O(nk2) and some strategies (batch and online) are discussed in the Appendix A.3. Note that the algorithm never calls the oracle g(x). It means that, in an optimization context, the acceleration does not require f(x) or f ′(x) to compute the extrapolation. Moreover, it does not need a priori information on the function, for example L and µ (unlike Nesterov’s method). 2.5 Convergence Bounds on Regularized AMPE To fully characterize the convergence of our estimate sequence, we still need to bound the last term on the right-hand side of (13), namely ∥Pk i=0 cixi −x∗∥2. A coarse bound can be provided using Chebyshev polynomials, however the norm of the Chebyshev’s coefficients grows exponentially as k grows. Here we refine this bound to better control the quality of our estimate. Let g(x∗) ⪯σI. Consider the following Chebyshev-like optimization problem, written S(k, α) ≜ min {q∈Rk[x]: q(1)=1} max x∈[0,σ] ((1 −x)q(x))2 + α∥q∥2 2 , (16) where Rk[x] is the ring of polynomials of degree at most k and q ∈Rk+1 is the vector of coefficients of the polynomial q(x). This problem can be solved exactly using a semi-definite solver because it can be reduced to a SDP program (see Appendix A.4 for the details of the reduction). Our main result below shows how S(k, α) bounds the error between our estimate of the optimum constructed using the iterates ˜xi in (RMPE) and the optimum x∗of problem (1). Proposition 2.6 Let matrices X = [x0, x1, ..., xk], ˜X = [x0, ˜x1, ..., ˜xk], E = (X −˜X) and scalar κ = ∥(A −I)−1∥2. Suppose ˜c∗ λ solves problem (RMPE) minimize cT ( ˜U T ˜U + λI)c subject to 1T c = 1 ⇒ ˜c∗ λ = ( ˜U T ˜U + λI)−11 1T ( ˜U T ˜U + λI)−11 (17) in the variable c ∈Rk+1, with parameters ˜U ∈Rn×(k+1). Assume A symmetric with 0 ⪯A ≺I. Then ∥˜X˜c∗ λ−x∗∥2 ≤ κ2 + 1 λ 1 + ∥P∥2 λ 2 ∥E∥2 + κ∥P∥2 2 √ λ 2!1 2 S(k, λ/∥x0 −x∗∥2 2) 1 2∥x0−x∗∥2, with P is defined in Corollary 2.5 and S(k, α) is defined in (16). 6 We have that S(k, λ/∥x0 −x∗∥2 2) 1 2 is similar to the value Tk(σ) (see (8)) so our algorithm achieves a rate similar to the Chebyshev’s acceleration up to some multiplicative scalar. We thus need to choose λ so that this multiplicative scalar is not too high (while keeping S(k, λ/∥x0 −x∗∥2 2) 1 2 small). We can analyze the behavior of the bound if we start close to the optimum. Assume ∥E∥2 = O(∥x0 −x∗∥2 2), ∥U∥2 = O(∥x0 −x∗∥2) ⇒ ∥P∥2 = O(∥x0 −x∗∥3 2). This case is encountered when minimizing a smooth strongly convex function with Lipchitzcontinuous Hessian using fixed-step gradient method (this case is discussed in details in the Appendix, section A.6). Also, let λ = β∥P∥2 for β > 0 and ∥x0 −x∗∥small. We can thus approximate the right parenthesis of the bound by lim ∥x−x∗∥2→0 ∥E∥2 + κ∥P∥2 2 √ λ = lim ∥x−x∗∥2→0 ∥E∥2 + κ p ∥P∥2 2√β ! = κ p ∥P∥2 2√β . Therefore, the bound on the precision of the extrapolation is approximately equal to ∥˜X˜c∗ λ −x∗∥2 ≲ κ 1 + (1 + 1 β )2 4β2 !1/2 s S k, β∥P∥2 ∥x0 −x∗∥2 2 ∥x0 −x∗∥2 Also, if we use equation (8), it is easy to see that p S (k, 0) ≤ min {q∈Rk[x]: q(1)=1} max x∈[0,σ1] |q(x)| = Tk(t(σ)) = 2ζk 1 + ζ2k , where ζ is defined in (9). So, when ∥x0 −x∗∥2 is close to zero, the regularized version of AMPE tends to converge as fast as AMPE (see equation (10)) up to a small constant. 3 Numerical Experiments We test our methods on a regularized logistic regression problem written f(w) = Pm i=1 log 1 + exp(−yiξT i w) + τ 2∥w∥2 2, where Ξ = [ξ1, ..., ξm]T ∈Rm×n is the design matrix and y is a {−1, 1}n vector of labels. We used the Madelon UCI dataset, setting τ = 102 (in order to have a ratio L/τ equal to 109). We solve this problem using several algorithms, the fixed-step gradient method for strongly convex functions [6, Th. 2.1.15] using stepsize 2/(L + µ), where L = ∥Ξ∥2 2/4 + τ and µ = τ, the accelerated gradient method for strongly convex functions [6, Th. 2.2.3] and our nonlinear acceleration of the gradient method iterates using RMPE in Proposition 2.6 with restarts. This last algorithm is implemented as follows. We do k steps (in the numerical experiments, k is typically equal to 5) of the gradient method, then extrapolate a solution ˜X˜c∗ λ where ˜c∗ λ is computed by solving the RMPE problem (17) on the gradient iterates ˜X, with regularization parameter λ determined by a grid search. Then, this extrapolation becomes the new starting point of the gradient method. We consider it as one iteration of RMPEk using k gradient oracle calls. We also analyze the impact of an inexact line-search (described in Appendix A.7) performed after this procedure. The results are reported in Figure 1. Using very few iterates, the solution computed using our estimate (a nonlinear average of the gradient iterates) are markedly better than those produced by the Nesterovaccelerated method. This is only partially reflected by the theoretical bound from Proposition 2.6 which shows significant speedup in some regions but remains highly conservative (see Figure 3 in section A.6). Also, Figure 2 shows us the impact of regularization. The AMPE process becomes unstable because of the condition number of matrix M, which impacts the precision of the estimate. 4 Conclusion and Perspectives In this paper, we developed a method which is able to accelerate, under some regularity conditions, the convergence of a sequence {xi} without any knowledge of the algorithm which generates this sequence. The regularization parameter present in the acceleration method can be computed easily using some inexact line-search. 7 0 2 4 6 8 10 ×104 10-5 100 f(xk) −f(x∗) Gradient oracle calls Gradient Nesterov Nest. + backtrack RMPE 5 RMPE 5 + LS 0 500 1000 1500 10-5 100 CPU Time (sec.) Gradient Nesterov Nest. + backtrack RMPE 5 RMPE 5 + LS Figure 1: Solving logistic regression on UCI Madelon dataset (500 features, 2000 data points) using the gradient method, Nesterov’s accelerated method and RMPE with k = 5 (with and without line search over the stepsize), with penalty parameter τ equal to 102 (Condition number is equal to 1.2 · 109). Here, we see that our algorithm has a similar behavior to the conjugate gradient: unlike the Nesterov’s method, where we need to provide parameters µ and L, the RMPE algorithm adapts himself in function of the spectrum of g(x∗) (so it can exploit the good local strong convexity parameter), without any prior specification. We can, for example, observe this behavior when the global strong convexity parameter is bad but not the local one. 0 2 4 6 8 10 x 10 4 10 −2 10 0 10 2 f(xk) −f(x∗) Gradient oracle calls Gradient Nesterov RMPE 5 AMPE 5 Figure 2: Logistic regression on Madelon UCI Dataset, solved using Gradient method, Nesterov’s method and AMPE (i.e. RMPE with λ = 0). The condition number is equal to 1.2 · 109. We see that without regularization, AMPE is unstable because ∥( ˜U T ˜U)−1∥2 is huge (see Proposition 2.3). The algorithm itself is simple. By solving only a small linear system we are able to compute a good estimate of the limits of the sequence {xi}. Also, we showed (using the gradient method on logistic regression) that the strategy which consists in alternating the algorithm and the extrapolation method can lead to impressive results, improving significantly the rate of convergence. Future work will consist in improving the performance of the algorithm by exploiting the structure of the noise matrix E in some cases (for example, using the gradient method, the norm of the column Ek in the matrix E is decreasing when k grows), extending the algorithm to the constrained case, the stochastic case and to the non-symmetric case. We will also try to refine the term (16) present in the theoretical bound. Acknowledgment. The research leading to these results has received funding from the European Union’s Seventh Framework Programme (FP7-PEOPLE-2013-ITN) under grant agreement no 607290 SpaRTaN, as well as support from ERC SIPA and the chaire Économie des nouvelles données with the data science joint research initiative with the fonds AXA pour la recherche. 8 References [1] Y. Nesterov. A method of solving a convex programming problem with convergence rate O(1/k2). Soviet Mathematics Doklady, 27(2):372–376, 1983. [2] AS Nemirovskii and Y. E Nesterov. Optimal methods of smooth convex minimization. USSR Computational Mathematics and Mathematical Physics, 25(2):21–30, 1985. [3] Mešina, M. [1977], ‘Convergence acceleration for the iterative solution of the equations x = ax + f’, Computer Methods in Applied Mechanics and Engineering 10(2), 165–173. [4] Eddy, R. [1979], ‘Extrapolating to the limit of a vector sequence’, Information linkage between applied mathematics and industry pp. 387–396. [5] 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. [6] Y. Nesterov. Introductory Lectures on Convex Optimization. Springer, 2003. [7] Y. Nesterov. Universal gradient methods for convex optimization problems. Mathematical Programming, 152(1-2):381–404, 2015. [8] Yoel Drori and Marc Teboulle. Performance of first-order methods for smooth convex minimization: a novel approach. Mathematical Programming, 145(1-2):451–482, 2014. [9] Laurent Lessard, Benjamin Recht, and Andrew Packard. Analysis and design of optimization algorithms via integral quadratic constraints. SIAM Journal on Optimization, 26(1):57–95, 2016. [10] Weijie Su, Stephen Boyd, and Emmanuel Candes. A differential equation for modeling nesterov’s accelerated gradient method: Theory and insights. In Advances in Neural Information Processing Systems, pages 2510–2518, 2014. [11] Andre Wibisono and Ashia C Wilson. On accelerated methods in optimization. Technical report, 2015. [12] Hongzhou Lin, Julien Mairal, and Zaid Harchaoui. A universal catalyst for first-order optimization. In Advances in Neural Information Processing Systems, pages 3366–3374, 2015. [13] Alexander Craig Aitken. On Bernoulli’s numerical solution of algebraic equations. Proceedings of the Royal Society of Edinburgh, 46:289–305, 1927. [14] Daniel Shanks. Non-linear transformations of divergent and slowly convergent sequences. Journal of Mathematics and Physics, 34(1):1–42, 1955. [15] Peter Wynn. On a device for computing the em(sn) transformation. Mathematical Tables and Other Aids to Computation, 10(54):91–96, 1956. [16] C Brezinski. Accélération de la convergence en analyse numérique. Lecture notes in mathematics, (584), 1977. [17] Avram Sidi, William F Ford, and David A Smith. Acceleration of convergence of vector sequences. SIAM Journal on Numerical Analysis, 23(1):178–196, 1986. [18] N Levinson. The Wiener RMS error criterion in filter design and prediction, appendix b of wiener, n.(1949). Extrapolation, Interpolation, and Smoothing of Stationary Time Series, 1949. [19] James Durbin. The fitting of time-series models. Revue de l’Institut International de Statistique, pages 233–244, 1960. [20] Georg Heinig and Karla Rost. Fast algorithms for Toeplitz and Hankel matrices. Linear Algebra and its Applications, 435(1):1–59, 2011. [21] David A Smith, William F Ford, and Avram Sidi. Extrapolation methods for vector sequences. SIAM review, 29(2):199–233, 1987. [22] Stan Cabay and LW Jackson. A polynomial extrapolation method for finding limits and antilimits of vector sequences. SIAM Journal on Numerical Analysis, 13(5):734–752, 1976. [23] Gene H Golub and Richard S Varga. Chebyshev semi-iterative methods, successive overrelaxation iterative methods, and second order richardson iterative methods. Numerische Mathematik, 3(1):157–168, 1961. [24] Evgenij E Tyrtyshnikov. How bad are Hankel matrices? Numerische Mathematik, 67(2):261–269, 1994. [25] Y. Nesterov. Squared functional systems and optimization problems. In High performance optimization, pages 405–440. Springer, 2000. [26] J. B. Lasserre. Global optimization with polynomials and the problem of moments. SIAM Journal on Optimization, 11(3):796–817, 2001. [27] P. Parrilo. Structured Semidefinite Programs and Semialgebraic Geometry Methods in Robustness and Optimization. PhD thesis, California Institute of Technology, 2000. [28] A. Ben-Tal and A. Nemirovski. Lectures on modern convex optimization : analysis, algorithms, and engineering applications. MPS-SIAM series on optimization. SIAM, 2001. 9 | 2016 | 433 |
6,365 | Pairwise Choice Markov Chains Stephen Ragain Management Science & Engineering Stanford University Stanford, CA 94305 sragain@stanford.edu Johan Ugander Management Science & Engineering Stanford University Stanford, CA 94305 jugander@stanford.edu Abstract As datasets capturing human choices grow in richness and scale—particularly in online domains—there is an increasing need for choice models that escape traditional choice-theoretic axioms such as regularity, stochastic transitivity, and Luce’s choice axiom. In this work we introduce the Pairwise Choice Markov Chain (PCMC) model of discrete choice, an inferentially tractable model that does not assume any of the above axioms while still satisfying the foundational axiom of uniform expansion, a considerably weaker assumption than Luce’s choice axiom. We show that the PCMC model significantly outperforms both the Multinomial Logit (MNL) model and a mixed MNL (MMNL) model in prediction tasks on both synthetic and empirical datasets known to exhibit violations of Luce’s axiom. Our analysis also synthesizes several recent observations connecting the Multinomial Logit model and Markov chains; the PCMC model retains the Multinomial Logit model as a special case. 1 Introduction Discrete choice models describe and predict decisions between distinct alternatives. Traditional applications include consumer purchasing decisions, choices of schooling or employment, and commuter choices for modes of transportation among available options. Early models of probabilistic discrete choice, including the well known Thurstone Case V model [27] and Bradley-Terry-Luce (BTL) model [7], were developed and refined under diverse strict assumptions about human decision making. As complex individual choices become increasingly mediated by engineered and learned platforms—from online shopping to web browser clicking to interactions with recommendation systems—there is a pressing need for flexible models capable of describing and predicting nuanced choice behavior. Luce’s choice axiom, popularly known as the independence of irrelevant alternatives (IIA), is arguably the most storied assumption in choice theory [18]. The axiom consists of two statements, applied to each subset of alternatives S within a broader universe U. Let paS = Pr(a chosen from S) for any S ⊆U, and in a slight abuse of notation let pab = Pr(a chosen from {a, b}) when there are only two elements. Luce’s axiom is then that: (i) if pab = 0 then paS = 0 for all S containing a and b, (ii) the probability of choosing a from U conditioned on the choice lying in S is equal to paS. The BTL model, which defines pab = γa/(γa + γb) for latent “quality” parameters γi > 0, satisfies the axiom while Thurstone’s Case V model does not [1]. Soon after its introduction, the BTL model was generalized from pairwise choices to choices from larger sets [4]. The resulting Multinomal Logit (MNL) model again employs quality parameters γi ≥0 for each i ∈U and defines piS, the probability of choosing i from S ⊆U, proportional to γi for all i ∈S. Any model that satisfies Luce’s choice axiom is equivalent to some MNL model [19]. One consequence of Luce’s choice axiom is strict stochastic transitivity between alternatives: if pab ≥0.5 and pbc ≥0.5, then pac ≥max(pab, pbc). A possibly undesirable consequence of strict stochastic transitivity is the necessity of a total order across all elements. But note that strict 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. stochastic transitivity does not imply the choice axiom; Thurstone’s model exhibits strict stochastic transitivity. Many choice theorists and empiricists, including Luce, have noted that the choice axiom and stochastic transitivity are strong assumptions that do not hold for empirical choice data [9, 12, 13, 26, 28]. A range of discrete choice models striving to escape the confines of the choice axiom have emerged over the years. The most popular of these models have been Elimination by Aspects [29], mixed MNL (MMNL) [6], and nested MNL [22]. Inference is practically difficult for all three of these models [15, 23]. Additionally, Elimination by Aspects and the MMNL model also both exhibit the rigid property of regularity, defined below. A broad, important class of models in the study of discrete choice is the class of random utility models (RUMs) [4, 20]. A RUM affiliates with each i ∈U a random variable Xi and defines for each subset S ⊆U the probability Pr(i chosen from S) = Pr(Xi ≥Xj, ∀j ∈S). An independent RUM has independent Xi. RUMs assume neither choice axiom nor stochastic transitivity. Thurstone’s Case V model and the BTL model are both independent RUMs; the Elimination by Aspects and MMNL models are both RUMs. A major result by McFadden and Train establishes that for any RUM there exists a MMNL model that can approximate the choice probabilities of that RUM to within an arbitrary error [23], a strong result about the generality of MMNL models. The nested MNL model, meanwhile, is not a RUM. Although RUMs need not exhibit stochastic transitivity, they still exhibit the weaker property of regularity: for any choice sets A, B where A ⊆B, pxA ≥pxB. Regularity may at first seem intuitively pleasing, but it prevents models from expressing framing effects [12] and other empirical observations from modern behavior economics [28]. This rigidity motivates us to contribute a new model of discrete choice that escapes historically common assumptions while still furnishing enough structure to be inferentially tractable. The present work. In this work we introduce a conceptually simple and inferentially tractable model of discrete choice that we call the PCMC model. The parameters of the PCMC model are the off-diagonal entries of a rate matrix Q indexed by U. The PCMC model affiliates each subset S of the alternatives with a continuous time Markov chain (CTMC) on S with transition rate matrix QS, whose off-diagonal entries are entries of Q indexed by pairs of items in S. The model defines piS, the selection probability of alternative i ∈S, as the probability mass of alternative i ∈S of the stationary distribution of the CTMC on S. The transition rates of these CTMCs can be interpreted as measures of preferences between pairs of alternatives. Special cases of the model use pairwise choice probabilities as transition rates, and as a result the PCMC model extends arbitrary models of pairwise choice to models of setwise choice. Indeed, we show that when the matrix Q is parameterized with the pairwise selection probabilities of a BTL pairwise choice model, the PCMC model reduces to an MNL model. Recent parameterizations of non-transitive pairwise probabilities such as the Blade-Chest model [8] can be usefully employed to reduce the number of free parameters of the PCMC model. Our PCMC model can be thought of as building upon the observation underlying the recently introduced Iterative Luce Spectral Ranking (I-LSR) procedure for efficiently finding the maximum likelihood estimate for parameters of MNL models [21]. The analysis of I-LSR is precisely analyzing a PCMC model in the special case where the matrix Q has been parameterized by BTL. In that case the stationary distribution of the chain is found to satisfy the stationary conditions of the MNL likelihood function, establishing a strong connection between MNL models and Markov chains. The PCMC model generalizes that connection. Other recent connections between the MNL model and Markov chains include the work on RankCentrality [24], which employs a discrete time Markov chain for inference in the place of I-LSR’s continuous time chain, in the special case where all data are pairwise comparisons. Separate recent work has contributed a different discrete time Markov chain model of “choice substitution” capable of approximating any RUM [3], a related problem but one with a strong focus on ordered preferences. Lastly, recent work by Kumar et al. explores conditions under which a probability distribution over discrete items can be expressed as the stationary distribution of a discrete time Markov chain with “score” functions similar to the “quality” parameters in an MNL model [17]. 2 The PCMC model is not a RUM, and in general does not exhibit stochastic transitivity, regularity, or the choice axiom. We find that the PCMC model does, however, obey the lesser known but fundamental axiom of uniform expansion, a weakened version of Luce’s choice axiom proposed by Yellott that implies the choice axiom for independent RUMs [30]. In this work we define a convenient structural property termed contractibility, for which uniform expansion is a special case, and we show that the PCMC model exhibits contractibility. Of the models mentioned above, only Elimination by Aspects exhibits uniform expansion without being an independent RUM. Elimination by Aspects obeys regularity, which the PCMC model does not; as such, the PCMC model is uniquely positioned in the literature of axiomatic discrete choice, minimally satisfying uniform expansion without the other aforementioned axioms. After presenting the model and its properties, we investigate choice predictions from our model on two empirical choice datasets as well as diverse synthetic datasets. The empirical choice datasets concern transportation choices made on commuting and shopping trips in San Francisco. Inference on synthetic data shows that PCMC is competitive with MNL when Luce’s choice axiom holds, while PCMC outperforms MNL when the axiom does not hold. More significantly, for both of the empirical datasets we find that a learned PCMC model predicts empirical choices significantly better than a learned MNL model. 2 The PCMC model a b c a b b c a c Figure 1: Markov chains on choice sets {a, b}, {a, c}, and {b, c}, where line thicknesses denote transition rates. The chain on the choice set {a, b, c} is assembled using the same rates. A Pairwise Choice Markov Chain (PCMC) model defines the selection probability piS, the probability of choosing i from S ⊆U, as the probability mass on alternative i ∈S of the stationary distribution of a continuous time Markov chain (CTMC) on the set of alternatives S. The model’s parameters are the off-diagonal entries qij of rate matrix Q indexed by pairs of elements in U. See Figure 1 for a diagram. We impose the constraint qij + qji ≥1 for all pairs (i, j), which ensures irreducibility of the chain for all S. Given a query set S ⊆U, we construct QS by restricting the rows and columns of Q to elements in S and setting qii = −P j∈S\i qij for each i ∈S. Let πS = {πS(i)}i∈S be the stationary distribution of the corresponding CTMC on S, and let πS(A) = P x∈A πS(x). We define the choice probability piS := πS(i), and now show that the PCMC model is well defined. Proposition 1. The choice probabilities piS are well defined for all i ∈S, all S ⊆U of a finite U. Proof. We need only to show that there is a single closed communicating class. Because S is finite, there must be at least one closed communicating class. Suppose the chain had more than one closed communicating class and that i ∈S and j ∈S were in different closed communicating classes. But qij+qji ≥1, so at least one of qij and qji is strictly positive and the chain can switch communicating classes through the transition with strictly positive rate, a contradiction. While the support of πS is the single closed communicating class, S may have transient states corresponding to alternatives with selection probability 0. Note that irreducibility argument needs only that qij + qji be positive, not necessarily at least 1 as imposed in the model definition. One could simply constrain qij + qji ≥ϵ for some positive ϵ. However, multiplying all entriesof Q by some c > 0 does not affect the stationary distribution of the corresponding CTMC, so multiplication by 1/ϵ gives a Q with the same selection probabilities. In the subsections that follow, we develop key properties of the model. We begin by showing how assigning Q according a Bradley-Terry-Luce (BTL) pairwise model results in the PCMC model being equivalent to BTL’s canonical extension, the Multinomial Logit (MNL) set-wise model. We then construct a Q for which the PCMC model is neither regular nor a RUM. 2.1 Multinomial Logit from Bradley-Terry-Luce We now observe that the Multinomial Logit (MNL) model, also called the Plackett-Luce model, is precisely a PCMC model with a matrix Q consisting of pairwise BTL probabilities. Recall that the BTL model assumes the existence of latent “quality” parameters γi > 0 for i ∈U with pij = γi/(γi + γj), ∀i, j ∈U and that the MNL generalization defines piS ∝γi, ∀i ∈S for each S ⊆U. 3 Proposition 2. Let γ be the parameters of a BTL model on U. For qji = γi γi+γj , the PCMC probabilities piS are consistent with an MNL model on S with parameters γ. Proof. We aim to show that πS = γ ||γ||1 is a stationary distribution of the PCMC chain: πT S QS = 0. We have: (πT S QS)i = 1 ||γ||1 X j̸=i γjqji −γi( X j̸=i qji) = γi ||γ||1 X j̸=i γj γi + γj − X j̸=i γj γi + γj = 0, ∀i. Thus πS is always the stationary distribution of the chain, and we know by Proposition 1 that it is unique. It follows that piS ∝γi for all i ∈S, as desired. Other parameterizations of Q, which can be used for parameter reduction or to extend arbitrary models for pairwise choice, are explored section 1 of the Supplementary material. 2.2 A counterexample to regularity The regularity property stipulates that for any S′ ⊂S, the probability of selecting a from S′ is at least the probability of selecting a from S. All RUMs exhibit regularity because S′ ⊆S implies Pr(Xi = maxj∈S′ Xj) ≥Pr(Xi = maxj∈S Xj). We now construct a simple PCMC model which does not exhibit regularity, and is thus not a RUM. Consider U = {r, p, s} corresponding to a rock-paper-scissors-like stochastic game where each pairwise matchup has the same win probability α > 1 2. Constructing a PCMC model where the transition rate from i to j is α if j beats i in rock-paper-scissors yields the rate matrix Q = " −1 1 −α α α −1 1 −α 1 −α α −1 # . We see that for pairs of objects, the PCMC model returns the same probabilities as the pairwise game, i.e. pij = α when i beats j in rock-paper-scissors, as pij = qji when qij+qji = 1. Regardless of how the probability α is chosen, however, it is always the case that prU = ppU = psU = 1/3. It follows that regularity does not hold for α > 2/3. We view the PCMC model’s lack of regularity is a positive trait in the sense that empirical choice phenomena such as framing effects and asymmetric dominance violate regularity [12], and the PCMC model is rare in its ability to model such choices. Deriving necessary and sufficient conditions on Q for a PCMC model to be a RUM, analogous to known characterization theorems for RUMs [10] and known sufficient conditions for nested MNL models to be RUMs [5], is an interesting open challenge. 3 Properties While we have demonstrated already that the PCMC model avoids several restrictive properties that are often inconsistent with empirical choice data, we demonstrate in this section that the PCMC model still exhibits deep structure in the form of contractibility, which implies uniform expansion. Inspired by a thought experiment that was posed as an early challenge to the choice axiom, we define the property of contractibility to handle notions of similarity between elements. We demonstrate that the PCMC model exhibits contractibility, which gracefully handles this thought experiment. 3.1 Uniform expansion Yellott [30] introduced uniform expansion as a weaker condition than Luce’s choice axiom, but one that implies the choice axiom in the context of any independent RUM. Yellott posed the axiom of invariance to uniform expansion in the context of “copies” of elements which are “identical.” In the context of our model, such copies would have identical transition rates to alternatives: Definition 1 (Copies). For i, j in S ⊆U, we say that i and j are copies if for all k ∈S −i −j, qik = qjk and qij = qji. 4 Yellott’s introduction to uniform expansion asks the reader to consider an offer of a choice of beverage from k identical cups of coffee, k identical cups of tea, and k identical glasses of milk. Yellott contends that the probability the reader chooses a type of beverage (e.g. coffee) in this scenario should be the same as if they were only shown one cup of each beverage type, regardless of k ≥1. Definition 2 (Uniform Expansion). Consider a choice between n elements in a set S1 = {i11, . . . , in1}, and another choice from a set Sk containing k copies of each of the n elements: Sk = {i11, . . . , i1k, i21, . . . , i2k, . . . , in1, . . . , ink}. The axiom of uniform expansion states that for each m = 1, . . . , n and all k ≥1: pim1S1 = k X j=1 pimjSk. We will show that the PCMC model always exhibits a more general property of contractibility, of which uniform expansion is a special case; it thus always exhibits uniform expansion. Yellott showed that for any independent RUM with |U| ≥3 the double-exponential distribution family is the only family of independent distributions that exhibit uniform expansion for all k ≥1, and that Thurstone’s model based on the Gaussian distribution family in particular does not exhibit uniform expansion. While uniform expansion seems natural in many discrete choice contexts, it should be regarded with some skepticism in applications that model competitions. Sports matches or races are often modeled using RUMs, where the winner of a competition can be modeled as the competitor with the best draw from their random variable. If a competitor has a performance distribution with a heavy upper tail (so that their wins come from occasional “good days”), uniform expansion would not hold. This observation relates to recent work on team performance and selection [14], where non-invariance under uniform expansion plays a key role. 3.2 Contractibility In a book review of Luce’s early work on the choice axiom, Debreu [9] considers a hypothetical choice between three musical recordings: one of Beethoven’s eighth symphony conducted by X, another of Beethoven’s eighth symphony conducted by Y , and one of Debussy quartet conducted by Z. We will call these options B1, B2, and D respectively. When compared to D, Debreu argues that B1 and B2 are indistinguishable in the sense that pDB1 = pDB2. However, someone may prefer B1 over B2 in the sense that pB1B2 > 0.5. This is impossible under a BTL model, in which pDB1 = pDB2 implies that γB1 = γB2 and in turn pB1B2 = 0.5. To address contexts in which elements compare identically to alternatives but not each other (e.g. B1 and B2), we introduce contractible partitions that group these similar alternatives into sets. We then show that when a PCMC model contains a contractible partition, the relative probabilities of selecting from one of these partitions is independent from how comparisons are made between alternatives in the same set. Our contractible partition definition can be viewed as akin to (but distinct from) nests in nested MNL models [22]. Definition 3 (Contractible Partition). A partition of U into non-empty sets A1, . . . , Ak is a contractible partition if qaiaj = λij for all ai ∈Ai, aj ∈Aj for some Λ = {λij} for i, j ∈{1, . . . , k}. Proposition 3. For a given Λ, let A1, . . . , Ak be a contractible partition for two PCMC models on U represented by Q, Q′ with stationary distributions π, π′. Then for any Ai: X j∈Ai pjU = X j∈Ai p′ jU, (1) or equivalently, π(Ai) = π′(Ai). Proof. Suppose Q has contractible partition A1, . . . , Ak with respect to Λ. If we decompose the balance equations (i.e. each row of πT Q = 0), for x ∈A1 WLOG we obtain: π(x) X y∈A1\x qxy + k X i=2 X ai∈Ai qxai = X y∈A1\x π(y)qyx + k X i=2 X ai∈Ai π(ai)qaix. (2) 5 Noting that for ai ∈Ai and aj ∈Aj, qaiaj = λij, (2) can be rewritten: π(x) X y∈A1\x qxy + π(x) k X i=2 |Ai|λi1 = X y∈A1\x π(y)qyx + k X i=2 π(Ai)λi1. Summing over x ∈A1 then gives X x∈A1 π(x) X y∈A1\x qxy + π(A1) k X i=2 |Ai|λi1 = X x∈A1 X y∈A1\x π(y)qyx + |A1| k X i=2 π(Ai)λi1. The leftmost term of each side is equal, so we have π(A1) = |A1| Pk i=2 π(Ai)λi1 P i=2 |Ai|λ1i , (3) which makes π(A1) the solution to global balance equations for a different continuous time Markov chain with the states {A1, . . . , Ak} and transition rate ˜qAiAj = |Aj|λij between state Ai and Aj, and ˜qAiAi = −P j̸=i ˜qAiAj. Now qaiaj + qajai ≥1 implies λij + λji ≥1. Combining this observation with |Ai| > 0 shows (as with the proof of Proposition 1) that this chain is irreducible and thus that {π(Ai)}k i=1 are well-defined. Furthermore, because ˜Q is determined entirely by Λ and |A1|, . . . , |Ak|, we have that ˜Q = ˜Q′, and thus that π(Ai) = π′(Ai), ∀i regardless of how Q and Q′ may differ, completing the proof. The intuition is that we can “contract” each Ai to a single “type” because the probability of choosing an element of Ai is independent of the pairwise probabilities between elements within the sets. The above proposition and the contractibility of a PCMC model on all uniformly expanded sets implies that all PCMC models exhibit uniform expansion. Proposition 4. Any PCMC model exhibits uniform expansion. Proof. We translate the problem of uniform expansion into the language of contractibility. Let U1 be the universe of unique items i11, i21, . . . , in1, and let Uk be a universe containing k copies of each item in U1. Let imj denote the jth copy of the mth item in U1. Thus Uk = ∪n m=1 ∪k j=1 imj. Let Q be the transition rate matrix of the CTMC on U1. We construct a contractible partition of Uk into the n sets, each containing the k copies of some item in U1. Thus Am = ∪k j=1imj. By the definition of copies, that {Am}n m=1 is a contractible partition of Uk with Λ = Q. Noting |Am| = k for all m in Equation (3) above results in {π(Am)}n m=1 being the solution to πT Q = πT Λ = 0. Thus pimU1 = π(Am) = Pk j=1 pimjUk for each m, showing that the model exhibits uniform expansion. We end this section by noting that every PCMC model has a trivial contractible partition into singletons. Detection and exploitation of Q’s non-trivial contractible partitions (or appropriately defined “nearly contractible partitions”) are interesting open research directions. 4 Inference and prediction Our ultimate goal in formulating this model is to make predictions: using past choices from diverse subsets S ⊆U to predict future choices. In this section we first give the log-likelihood function log L(Q; C) of the rate matrix Q given a choice data collection of the form C = {(ik, Sk)}n k=1, where ik ∈Sk was the item chosen from Sk. We then investigate the ability of a learned PCMC model to make choice predictions on empirical data, benchmarked against learned MNL and MMNL models, and interpret the inferred model parameters ˆQ. Let CiS(C) = |{(ik, Sk) ∈C : ik = i, Sk = S}| denote the number of times in the data that i was chosen out of set S for each S ⊆U, and let CS(C) = |{(ik, Sk) ∈C : Sk = S}| be the number of times that S was the choice set for each S ⊆U. 6 4.1 Maximum likelihood For each S ⊆U, i ∈S, recall that piS(Q) is the probability that i is selected from set S as a function of the rate matrix Q. After dropping all additive constants, the log-likelihood of Q given the data C (derived from the probability mass function of the multinomial distribution) is: log L(Q; C) = X S⊆U X i∈S CiS(C) log(piS(Q)). Recall that for the PCMC model, piS(Q) = πS(i), where πS is the stationary distribution for a CTMC with rate matrix QS, i.e. πT S QS = 0 and P i∈S πS(i) = 1. There is no general closed form expression for piS(Q). The implicit definition also makes it difficult to derive gradients for log L with respect to the parameters qij. We employ SLSQP [25] to maximize log L(Q; C), which is nonconcave in general. For more information on the optimization techniques used in this section, see the Supplementary Materials. 4.2 Empirical data results We evaluate our inference procedure on two empirical choice datasets, SFwork and SFshop, collected from a survey of transportation preferences around the San Francisco Bay Area [16]. The SFshop dataset contains 3,157 observations each consisting of a choice set of transportation alternatives available to individuals traveling to and returning from a shopping center, as well as a choice from that choice set. The SFwork dataset, meanwhile, contains 5,029 observations consisting of commuting options and the choice made on a given commute. Basic statistics describing the choice set sizes and the number of times each pair of alternatives appear in the same choice set appear in the Supplementary Materials1. We train our model on observations Ttrain ⊂C and evaluate on a test set Ttest ⊂C via Error(Ttrain; Ttest) = 1 |Ttest| X (i,S)∈Ttest X j∈S |pjS( ˆQ(Ttrain)) −˜piS(Ttest)|, (4) where ˆQ(Ttrain) is the estimate for Q obtained from the observations in Ttrain and ˜piS(Ttest) = CiS(Ttest)/CS(Ttest) is the empirical probability of i was selected from S among observations in Ttest. Note that Error(Ttrain; Ttest) is the expected ℓ1-norm of the difference between the empirical distribution and the inferred distribution on a choice set drawn uniformly at random from the observations in Ttest. We applied small amounts of additive smoothing to each dataset. We compare our PCMC model against both an MNL model trained using Iterative Luce Spectral Ranking (I-LSR) [21] and a more flexible MMNL model. We used a discrete mixture of k MNL models (with O(kn) parameters), choosing k so that the MMNL model had strictly more parameters than the PCMC model on each data set. For details on how the MMNL model was trained, see the Supplementary Materials. Figure 2 shows Error(Ttrain; Ttest) on the SFwork data as the learning procedure is applied to increasing amounts of data. The results are averaged over 1,000 different permutations of the data with a 75/25 train/test split employed for each permutation. We show the error on the testing data as we train with increasing proportions of the training data. A similar figure for SFshop data appears in the Supplementary Materials. We see that our model is better equipped to learn from and make predictions in both datasets, and when using all of the training data, we observe an error reduction of 36.2% and 46.5% compared to MNL and 24.4% and 31.7% compared to MMNL on SFwork and SFshop respectively. Figure 2 also gives two different heat maps of ˆQ for the SFwork data, showing the relative rates ˆqij/ˆqji between pairs of items as well as how the total rate ˆqij + ˆqji between pairs compares to total rates between other pairs. The index ordering of each matrix follows the estimated selection probabilities of the PCMC model on the full set of the alternatives for that dataset. The ordered options for SFwork are: (1) driving alone, (2) sharing a ride with one other person, (3) walking, 1Data and code available here: https://github.com/sragain/pcmc-nips 7 Figure 2: Prediction error on a 25% holdout of the SFwork data for the PCMC, MNL, and MMNL models. PCMC sees improvements of 35.9% and 24.5% in prediction error over MNL and MMNL, respectively, when training on 75% of the data. (4) public transit, (5) biking, and (6) carpooling with at least two others. Numerical values for the entries of ˆQ for both datasets appear in the Supplementary Materials. The inferred pairwise selection probabilities are ˆpij = ˆqji/(ˆqji + ˆqij). Constructing a tournament graph on the alternatives where (i, j) ∈E if ˆpij ≥0.5, cyclic triplets are then length-3 cycles in the tournament. A bound due to Harary and Moser [11] establishes that the maximum number of cyclic triples on a tournament graph on n nodes is 8 when n = 6 and 20 when n = 8. According to our learned model, the choices exhibit 2 out of a maximum 8 cyclic triplets in the SFwork data and 6 out of a maximum 20 cyclic triplets for the SFshop data. Additional evaluations of predictive performance across a range of synthetic datasets appear in the Supplementary Materials. The majority of datasets in the literature on discrete choice focus on pairwise comparisons or ranked lists, where lists inherently assume transitivity and the independence of irrelevant alternatives. The SFwork and SFshop datasets are rare examples of public datasets that genuinely study choices from sets larger than pairs. 5 Conclusion We introduce a Pairwise Choice Markov Chain (PCMC) model of discrete choice which defines selection probabilities according to the stationary distributions of continuous time Markov chains on alternatives. The model parameters are the transition rates between pairs of alternatives. In general the PCMC model is not a random utility model (RUM), and maintains broad flexibility by eschewing the implications of Luce’s choice axiom, stochastic transitivity, and regularity. Despite this flexibility, we demonstrate that the PCMC model exhibits desirable structure by fulfilling uniform expansion, a property previously found only in the Multinomial Logit (MNL) model and the intractable Elimination by Aspects model. We also introduce the notion of contractibility, a property motivated by thought experiments instrumental in moving choice theory beyond the choice axiom, for which Yellott’s axiom of uniform expansion is a special case. Our work demonstrates that the PCMC model exhibits contractibility, which implies uniform expansion. We also showed that the PCMC model offers straightforward inference through maximum likelihood estimation, and that a learned PCMC model predicts empirical choice data with a significantly higher fidelity than both MNL and MMNL models. The flexibility and tractability of the PCMC model opens up many compelling research directions. First, what necessary and sufficient conditions on the matrix Q guarantee that a PCMC model is a RUM [10]? The efficacy of the PCMC model suggests exploring other effective parameterizations for Q, including developing inferential methods which exploit contractibility. There are also open computational questions, such as streamlining the likelihood maximization using gradients of the implicit function definitions. Very recently, learning results for nested MNL models have shown favorable query complexity under an oracle model [2], and a comparison of our PCMC model with these approaches to learning nested MNL models is important future work. Acknowledgements. This work was supported in part by a David Morgenthaler II Faculty Fellowship and a Dantzig–Lieberman Operations Research Fellowship. 8 References [1] E. Adams and S. Messick. An axiomatic formulation and generalization of successive intervals scaling. Psychometrika, 23(4):355–368, 1958. [2] A. R. Benson, R. Kumar, and A. Tomkins. On the relevance of irrelevant alternatives. In WWW, 2016. [3] J. Blanchet, G. Gallego, and V. Goyal. A markov chain approximation to choice modeling. In EC, 2013. [4] H. D. Block and J. Marschak. Random orderings and stochastic theories of responses. Contributions to Probability and Statistics, 2:97–132, 1960. [5] A. B¨orsch-Supan. On the compatibility of nested logit models with utility maximization. Journal of Econometrics, 43(3):373–388, 1990. [6] J H Boyd and R E Mellman. The effect of fuel economy standards on the us automotive market: an hedonic demand analysis. Transportation Research Part A: General, 14(5-6):367–378, 1980. [7] R. A. Bradley and M. E. Terry. Rank analysis of incomplete block designs the method of paired comparisons. Biometrika, 39(3-4):324–345, 1952. [8] S. Chen and T. Joachims. Modeling intransitivity in matchup and comparison data. In WSDM, 2016. [9] G. Debreu. Review of individual choice behavior: A theoretical analysis. American Economic Review, 1960. [10] J.-C. Falmagne. A representation theorem for finite random scale systems. J. Math. Psych., 18(1):52–72, 1978. [11] Frank Harary and Leo Moser. The theory of round robin tournaments. The American Mathematical Monthly, 73(3):231–246, 1966. [12] J. Huber, J. W. Payne, and C. Puto. Adding asymmetrically dominated alternatives: Violations of regularity and the similarity hypothesis. Journal of Consumer Research, pages 90–98, 1982. [13] S. Ieong, N. Mishra, and O. Sheffet. Predicting preference flips in commerce search. In ICML, 2012. [14] J. Kleinberg and M. Raghu. Team performance with test scores. In EC, pages 511–528, 2015. [15] R. Kohli and K. Jedidi. Error theory for elimination by aspects. Operations Research, 63(3):512–526, 2015. [16] F. S Koppelman and C. Bhat. A self instructing course in mode choice modeling: multinomial and nested logit models. US Department of Transportation, Federal Transit Administration, 31, 2006. [17] Ravi Kumar, Andrew Tomkins, Sergei Vassilvitskii, and Erik Vee. Inverting a steady-state. In Proceedings of the Eighth ACM International Conference on Web Search and Data Mining, pages 359–368. ACM, 2015. [18] R. D. Luce. Individual Choice Behavior: A Theoretical Analysis. Wiley, 1959. [19] R. D. Luce. The choice axiom after twenty years. J. Math. Psych., 15(3):215–233, 1977. [20] C. F. Manski. The structure of random utility models. Theory and Decision, 8(3):229–254, 1977. [21] L. Maystre and M. Grossglauser. Fast and accurate inference of plackett–luce models. In NIPS, 2015. [22] D. McFadden. Econometric models for probabilistic choice among products. Journal of Business, pages S13–S29, 1980. [23] D. McFadden, K. Train, et al. Mixed mnl models for discrete response. Journal of Applied Econometrics, 15(5):447–470, 2000. [24] S. Negahban, S. Oh, and D. Shah. Rank centrality: Ranking from pair-wise comparisons. arXiv preprint arXiv:1209.1688v4, 2015. [25] J. Nocedal and S. J. Wright. Numerical optimization. 2006. [26] I. Simonson and A. Tversky. Choice in context: Tradeoff contrast and extremeness aversion. Journal of Marketing Research, 29(3):281, 1992. [27] L. L. Thurstone. A law of comparative judgment. Psychological Review, 34(4):273, 1927. [28] J. S. Trueblood, S. D. Brown, A. Heathcote, and J. R. Busemeyer. Not just for consumers context effects are fundamental to decision making. Psychological Science, 24(6):901–908, 2013. [29] A. Tversky. Elimination by aspects: A theory of choice. Psychological Review, 79(4):281, 1972. [30] J. I. Yellott. The relationship between luce’s choice axiom, thurstone’s theory of comparative judgment, and the double exponential distribution. J. Math. Psych., 15(2):109–144, 1977. 9 | 2016 | 434 |
6,366 | Stochastic Variational Deep Kernel Learning Andrew Gordon Wilson* Cornell University Zhiting Hu* CMU Ruslan Salakhutdinov CMU Eric P. Xing CMU Abstract Deep kernel learning combines the non-parametric flexibility of kernel methods with the inductive biases of deep learning architectures. We propose a novel deep kernel learning model and stochastic variational inference procedure which generalizes deep kernel learning approaches to enable classification, multi-task learning, additive covariance structures, and stochastic gradient training. Specifically, we apply additive base kernels to subsets of output features from deep neural architectures, and jointly learn the parameters of the base kernels and deep network through a Gaussian process marginal likelihood objective. Within this framework, we derive an efficient form of stochastic variational inference which leverages local kernel interpolation, inducing points, and structure exploiting algebra. We show improved performance over stand alone deep networks, SVMs, and state of the art scalable Gaussian processes on several classification benchmarks, including an airline delay dataset containing 6 million training points, CIFAR, and ImageNet. 1 Introduction Large datasets provide great opportunities to learn rich statistical representations, for accurate predictions and new scientific insights into our modeling problems. Gaussian processes are promising for large data problems, because they can grow their information capacity with the amount of available data, in combination with automatically calibrated model complexity [21, 25]. From a Gaussian process perspective, all of the statistical structure in data is learned through a kernel function. Popular kernel functions, such as the RBF kernel, provide smoothing and interpolation, but cannot learn representations necessary for long range extrapolation [22, 25]. With smoothing kernels, we can only use the information in a large dataset to learn about noise and length-scale hyperparameters, which tell us only how quickly correlations in our data vary with distance in the input space. If we learn a short length-scale hyperparameter, then by definition we will only make use of a small amount of training data near each testing point. If we learn a long length-scale, then we could subsample the data and make similar predictions. Therefore to fully use the information in large datasets, we must build kernels with great representational power and useful learning biases, and scale these approaches without sacrificing this representational ability. Indeed many recent approaches have advocated building expressive kernel functions [e.g., 22, 9, 26, 25, 17, 31], and emerging research in this direction takes inspiration from deep learning models [e.g., 28, 5, 3]. However, the scalability, general applicability, and interpretability of such approaches remain a challenge. Recently, Wilson et al. [30] proposed simple and scalable deep kernels for single-output regression problems, with promising performance on many experiments. But their approach does not allow for stochastic training, multiple outputs, deep architectures with many output features, or classification. And it is on classification problems, in particular, where we often have high dimensional input vectors, with little intuition about how these vectors should correlate, and therefore most want to learn a flexible non-Euclidean similarity metric [1]. *Equal contribution. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. In this paper, we introduce inference procedures and propose a new deep kernel learning model which enables (1) classification and non-Gaussian likelihoods; (2) multi-task learning1; (3) stochastic gradient mini-batch training; (4) deep architectures with many output features; (5) additive covariance structures; and (5) greatly enhanced scalability. We propose to use additive base kernels corresponding to Gaussian processes (GPs) applied to subsets of output features of a deep neural architecture. We then linearly mix these Gaussian processes, inducing correlations across multiple output variables. The result is a deep probabilistic neural network, with a hidden layer composed of additive sets of infinite basis functions, linearly mixed to produce correlated output variables. All parameters of the deep architecture and base kernels are jointly learned through a marginal likelihood objective, having integrated away all GPs. For scalability and non-Gaussian likelihoods, we derive stochastic variational inference (SVI) which leverages local kernel interpolation, inducing points, and structure exploiting algebra, and a hybrid sampling scheme, building on Wilson and Nickisch [27], Wilson et al. [29], Titsias [24], Hensman et al. [10], and Nickson et al. [18]. The resulting approach, SV-DKL, has a complexity of O(m1+1/D) for m inducing points and D input dimensions, versus the standard O(m3) for efficient stochastic variational methods. We achieve good predictive accuracy and scalability over a wide range of classification tasks, while retaining a straightforward, general purpose, and highly practical probabilistic non-parametric representation, with code available at https://people.orie.cornell.edu/andrew/code. 2 Background Throughout this paper, we assume we have access to vectorial input-output pairs D = {xi, yi}, where each yi is related to xi through a Gaussian process and observation model. For example, in regression, one could model y(x)|f(x) ∼N(y(x); f(x), σ2I), where f(x) is a latent vector of independent Gaussian processes f j ∼GP(0, kj), and σ2I is a noise covariance matrix. The computational bottleneck in working with Gaussian processes typically involves computing (KX,X + σ2I)−1y and log |KX,X| over an n × n covariance matrix KX,X evaluated at n training inputs X. Standard procedure is to compute the Cholesky decomposition of KX,X, which incurs O(n3) computations and O(n2) storage, after which predictions cost O(n2) per test point. Gaussian processes are thus typically limited to at most a few thousand training points. Many promising approaches to scalability have been explored, for example, involving randomized methods [20, 16, 31] , and low rank approximations [23, 19]. Wilson and Nickisch [27] recently introduced the KISS-GP approximate kernel matrix eKX,X′ = MXKZ,ZM ⊤ X′, which admits fast computations, given the exact kernel matrix KZ,Z evaluated on a latent multidimensional lattice of m inducing inputs Z, and MX, a sparse interpolation matrix. Without requiring any grid structure in X, KZ,Z decomposes into a Kronecker product of Toeplitz matrices, which can be approximated by circulant matrices [29]. Exploiting such structure in combination with local kernel interpolation enables one to use many inducing points, resulting in near-exact accuracy in the kernel approximation, and O(n) inference. Unfortunately, this approach does not typically apply to D > 5 dimensional inputs [29]. Moreover, the Gaussian process marginal likelihood does not factorize, and thus stochastic gradient descent does not ordinarily apply. To address this issue, Hensman et al. [10] extended the variational approach from Titsias [24] and derived a stochastic variational GP posterior over inducing points for a regression model which does have the required factorization for stochastic gradient descent. Hensman et al. [12], Hensman et al. [11], and Dezfouli and Bonilla [6] further combine this with a sampling procedure for estimating non-conjugate expectations. These methods have O(m3) sampling complexity which becomes prohibitive where many inducing points are desired for accurate approximation. Nickson et al. [18] consider Kronecker structure in the stochastic approximation of Hensman et al. [10] for regression, but do not leverage local kernel interpolation or sampling. To address these limitations, we introduce a new deep kernel learning model for multi-task classification, mini-batch training, and scalable kernel interpolation which does not require low dimensional input spaces. In this paper, we view scalability and flexibility as two sides of one coin: we most want the flexible models on the largest datasets, which contain the necessary information to discover rich 1We follow the GP convention where multi-task learning involves a function mapping a single input to multiple correlated output responses (class probabilities, regression responses, etc.). Unlike NNs which naturally have correlated outputs by sharing hidden basis functions (and multi-task can have a more specialized meaning), most GP models perform multiple binary classification, ignoring correlations between output classes. Even applying a GP to NN features for deep kernel learning does not naturally produce multiple correlated outputs. 2 x1 xD Input layer h(1) 1 h(1) A . . . . . . h(2) 1 h(2) B h(L) 1 h(L) Q W (1) W (2) W (L) Hidden layers Additive GP layer y1 yC Output layer . . . . . . . . . . . . . . . . . . f1 fJ A Figure 1: Deep Kernel Learning for Multidimensional Outputs. Multidimensional inputs x ∈RD are mapped through a deep architecture, and then a series of additive Gaussian processes f1, . . . , fJ, with base kernels k1, . . . , kJ, are each applied to subsets of the network features h(L) 1 , . . . , h(L) Q . The thick lines indicate a probabilistic mapping. The additive Gaussian processes are then linearly mixed by the matrix A and mapped to output variables y1, . . . , yC (which are then correlated through A). All of the parameters of the deep network, base kernel, and mixing layer, γ = {w, θ, A} are learned jointly through the (variational) marginal likelihood of our model, having integrated away all of the Gaussian processes. We can view the resulting model as a Gaussian process which uses an additive series of deep kernels with weight sharing. statistical structure. We show that the resulting approach can learn very expressive and interpretable kernel functions on large classification datasets, containing millions of training points. 3 Deep Kernel Learning for Multi-task Classification We propose a new deep kernel learning approach to account for classification and non-Gaussian likelihoods, multiple correlated outputs, additive covariances, and stochastic gradient training. We propose to build a probabilistic deep network as follows: 1) a deep non-linear transformation h(x, w), parametrized by weights w, is applied to the observed input variable x, to produce Q features at the final layer L, h(L) 1 , . . . , h(L) Q ; 2) J Gaussian processes, with base kernels k1, . . . , kJ, are applied to subsets of these features, corresponding to an additive GP model [e.g., 7]. The base kernels can thus act on relatively low dimensional inputs, where local kernel interpolation and learning biases such as similarities based on Euclidean distance are most natural; 3) these GPs are linearly mixed by a matrix A ∈RC×J, and transformed by an observation model, to produce the output variables y1, . . . , yC. The mixing of these variables through A produces correlated multiple outputs, a multi-task property which is uncommon in Gaussian processes or SVMs. The structure of this network is illustrated in Figure 1. Critically, all of the parameters in the model (including base kernel hyperparameters) are trained through optimizing a marginal likelihood, having integrated away the Gaussian processes, through the variational inference procedures described in section 4. For classification, we consider a special case of this architecture. Let C be the number of classes, and we have data {xi, yi}n i=1, where yi ∈{0, 1}C is a one-shot encoding of the class label. We use the softmax observation model: p(yi|f i, A) = exp(A(f i)⊤yi) P c exp(A(f i)⊤ec), (1) where f i ∈RJ is a vector of independent Gaussian processes followed by a linear mixing layer A(f i) = Af i; and ec is the indicator vector with the cth element being 1 and the rest 0. For the jth Gaussian process in the additive GP layer, let f j = {fij}n i=1 be the latent functions on the input data features. By introducing a set of latent inducing variables uj indexed by m inducing inputs Z, we can write [e.g., 19] p(f j|uj) = N(f j|K(j) X,ZK(j),−1 Z,Z uj, eK(j)) , eK = KX,X −KX,ZK−1 Z,ZKZ,X . (2) Substituting the local interpolation approximation KX,X′ = MKZ,ZM ⊤of Wilson and Nickisch [27] into Eq. (2), we find eK(j) = 0; it therefore follows that f j = KX,ZK−1 Z,Zu = Mu. In section 4 we exploit this deterministic relationship between f and u, governed by the sparse matrix M, to derive a particularly efficient stochastic variational inference procedure. 3 Eq. (1) and Eq. (2) together form the additive GP layer and the linear mixing layer of the proposed deep probabilistic network in Figure 1, with all parameters (including network weights) trained jointly through the Gaussian process marginal likelihood. 4 Structure Exploiting Stochastic Variational Inference Exact inference and learning in Gaussian processes with a non-Gaussian likelihood is not analytically tractable. Variational inference is an appealing approximate technique due to its automatic regularization to avoid overfitting, and its ability to be used with stochastic gradient training, by providing a factorized approximation to the Gaussian process marginal likelihood. We develop our stochastic variational method equipped with a fast sampling scheme for tackling any intractable marginalization. Let u = {uj}J j=1 be the collection of the inducing variables of the J additive GPs. We assume a variational posterior over the inducing variables q(u). By Jensen’s inequality we have log p(y) ≥Eq(u)p(f|u)[log p(y|f)] −KL[q(u)∥p(u)] ≜L(q), (3) where we have omitted the mixing weights A for clarity. The KL divergence term can be interpreted as a regularizer encouraging the approximate posterior q(u) to be close to the prior p(u). We aim at tightening the marginal likelihood lower bound L(q) which is equivalent to minimizing the KL divergence from q to the true posterior. Since the likelihood function typically factorizes over data instances: p(y|f) = Qn i=1 p(yi|f i), we can optimize the lower bound with stochastic gradients. In particular, we specify q(u) = Q j N(uj|µj, Sj) for the independent GPs, and iteratively update the variational parameters {µj, Sj}J j=1 and the kernel and deep network parameters using a noisy approximation of the gradient of the lower bound on minibatches of the full data. Henceforth we omit the index j for clarity. Unfortunately, for general non-Gaussian likelihoods the expectation in Eq (3) is usually intractable. We develop a sampling method for tackling this intractability which is highly efficient with structured reparameterization, local kernel interpolation, and structure exploiting algebra. Using local kernel interpolation, the latent function f is expressed as a deterministic local interpolation of the inducing variables u (section 3). This result allows us to work around any difficult approximate posteriors on f which typically occur in variational approaches for GPs. Instead, our sampler only needs to account for the uncertainty on u. The direct parameterization of q(u) yields a straightforward and efficient sampling procedure. The latent function samples (indexed by t) are then computed directly through interpolation f (t) = Mu(t). As opposed to conventional mean-field methods, which assume a diagonal variational covariance matrix, we use the Cholesky decomposition for reparameterizing u in order to preserve structures within the covariance. Specifically, we let S = LT L, resulting in the following sampling procedure: u(t) = µ + Lϵ(t); ϵ(t) ∼N(0, I). Each step of the above standard sampler has complexity of O(m2), where m is the number of inducing points. Due to the matrix vector product, this sampling procedure becomes prohibitive in the presence of many inducing points, which are required for accuracy on large datasets with multidimensional inputs – particularly if we have an expressive kernel function [27]. We scale up the sampler by leveraging the fact that the inducing points are placed on a grid (taking advantage of both Toeplitz and circulant structure), and additionally imposing a Kronecker decomposition on L = ND d=1 Ld, where D is the input dimension of the base kernel. With the fast Kronecker matrix-vector products, we reduce the above sampling cost of O(m2) to O(m1+1/D). Our approach thus greatly improves over previous stochastic variational methods which typically scale with O(m3) complexity, as discussed shortly. Note that the KL divergence term between the two Gaussians in Eq (3) has a closed form without the need for Monte Carlo estimation. Computing the KL term and its derivatives, with the Kronecker method, is O(Dm 3 D ). With T samples of u and a minibatch of data points of size B, we can estimate the marginal likelihood lower bound as L ≃N TB T X t=1 B X i=1 log p(yi|f (t) i ) −KL[q(u)∥p(u)], (4) 4 and the derivatives ∇L w.r.t the model hyperparameters γ and the variational parameters {µ, {Ld}D d=1} can be taken similarly. We provide the detailed derivation in the supplement. Although a small body of pioneering work has developed stochastic variational methods for Gaussian processes, our approach distinctly provides the above representation-preserving variational approximation, and exploits algebraic structure for significant advantages in scalability and accuracy. In particular, a similar variational lower bound as in Eq (3) was proposed in [24, 10] for a sparse GP, which were extended to non-conjugate likelihoods, with the intractable integrals estimated using Gaussian quadrature as in the KLSP-GP [11] or univariate Gaussian samples as in the SAVI-GP [6]. Hensman et al. [12] estimates nonconjugate expectations with a hybrid Monte Carlo sampler (denoted as MC-GP). The computations in these approaches can be costly, with O(m3) complexity, due to a complicated variational posterior over f as well as the expensive operations on the full inducing point matrix. In addition to its increased efficiency, our sampling scheme is much simpler, without introducing any additional tuning parameters. We empirically compare with these methods and show the practical significance of our algorithm in section 5. Variational methods have also been used in GP regression for stochastic inference (e.g., [18, 10]), and some of the most recent work in this area applied variational auto-encoders [14] for coupled variational updates (aka back constraints) [4, 2]. We note that these techniques are orthogonal and complementary to our inference approach, and can be leveraged for further enhancements. 5 Experiments We evaluate our proposed approach, stochastic variational deep kernel learning (SV-DKL), on a wide range of classification problems, including an airline delay task with over 5.9 million data points (section 5.1), a large and diverse collection of classification problems from the UCI repository (section 5.2), and image classification benchmarks (section 5.3). Empirical results demonstrate the practical significance of our approach, which provides consistent improvements over stand-alone DNNs, while preserving a GP representation, and dramatic improvements in speed and accuracy over modern state of the art GP models. We use classification accuracy when comparing to DNNs, because it is a standard for evaluating classification benchmarks with DNNs. However, we also compute the negative log probability (NLP) values (supplement), which show similar trends. All experiments were performed on a Linux machine with eight 4.0GHz CPU cores, one Tesla K40c GPU, and 32GB RAM. We implemented deep neural networks with Caffe [13]. Model Training For our deep kernel learning model, we used deep neural networks which produce C-dimensional top-level features. Here C is the number of classes. We place a Gaussian process on each dimension of these features. We used RBF base kernels. The additive GP layer is then followed by a linear mixing layer A ∈RC×C. We initialized A to be an identity matrix, and optimized in the joint learning procedure to recover cross-dimension correlations from data. We first train a deep neural network using SGD with the softmax loss objective, and rectified linear activation functions. After the neural network has been pre-trained, we fit an additive KISS-GP layer, followed by a linear mixing layer, using the top-level features of the deep network as inputs. Using this pre-training initialization, our joint SV-DKL model of section 3 is then trained through the stochastic variational method of section 4 which jointly optimizes all the hyperparameters γ of the deep kernel (including all network weights), as well as the variational parameters, by backpropagating derivatives through the proposed marginal likelihood lower bound of the additive Gaussian process in section 4. In all experiments, we use a relatively large mini-batch size (specified according to the full data size), enabled by the proposed structure exploiting variational inference procedures. We achieve good performance setting the number of samples T = 1 in Eq. 4 for expectation estimation in variational inference, which provides additional confirmation for a similar observation in [14]. 5.1 Airline Delays We first consider a large airline dataset consisting of flight arrival and departure details for all commercial flights within the US in 2008. The approximately 5.9 million records contain extensive information about the flights, including the delay in reaching the destination. Following [11], we consider the task of predicting whether a flight was subject to delay based on 8 features (e.g., distance to be covered, day of the week, etc). 5 Classification accuracy Table 1 reports the classification accuracy of 1) KLSP-GP [11], a recent scalable variational GP classifier as discussed in section 4; 2) stand-alone deep neural network (DNN); 3) DNN+, a stand-alone DNN with an extra Q × c fully-connected hidden layer with Q, c defined as in Figure 1; 4) DNN+GP which is a GP applied to a pre-trained DNN (with same architecture as in 2); and 5) our stochastic variational DKL method (SV-DKL) (same DNN architecture as in 2). For DNN, we used a fully-connected architecture with layers d-1000-1000-500-50-c.2 The DNN component of the SV-DKL model has the exact same architecture. The SV-DKL joint training was conducted using a large minibatch size of 50,000 to reduce the variance of the stochastic gradient. We can use such a large minibatch in each iteration (which is daunting for regular GP even as a whole dataset) due to the efficiency of our inference strategy within each mini-batch, leveraging structure exploiting algebra. From the table we see that SV-DKL outperforms both the alternative variational GP model (KLSPGP) and the stand-alone deep network. DNN+GP outperforms stand-alone DNNs, showing the non-parametric flexibility of kernel methods. By combining KISS-GP with DNNs as part of a joint SV-DKL procedure, we obtain better results than DNN and DNN+GP. Besides, both the plain DNN and SV-DKL notably improve on stand-alone GPs, indicating a superior capacity of deep architectures to learn representations from large but finite training sets, despite the asymptotic approximation properties of Gaussian processes. By contrast, adding an extra hidden layer, as in DNN+, does not improve performance. Figure 2(a) further studies how performance changes as data size increases. We observe that the proposed SV-DKL classifier trained on 1/50 of the data already can reach a competitive accuracy as compared to the KLSP-GP model trained on the full dataset. As the number of the training points increases, the SV-DKL and DNN models continue to improve. This experiment demonstrates the value of expressive kernel functions on large data problems, which can effectively capture the extra information available as seeing more training instances. Furthermore, SV-DKL consistently provides better performance over the plain DNN, through its non-parametric flexibility. Scalability We next measure the scalability of our variational DKL in terms of the number of inducing points m in each GP. Figure 2(c) shows the runtimes in seconds, as a function of m, for evaluating the objective and any relevant derivatives. We compare our structure exploiting variational method with the scalable variational inference in KLSP-GP, and the MCMC-based variational method in MC-GP [12]. We see that our inference approach is far more efficient than previous scalable algorithms. Moreover, when the number of inducing points is not too large (e.g., m = 70), the added time for SV-DKL over DNN is reasonable (e.g., 0.39s vs. 0.27s), especially considering the gains in performance and expressive power. Figure 2(d) shows the runtime scaling of different variational methods as m grows. We can see that the runtime of our approach increases only slowly in a wide range of m (< 2, 000), greatly enhancing the scalability over the other methods. This empirically validates the improved time complexity of our new inference method as presented in section 4. We next investigate the total training time of the models. Table 1, right panel, lists the time cost of training KLSP-GP, DNN, and SV-DKL; and Figure 2(b) shows how the training time of SV-DKL and DNN changes as more training data is presented. We see that on the full dataset DKL, as a GP model, saves over 60% time as compared to the modern state of the art KLSP-GP, while at the same time achieving over an 18% improvement in predictive accuracy. Generally, the training time of SV-DKL increases slowly with growing data sizes, and has only modest additional overhead compared to stand-alone architectures, justified by improvements in performance, and the general benefits of a non-parametric probabilistic representation. Moreover, the DNN was fully trained on a GPU, while in SV-DKL the base kernel hyperparameters and variational parameters were optimized on a CPU. Since most updates of the SV-DKL parameters are computed in matrix forms, we believe the already modest time gap between SV-DKL and DNNs can be almost entirely closed by deploying the whole SV-DKL model on GPUs. 5.2 UCI Classification Tasks The second evaluation of our proposed algorithm (SV-DKL) is conducted on a number of commonly used UCI classification tasks of varying sizes and properties. Table 1 (supplement) lists the classification accuracy of SVM, DNN, DNN+ (a stand-alone DNN with an extra Q × c fully-connected hidden layer with Q, c defined as in Figure 1), DNN+GP (a GP trained on the top level features of a trained DNN without the extra hidden layer), and SV-DKL (same architecture as DNN). 2We obtained similar results with other DNN architectures (e.g., d-1000-1000-500-50-20-c). 6 Table 1: Classification accuracy and training time on the airline delay dataset, with n data points, d input dimensions, and c classes. KLSP-GP is a stochastic variational GP classifier proposed in [11]. DNN+ is the DNN with an extra hidden layer. DNN+GP is a GP applied to fixed pre-trained output layer of the DNN (without the extra hidden layer). Following Hensman et al. [11], we selected a hold-out sets of 100,000 points uniformly at random, and the results of DNN and SV-DKL are averaged over 5 runs ± one standard deviation. Since the code of KLSP-GP is not publicly available we directly show the results from [11]. Datasets n d c Accuracy Total Training Time (h) KLSP-GP [11] DNN DNN+ DNN+GP SV-DKL KLSP-GP DNN SV-DKL Airline 5,934,530 8 2 ∼0.675 0.773±0.001 0.722±0.002 0.7746±0.001 0.781±0.001 ∼11 0.53 3.98 1 2 3 4 5 6 x 10 6 0.66 0.68 0.7 0.72 0.74 0.76 0.78 #Training Instances Accuracy DNN SV−DKL KLSP−GP 1 2 3 4 5 6 x 10 6 0 2 4 6 8 10 12 #Training Instances Training time (h) DNN SV−DKL KLSP−GP 70 200 400 800 1200 1600 2000 0 100 200 300 #Inducing points Runtime (s) SV−DKL KLSP−GP MC−GP DNN 70 200 400 800 1200 1600 2000 1 50 100 150 200 #Inducing points Runtime scaling SV−DKL KLSP−GP MC−GP slope=1 Figure 2: (a) Classification accuracy vs. the number of training points (n). We tested the deep models, DNN and SV-DKL, by training on 1/50, 1/10, 1/3, and the full dataset, respectively. For comparison, the cyan diamond and black dashed line show the accuracy level of KLSP-GP trained on the full data. (b) Training time vs. n. The cyan diamond and black dashed line show the training time of KLSP-GP on the full data. (c) Runtime vs. the number of inducing points (m) on airline task, by applying different variational methods for deep kernel learning. The minibatch size is fixed to 50,000. The runtime of the stand-alone DNN does not change as m varies. (d) The scaling of runtime relative to the runtime of m = 70. The black dashed line indicates a slope of 1. The plain DNN, which learns salient features effectively from raw data, gives notably higher accuracy compared to an SVM, the mostly widely used kernel method for classification problems. We see that the extra layer in DNN+GP can sometimes harm performance. By contrast, non-parametric flexibility of DNN+GP consistently improves upon DNN. And SV-DKL, by training a DNN through a GP marginal likelihood objective, consistently provides further enhancements (with particularly notable performance on the Connect4 and Covtype datasets). 5.3 Image Classification We next evaluate the proposed scalable SV-DKL procedure for efficiently handling high-dimensional highly-structured image data. We used a minibatch size of 5,000 for stochastic gradient training of SV-DKL. Table 2 compares SV-DKL with the most recent scalable GP classifiers. Besides KLSP-GP, we also collected the results of the MC-GP [12] which uses a hybrid Monte Carlo sampler to tackle non-conjugate likelihoods, SAVI-GP [6] which approximates with a univariate Gaussian sampler, as well as the distributed GP latent variable model (denoted as D-GPLVM) [8]. We see that on the respective benchmark tasks, SV-DKL improves over all of the above scalable GP methods by a large margin. We note that these datasets are very challenging for conventional GP methods. We further compare SV-DKL to stand-alone convolutional neural networks, and GPs applied to fixed pre-trained CNNs (CNN+GP). On the first three datasets in Table 2, we used the reference CNN models implemented in Caffe; and for the SVHN dataset, as no benchmark architecture is available, we used the CIFAR10 architecture which turned out to perform quite well. As we can see, the SV-DKL model outperforms CNNs and CNN+GP on all datasets. By contrast, the extra hidden Q × c hidden layer CNN+ does not consistently improve performance over CNN. ResNet Comparison: Based on one of the best public implementations on Caffe, the ResNet-20 has 0.901 accuracy on CIFAR10, and SV-DKL (with this ResNet base architecture) improves to 0.910. ImageNet: We randomly selected 20 categories of images with an AlexNet variant as the base NN [15], which has an accuracy of 0.6877, while SV-DKL achieves 0.7067 accuracy. 5.3.1 Interpretation In Figure 3(a) we investigate the deep kernels learned on the MNIST dataset by randomly selecting 4 classes and visualizing the covariance matrices of respective dimensions. The covariance matrices are evaluated on the set of test inputs, sorted in terms of the labels of the input images. We see that the 7 Table 2: Classification accuracy on the image classification benchmarks. MNIST-Binary is the task to differentiate between odd and even digits on the MNIST dataset. We followed the standard training-test set partitioning of all these datasets. We have collected recently published results of a variety of scalable GPs. For CNNs, we used the respective benchmark architectures (or with slight adaptations) from Caffe. CNN+ is a stand-alone CNN with Q × c fully connected extra hidden layer. See the text for more details, including a comparison with ResNets on CIFAR10. Datasets n d c Accuracy MC-GP [12] SAVI-GP [6] D-GPLVM [8] KLSP-GP [11] CNN CNN+ CNN+GP SV-DKL MNIST-Binary 60K 28×28 2 — — — 0.978 0.9934 0.8838 0.9938 0.9940 MNIST 60K 28×28 10 0.9804 0.9749 0.9405 — 0.9908 0.9909 0.9915 0.9920 CIFAR10 50K 3×32×32 10 — — — — 0.7592 0.7618 0.7633 0.7704 SVHN 73K 3×32×32 10 — — — — 0.9214 0.9193 0.9221 0.9228 c=2 2k 4k 6k 8k 10k 2k 4k 6k 8k 10k c=3 2k 4k 6k 8k 10k 2k 4k 6k 8k 10k c=6 2k 4k 6k 8k 10k 2k 4k 6k 8k 10k c=8 2k 4k 6k 8k 10k 2k 4k 6k 8k 10k 0.1 0.2 0.3 0.4 0.5 0.6 Input dimensions 0 1 2 3 4 5 6 7 8 9 Output classes 0 1 2 3 4 5 6 7 8 9 -0.1 0 0.1 0.2 Figure 3: (a) The induced covariance matrices on classes 2, 3, 6, and 8, on test cases of the MNIST dataset ordered according to the labels. (b) The final mixing layer (i.e., matrix A) on MNIST digit recognition. deep kernel on each dimension effectively discovers the correlations between the images within the corresponding class. For instance, in c = 2 the data points between 2k-3k (i.e., images of digit 2) are strongly correlated with each other, and carry little correlation with the rest of the images. Besides, we can also clearly observe that the rest of the data points also form multiple “blocks”, rather than being crammed together without any structure. This validates that the DKL procedure and additive GPs do capture the correlations across different dimensions. To further explore the learnt dependencies between the output classes and the additive GPs serving as the bases, we visualized the weights of the mixing layer (A) in Fig. 3(b), enabling the correlated multi-output (multi-task) nature of the model. Besides the expected high weights along the diagonal, we find that class 9 is also highly correlated with dimension 0 and 6, which is consistent with the visual similarity between digit “9” and “0”/“6”. Overall, the ability to interpret the learned deep covariance matrix as discovering an expressive similarity metric across data instances is a distinctive feature of our approach. 6 Discussion We introduced a scalable Gaussian process model which leverages deep learning, stochastic variational inference, structure exploiting algebra, and additive covariance structures. The resulting deep kernel learning approach, SV-DKL, allows for classification and non-Gaussian likelihoods, multi-task learning, and mini-batch training. SV-DKL achieves superior performance over alternative scalable GP models and stand-alone deep networks on many significant benchmarks. Several fundamental themes emerge from the exposition: (1) kernel methods and deep learning approaches are complementary, and we can combine the advantages of each approach; (2) expressive kernel functions are particularly valuable on large datasets; (3) by viewing neural networks through the lens of metric learning, deep learning approaches become more interpretable. Deep learning is able to obtain good predictive accuracy by automatically learning structure which would be difficult to a priori feature engineer into a model. In the future, we hope deep kernel learning approaches will be particularly helpful for interpreting these learned features, leading to new scientific insights into our modelling problems. Acknowledgements: We thank NSF IIS-1563887, ONR N000141410684, N000141310721, N000141512791, and ADeLAIDE FA8750-16C-0130-001 grants. 8 References [1] C. C. Aggarwal, A. Hinneburg, and D. A. Keim. On the surprising behavior of distance metrics in high dimensional space. Springer, 2001. [2] T. D. Bui and R. E. Turner. Stochastic variational inference for Gaussian process latent variable models using back constraints. Black Box Learning and Inference NIPS workshop, 2015. [3] R. Calandra, J. Peters, C. E. Rasmussen, and M. P. Deisenroth. Manifold Gaussian processes for regression. arXiv preprint arXiv:1402.5876, 2014. [4] Z. Dai, A. Damianou, J. González, and N. Lawrence. Variational auto-encoded deep Gaussian processes. arXiv preprint arXiv:1511.06455, 2015. [5] A. Damianou and N. Lawrence. Deep Gaussian processes. Artificial Intelligence and Statistics, 2013. [6] A. Dezfouli and E. V. Bonilla. Scalable inference for Gaussian process models with black-box likelihoods. In Advances in Neural Information Processing Systems, pages 1414–1422, 2015. [7] N. Durrande, D. Ginsbourger, and O. Roustant. Additive kernels for Gaussian process modeling. arXiv preprint arXiv:1103.4023, 2011. [8] Y. Gal, M. van der Wilk, and C. Rasmussen. Distributed variational inference in sparse Gaussian process regression and latent variable models. In Advances in Neural Information Processing Systems, pages 3257–3265, 2014. [9] M. Gönen and E. Alpaydın. Multiple kernel learning algorithms. Journal of Machine Learning Research, 12:2211–2268, 2011. [10] J. Hensman, N. Fusi, and N. Lawrence. Gaussian processes for big data. In Uncertainty in Artificial Intelligence (UAI). AUAI Press, 2013. [11] J. Hensman, A. Matthews, and Z. Ghahramani. Scalable variational Gaussian process classification. In Proceedings of the Eighteenth International Conference on Artificial Intelligence and Statistics, pages 351–360, 2015. [12] J. Hensman, A. G. Matthews, M. Filippone, and Z. Ghahramani. MCMC for variationally sparse Gaussian processes. In Advances in Neural Information Processing Systems, pages 1648–1656, 2015. [13] Y. Jia, E. Shelhamer, J. Donahue, S. Karayev, J. Long, R. Girshick, S. Guadarrama, and T. Darrell. Caffe: Convolutional architecture for fast feature embedding. arXiv preprint arXiv:1408.5093, 2014. [14] D. P. Kingma and M. Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. [15] A. Krizhevsky, I. Sutskever, and G. Hinton. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems, 2012. [16] Q. Le, T. Sarlos, and A. Smola. Fastfood-computing Hilbert space expansions in loglinear time. In Proceedings of the 30th International Conference on Machine Learning, pages 244–252, 2013. [17] J. R. Lloyd, D. Duvenaud, R. Grosse, J. B. Tenenbaum, and Z. Ghahramani. Automatic construction and Natural-Language description of nonparametric regression models. In Association for the Advancement of Artificial Intelligence (AAAI), 2014. [18] T. Nickson, T. Gunter, C. Lloyd, M. A. Osborne, and S. Roberts. Blitzkriging: Kronecker-structured stochastic Gaussian processes. arXiv preprint arXiv:1510.07965, 2015. [19] J. Quiñonero-Candela and C. Rasmussen. A unifying view of sparse approximate Gaussian process regression. The Journal of Machine Learning Research, 6:1939–1959, 2005. [20] A. Rahimi and B. Recht. Random features for large-scale kernel machines. In Neural Information Processing Systems, 2007. [21] C. E. Rasmussen and Z. Ghahramani. Occam’s razor. In Neural Information Processing Systems (NIPS), 2001. [22] C. E. Rasmussen and C. K. I. Williams. Gaussian processes for Machine Learning. The MIT Press, 2006. [23] B. W. Silverman. Some aspects of the spline smoothing approach to non-parametric regression curve fitting. Journal of the Royal Statistical SocietyB, 47(1):1–52, 1985. [24] M. K. Titsias. Variational learning of inducing variables in sparse Gaussian processes. In International Conference on Artificial Intelligence and Statistics, pages 567–574, 2009. [25] A. G. Wilson. Covariance kernels for fast automatic pattern discovery and extrapolation with Gaussian processes. PhD thesis, University of Cambridge, 2014. [26] A. G. Wilson and R. P. Adams. Gaussian process kernels for pattern discovery and extrapolation. International Conference on Machine Learning (ICML), 2013. [27] A. G. Wilson and H. Nickisch. Kernel interpolation for scalable structured Gaussian processes (KISS-GP). International Conference on Machine Learning (ICML), 2015. [28] A. G. Wilson, D. A. Knowles, and Z. Ghahramani. Gaussian process regression networks. In International Conference on Machine Learning (ICML), Edinburgh, 2012. [29] A. G. Wilson, C. Dann, and H. Nickisch. Thoughts on massively scalable Gaussian processes. arXiv preprint arXiv:1511.01870, 2015. https://arxiv.org/abs/1511.01870. [30] A. G. Wilson, Z. Hu, R. Salakhutdinov, and E. P. Xing. Deep kernel learning. Artificial Intelligence and Statistics, 2016. [31] Z. Yang, A. J. Smola, L. Song, and A. G. Wilson. A la carte - learning fast kernels. Artificial Intelligence and Statistics, 2015. 9 | 2016 | 435 |
6,367 | Theoretical Comparisons of Positive-Unlabeled Learning against Positive-Negative Learning Gang Niu1 Marthinus C. du Plessis1 Tomoya Sakai1 Yao Ma3 Masashi Sugiyama2,1 1The University of Tokyo, Japan 2RIKEN, Japan 3Boston University, USA { gang@ms., christo@ms., sakai@ms., yao@ms., sugi@ }k.u-tokyo.ac.jp Abstract In PU learning, a binary classifier is trained from positive (P) and unlabeled (U) data without negative (N) data. Although N data is missing, it sometimes outperforms PN learning (i.e., ordinary supervised learning). Hitherto, neither theoretical nor experimental analysis has been given to explain this phenomenon. In this paper, we theoretically compare PU (and NU) learning against PN learning based on the upper bounds on estimation errors. We find simple conditions when PU and NU learning are likely to outperform PN learning, and we prove that, in terms of the upper bounds, either PU or NU learning (depending on the class-prior probability and the sizes of P and N data) given infinite U data will improve on PN learning. Our theoretical findings well agree with the experimental results on artificial and benchmark data even when the experimental setup does not match the theoretical assumptions exactly. 1 Introduction Positive-unlabeled (PU) learning, where a binary classifier is trained from P and U data, has drawn considerable attention recently [1, 2, 3, 4, 5, 6, 7, 8]. It is appealing to not only the academia but also the industry, since for example the click-through data automatically collected in search engines are highly PU due to position biases [9, 10, 11]. Although PU learning uses no negative (N) data, it is sometimes even better than PN learning (i.e., ordinary supervised learning, perhaps with class-prior change [12]) in practice. Nevertheless, there is neither theoretical nor experimental analysis for this phenomenon, and it is still an open problem when PU learning is likely to outperform PN learning. We clarify this question in this paper. Problem settings For PU learning, there are two problem settings based on one sample (OS) and two samples (TS) of data respectively. More specifically, let X ∈Rd and Y ∈{±1} (d ∈N) be the input and output random variables and equipped with an underlying joint density p(x, y). In OS [3], a set of U data is sampled from the marginal density p(x). Then if a data point x is P, this P label is observed with probability c, and x remains U with probability 1 −c; if x is N, this N label is never observed, and x remains U with probability 1. In TS [4], a set of P data is drawn from the positive marginal density p(x | Y = +1) and a set of U data is drawn from p(x). Denote by n+ and nu the sizes of P and U data. As two random variables, they are fully independent in TS, and they satisfy n+/(n+ + nu) ≈cπ in OS where π = p(Y = +1) is the class-prior probability. Therefore, TS is slightly more general than OS, and we will focus on TS problem settings. Similarly, consider TS problem settings of PN and NU learning, where a set of N data (of size n−) is sampled from p(x | Y = −1) independently of the P/U data. For PN learning, if we enforce that n+/(n+ + n−) ≈π when sampling the data, it will be ordinary supervised learning; otherwise, it is supervised learning with class-prior change, a.k.a. prior probability shift [12]. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. In [7], a cost-sensitive formulation for PU learning was proposed, and its risk estimator was proven unbiased if the surrogate loss is non-convex and satisfies a symmetric condition. Therefore, we can naturally compare empirical risk minimizers in PU and NU learning against that in PN learning. Contributions We establish risk bounds of three risk minimizers in PN, PU and NU learning for comparisons in a flavor of statistical learning theory [13, 14]. For each minimizer, we firstly derive a uniform deviation bound from the risk estimator to the risk using Rademacher complexities (see, e.g., [15, 16, 17, 18]), and secondly obtain an estimation error bound. Thirdly, if the surrogate loss is classification-calibrated [19], an excess risk bound is an immediate corollary. In [7], there was a generalization error bound similar to our uniform deviation bound for PU learning. However, it is based on a tricky decomposition of the risk, where surrogate losses for risk minimization and risk analysis are different and labels of U data are needed for risk evaluation, so that no further bound is implied. On the other hand, ours utilizes the same surrogate loss for risk minimization and analysis and requires no label of U data for risk evaluation, so that an estimation error bound is possible. Our main results can be summarized as follows. Denote by ˆgpn, ˆgpu and ˆgnu the risk minimizers in PN, PU and NU learning. Under a mild assumption on the function class and data distributions, • Finite-sample case: The estimation error bound of ˆgpu is tighter than that of ˆgpn whenever π/√n+ + 1/√nu < (1 −π)/√n−, and so is the bound of ˆgnu tighter than that of ˆgpn if (1 −π)/√n−+ 1/√nu < π/√n+. • Asymptotic case: Either the limit of bounds of ˆgpu or that of ˆgnu (depending on π, n+ and n−) will improve on that of ˆgpn, if n+, n−→∞in the same order and nu →∞faster in order than n+ and n−. Notice that both results rely on only the constant π and variables n+, n−and nu; they are simple and independent of the specific forms of the function class and/or the data distributions. The asymptotic case is from the finite-sample case that is based on theoretical comparisons of the aforementioned upper bounds on the estimation errors of ˆgpn, ˆgpu and ˆgnu. To the best of our knowledge, this is the first work that compares PU learning against PN learning. Throughout the paper, we assume that the class-prior probability π is known. In practice, it can be effectively estimated from P, N and U data [20, 21, 22] or only P and U data [23, 24]. Organization The rest of this paper is organized as follows. Unbiased estimators are reviewed in Section 2. Then in Section 3 we present our theoretical comparisons based on risk bounds. Finally experiments are discussed in Section 4. 2 Unbiased estimators to the risk For convenience, denote by p+(x) = p(x | Y = +1) and p−(x) = p(x | Y = −1) partial marginal densities. Recall that instead of data sampled from p(x, y), we consider three sets of data X+, X− and Xu which are drawn from three marginal densities p+(x), p−(x) and p(x) independently. Let g : Rd →R be a real-valued decision function for binary classification and ℓ: R × {±1} →R be a Lipschitz-continuous loss function. Denote by R+(g) = E+[ℓ(g(X), +1)], R−(g) = E−[ℓ(g(X), −1)] partial risks, where E±[·] = EX∼p±[·]. Then the risk of g w.r.t. ℓunder p(x, y) is given by R(g) = E(X,Y )[ℓ(g(X), Y )] = πR+(g) + (1 −π)R−(g). (1) In PN learning, by approximating R(g) based on Eq. (1), we can get an empirical risk estimator as bRpn(g) = π n+ P xi∈X+ ℓ(g(xi), +1) + 1−π n− P xj∈X−ℓ(g(xj), −1). For any fixed g, bRpn(g) is an unbiased and consistent estimator to R(g) and its convergence rate is of order Op(1/√n+ + 1/√n−) according to the central limit theorem [25], where Op denotes the order in probability. In PU learning, X−is not available and then R−(g) cannot be directly estimated. However, [7] has shown that we can estimate R(g) without any bias if ℓsatisfies the following symmetric condition: ℓ(t, +1) + ℓ(t, −1) = 1. (2) 2 Specifically, let Ru,−(g) = EX[ℓ(g(X), −1)] = πE+[ℓ(g(X), −1)] + (1 −π)R−(g) be a risk that U data are regarded as N data. Given Eq. (2), we have E+[ℓ(g(X), −1)] = 1 −R+(g), and hence R(g) = 2πR+(g) + Ru,−(g) −π. (3) By approximating R(g) based on (3) using X+ and Xu, we can obtain bRpu(g) = −π + 2π n+ P xi∈X+ ℓ(g(xi), +1) + 1 nu P xj∈Xu ℓ(g(xj), −1). Although bRpu(g) regards Xu as N data and aims at separating X+ and Xu if being minimized, it is an unbiased and consistent estimator to R(g) with a convergence rate Op(1/√n+ + 1/√nu) [25]. Similarly, in NU learning R+(g) cannot be directly estimated. Let Ru,+(g) = EX[ℓ(g(X), +1)] = πR+(g) + (1 −π)E−[ℓ(g(X), +1)]. Given Eq. (2), E−[ℓ(g(X), +1)] = 1 −R−(g), and R(g) = Ru,+(g) + 2(1 −π)R−(g) −(1 −π). (4) By approximating R(g) based on (4) using Xu and X−, we can obtain bRnu(g) = −(1 −π) + 1 nu P xi∈Xu ℓ(g(xi), +1) + 2(1−π) n− P xj∈X−ℓ(g(xj), −1). On the loss function In order to train g by minimizing these estimators, it remains to specify the loss ℓ. The zero-one loss ℓ01(t, y) = (1 −sign(ty))/2 satisfies (2) but is non-smooth. [7] proposed to use a scaled ramp loss as the surrogate loss for ℓ01 in PU learning: ℓsr(t, y) = max{0, min{1, (1 −ty)/2}}, instead of the popular hinge loss that does not satisfy (2). Let I(g) = E(X,Y )[ℓ01(g(X), Y )] be the risk of g w.r.t. ℓ01 under p(x, y). Then, ℓsr is neither an upper bound of ℓ01 so that I(g) ≤R(g) is not guaranteed, nor a convex loss so that it gets more difficult to know whether ℓsr is classificationcalibrated or not [19].1 If it is, we are able to control the excess risk w.r.t. ℓ01 by that w.r.t. ℓ. Here we prove the classification calibration of ℓsr, and consequently it is a safe surrogate loss for ℓ01. Theorem 1. The scaled ramp loss ℓsr is classification-calibrated (see Appendix A for the proof). 3 Theoretical comparisons based on risk bounds When learning is involved, suppose we are given a function class G, and let g∗= arg ming∈G R(g) be the optimal decision function in G, ˆgpn = arg ming∈G bRpn(g), ˆgpu = arg ming∈G bRpu(g), and ˆgnu = arg ming∈G bRnu(g) be arbitrary global minimizers to three risk estimators. Furthermore, let R∗= infg R(g) and I∗= infg I(g) denote the Bayes risks w.r.t. ℓand ℓ01, where the infimum of g is over all measurable functions. In this section, we derive and compare risk bounds of three risk minimizers ˆgpn, ˆgpu and ˆgnu under the following mild assumption on G, p(x), p+(x) and p−(x): There is a constant CG > 0 such that Rn,q(G) ≤CG/√n (5) for any marginal density q(x) ∈{p(x), p+(x), p−(x)}, where Rn,q(G) = EX∼qnEσ supg∈G 1 n P xi∈X σig(xi) is the Rademacher complexity of G for the sampling of size n from q(x) (that is, X = {x1, . . . , xn} and σ = {σ1, . . . , σn}, with each xi drawn from q(x) and each σi as a Rademacher variable) [18]. A special case is covered, namely, sets of hyperplanes with bounded normals and feature maps: G = {g(x) = ⟨w, φ(x)⟩H | ∥w∥H ≤Cw, ∥φ(x)∥H ≤Cφ}, (6) where H is a Hilbert space with an inner product ⟨·, ·⟩H, w ∈H is a normal vector, φ : Rd →H is a feature map, and Cw > 0 and Cφ > 0 are constants [26]. 1A loss function ℓis classification-calibrated if and only if there is a convex, invertible and nondecreasing transformation ψℓwith ψℓ(0) = 0, such that ψℓ(I(g) −infg I(g)) ≤R(g) −infg R(g) [19]. 3 3.1 Risk bounds Let Lℓbe the Lipschitz constant of ℓin its first parameter. To begin with, we establish the learning guarantee of ˆgpu (the proof can be found in Appendix A). Theorem 2. Assume (2). For any δ > 0, with probability at least 1 −δ,2 R(ˆgpu) −R(g∗) ≤8πLℓRn+,p+(G) + 4LℓRnu,p(G) + 2π q 2 ln(4/δ) n+ + q 2 ln(4/δ) nu , (7) where Rn+,p+(G) and Rnu,p(G) are the Rademacher complexities of G for the sampling of size n+ from p+(x) and the sampling of size nu from p(x). Moreover, if ℓis a classification-calibrated loss, there exists nondecreasing ϕ with ϕ(0) = 0, such that with probability at least 1 −δ, I(ˆgpu)−I∗≤ϕ R(g∗)−R∗+8πLℓRn+,p+(G)+4LℓRnu,p(G)+2π q 2 ln(4/δ) n+ + q 2 ln(4/δ) nu . (8) In Theorem 2, R(ˆgpu) and I(ˆgpu) are w.r.t. p(x, y), though ˆgpu is trained from two samples following p+(x) and p(x). We can see that (7) is an upper bound of the estimation error of ˆgpu w.r.t. ℓ, whose right-hand side (RHS) is small if G is small; (8) is an upper bound of the excess risk of ˆgpu w.r.t. ℓ01, whose RHS also involves the approximation error of G (i.e., R(g∗) −R∗) that is small if G is large. When G is fixed and satisfies (5), we have Rn+,p+(G) = O(1/√n+) and Rnu,p(G) = O(1/√nu), and then R(ˆgpu) −R(g∗) →0, I(ˆgpu) −I∗→ϕ(R(g∗) −R∗) in Op(1/√n+ + 1/√nu). On the other hand, when the size of G grows with n+ and nu properly, those complexities of G vanish slower in order than O(1/√n+) and O(1/√nu) but we may have R(ˆgpu) −R(g∗) →0, I(ˆgpu) −I∗→0, which means ˆgpu approaches the Bayes classifier if ℓis a classification-calibrated loss, in an order slower than Op(1/√n+ + 1/√nu) due to the growth of G. Similarly, we can derive the learning guarantees of ˆgpn and ˆgnu for comparisons. We will just focus on estimation error bounds, because excess risk bounds are their immediate corollaries. Theorem 3. Assume (2). For any δ > 0, with probability at least 1 −δ, R(ˆgpn) −R(g∗) ≤4πLℓRn+,p+(G) + 4(1 −π)LℓRn−,p−(G) + π q 2 ln(4/δ) n+ + (1 −π) q 2 ln(4/δ) n− , (9) where Rn−,p−(G) is the Rademacher complexity of G for the sampling of size n−from p−(x). Theorem 4. Assume (2). For any δ > 0, with probability at least 1 −δ, R(ˆgnu)−R(g∗) ≤4LℓRnu,p(G)+8(1−π)LℓRn−,p−(G)+ q 2 ln(4/δ) nu +2(1−π) q 2 ln(4/δ) n− . (10) In order to compare the bounds, we simplify (9), (7) and (10) using Eq. (5). To this end, we define f(δ) = 4LℓCG + p 2 ln(4/δ). For the special case of G defined in (6), define f(δ) accordingly as f(δ) = 4LℓCwCφ + p 2 ln(4/δ). Corollary 5. The estimation error bounds below hold separately with probability at least 1 −δ: R(ˆgpn) −R(g∗) ≤f(δ) · {π/√n+ + (1 −π)/√n−}, (11) R(ˆgpu) −R(g∗) ≤f(δ) · {2π/√n+ + 1/√nu}, (12) R(ˆgnu) −R(g∗) ≤f(δ) · {1/√nu + 2(1 −π)/√n−}. (13) 3.2 Finite-sample comparisons Note that three risk minimizers ˆgpn, ˆgpu and ˆgnu work in similar problem settings and their bounds in Corollary 5 are proven using exactly the same proof technique. Then, the differences in bounds reflect the intrinsic differences between risk minimizers. Let us compare those bounds. Define αpu,pn = π/√n+ + 1/√nu / (1 −π)/√n− , (14) αnu,pn = (1 −π)/√n−+ 1/√nu / π/√n+ . (15) Eqs. (14) and (15) constitute our first main result. 2Here, the probability is over repeated sampling of data for training ˆgpu, while in Lemma 8, it will be for evaluating bRpu(g). 4 Table 1: Properties of αpu,pn and αnu,pn. no specification sizes are proportional ρpn = π/(1 −π) mono. inc. mono. dec. mono. inc. mono. dec. mono. inc. minimum αpu,pn π, n− n+, nu π, ρpu ρpn ρpu 2pρpu + √ρpu αnu,pn n+ π, n−, nu ρpn, ρnu π ρnu 2pρnu + √ρnu Theorem 6 (Finite-sample comparisons). Assume (5) is satisfied. Then the estimation error bound of ˆgpu in (12) is tighter than that of ˆgpn in (11) if and only if αpu,pn < 1; also, the estimation error bound of ˆgnu in (13) is tighter than that of ˆgpn if and only if αnu,pn < 1. Proof. Fix π, n+, n−and nu, and then denote by Vpn, Vpu and Vnu the values of the RHSs of (11), (12) and (13). In fact, the definitions of αpu,pn and αnu,pn in (14) and (15) came from αpu,pn = Vpu −πf(δ)/√n+ Vpn −πf(δ)/√n+ , αnu,pn = Vnu −(1 −π)f(δ)/√n− Vpn −(1 −π)f(δ)/√n− . As a consequence, compared with Vpn, Vpu is smaller and (12) is tighter if and only if αpu,pn < 1, and Vnu is smaller and (13) is tighter if and only if αnu,pn < 1. We analyze some properties of αpu,pn before going to our second main result. The most important property is that it relies on π, n+, n−and nu only; it is independent of G, p(x, y), p(x), p+(x) and p−(x) as long as (5) is satisfied. Next, αpu,pn is obviously a monotonic function of π, n+, n−and nu. Furthermore, it is unbounded no matter if π is fixed or not. Properties of αnu,pn are similar, as summarized in Table 1. Implications of the monotonicity of αpu,pn are given as follows. Intuitively, when other factors are fixed, larger nu or n−improves ˆgpu or ˆgpn respectively. However, it is complicated why αpu,pn is monotonically decreasing with n+ and increasing with π. The weights of the empirical average of X+ is 2π in bRpu(g) and π in bRpn(g), as in bRpu(g) it also joins the estimation of (1 −π)R−(g). It makes X+ more important for bRpu(g), and thus larger n+ improves ˆgpu more than ˆgpn. Moreover, (1 −π)R−(g) is directly estimated in bRpn(g) and the concentration Op((1 −π)/√n−) is better if π is larger, whereas it is indirectly estimated through Ru,−(g) −π(1 −R+(g)) in bRpu(g) and the concentration Op(π/√n+ + 1/√nu) is worse if π is larger. As a result, when the sample sizes are fixed ˆgpu is more (or less) favorable as π decreases (or increases). A natural question is what the monotonicity of αpu,pn would be if we enforce n+, n−and nu to be proportional. To answer this question, we assume n+/n−= ρpn, n+/nu = ρpu and n−/nu = ρnu where ρpn, ρpu and ρnu are certain constants, then (14) and (15) can be rewritten as αpu,pn = (π + √ρpu)/((1 −π)√ρpn), αnu,pn = (1 −π + √ρnu)/(π/√ρpn). As shown in Table 1, αpu,pn is now increasing with ρpu and decreasing with ρpn. It is because, for instance, when ρpn is fixed and ρpu increases, nu is meant to decrease relatively to n+ and n−. Finally, the properties will dramatically change if we enforce ρpn = π/(1 −π) that approximately holds in ordinary supervised learning. Under this constraint, we have αpu,pn = (π + √ρpu)/ p π(1 −π) ≥2pρpu + √ρpu, where the equality is achieved at ¯π = √ρpu/(2√ρpu + 1). Here, αpu,pn decreases with π if π < ¯π and increases with π if π > ¯π, though it is not convex in π. Only if nu is sufficiently larger than n+ (e.g., ρpu < 0.04), could αpu,pn < 1 be possible and ˆgpu have a tighter estimation error bound. 3.3 Asymptotic comparisons In practice, we may find that ˆgpu is worse than ˆgpn and αpu,pn > 1 given X+, X−and Xu. This is probably the consequence especially when nu is not sufficiently larger than n+ and n−. Should we then try to collect much more U data or just give up PU learning? Moreover, if we are able to have as many U data as possible, is there any solution that would be provably better than PN learning? 5 We answer these questions by asymptotic comparisons. Notice that each pair of (n+, nu) yields a value of the RHS of (12), each (n+, n−) yields a value of the RHS of (11), and consequently each triple of (n+, n−, nu) determines a value of αpu,pn. Define the limits of αpu,pn and αnu,pn as α∗ pu,pn = limn+,n−,nu→∞αpu,pn, α∗ nu,pn = limn+,n−,nu→∞αnu,pn. Recall that n+, n−and nu are independent, and we need two conditions for the existence of α∗ pu,pn and α∗ nu,pn: n+ →∞and n−→∞in the same order and nu →∞faster in order than them. It is a bit stricter than what is necessary, but is consistent with a practical assumption: P and N data are roughly equally expensive, whereas U data are much cheaper than P and N data. Intuitively, since αpu,pn and αnu,pn measure relative qualities of the estimation error bounds of ˆgpu and ˆgnu against that of ˆgpn, α∗ pu,pn and α∗ nu,pn measure relative qualities of the limits of those bounds accordingly. In order to illustrate properties of α∗ pu,pn and α∗ nu,pn, assume only nu approaches infinity while n+ and n−stay finite, so that α∗ pu,pn = π√n−/((1 −π)√n+) and α∗ nu,pn = (1 −π)√n+/(π√n−). Thus, α∗ pu,pnα∗ nu,pn = 1, which implies α∗ pu,pn < 1 or α∗ nu,pn < 1 unless n+/n−= π2/(1 −π)2. In principle, this exception should be exceptionally rare since n+/n−is a rational number whereas π2/(1 −π)2 is a real number. This argument constitutes our second main result. Theorem 7 (Asymptotic comparisons). Assume (5) and one set of conditions below are satisfied: (a) n+ < ∞, n−< ∞and nu →∞. In this case, let α∗= (π√n−)/((1 −π)√n+); (b) 0 < limn+,n−→∞n+/n−< ∞and limn+,n−,nu→∞(n+ + n−)/nu = 0. In this case, let α∗= π/((1 −π)pρ∗pn) where ρ∗ pn = limn+,n−→∞n+/n−. Then, either the limit of estimation error bounds of ˆgpu will improve on that of ˆgpn (i.e., α∗ pu,pn < 1) if α∗< 1, or the limit of bounds of ˆgnu will improve on that of ˆgpn (i.e., α∗ nu,pn < 1) if α∗> 1. The only exception is n+/n−= π2/(1 −π)2 in (a) or ρ∗ pn = π2/(1 −π)2 in (b). Proof. Note that α∗= α∗ pu,pn in both cases. The proof of case (a) has been given as an illustration of the properties of α∗ pu,pn and α∗ nu,pn. The proof of case (b) is analogous. As a result, when we find that ˆgpu is worse than ˆgpn and αpu,pn > 1, we should look at α∗defined in Theorem 7. If α∗< 1, ˆgpu is promising and we should collect more U data; if α∗> 1 otherwise, we should give up ˆgpu, but instead ˆgnu is promising and we should collect more U data as well. In addition, the gap between α∗and one indicates how many U data would be sufficient. If the gap is significant, slightly more U data may be enough; if the gap is slight, significantly more U data may be necessary. In practice, however, U data are cheaper but not free, and we cannot have as many U data as possible. Therefore, ˆgpn is still of practical importance given limited budgets. 3.4 Remarks Theorem 2 relies on a fundamental lemma of the uniform deviation from the risk estimator bRpu(g) to the risk R(g): Lemma 8. For any δ > 0, with probability at least 1 −δ, supg∈G | bRpu(g) −R(g)| ≤4πLℓRn+,p+(G) + 2LℓRnu,p(G) + 2π q ln(4/δ) 2n+ + q ln(4/δ) 2nu . In Lemma 8, R(g) is w.r.t. p(x, y), though bRpu(g) is w.r.t. p+(x) and p(x). Rademacher complexities are also w.r.t. p+(x) and p(x), and they can be bounded easily for G defined in Eq. (6). Theorems 6 and 7 rely on (5). Thanks to it, we can simplify Theorems 2, 3 and 4. In fact, (5) holds for not only the special case of G defined in (6), but also the vast majority of discriminative models in machine learning that are nonlinear in parameters such as decision trees (cf. Theorem 17 in [16]) and feedforward neural networks (cf. Theorem 18 in [16]). Theorem 2 in [7] is a similar bound of the same order as our Lemma 8. That theorem is based on a tricky decomposition of the risk E(X,Y )[ℓ(g(X), Y )] = πE+[˜ℓ(g(X), +1)] + E(X,Y )[˜ℓ(g(X), Y )], where the surrogate loss ˜ℓ(t, y) = (2/(y + 3))ℓ(t, y) is not ℓfor risk minimization and labels of Xu are needed for risk evaluation, so that no further bound is implied. Lemma 8 uses the same ℓas risk minimization and requires no label of Xu for evaluating bRpu(g), so that it can serve as the stepping stone to our estimation error bound in Theorem 2. 6 0 50 100 150 200 nu 0 2 4 6 8 10 12 , ,pu;pn ,nu;pn , = 1 (a) Theo. (nu var.) 0 50 100 150 200 nu 20 25 30 35 Misclassification rate (%) ^gpu ^gnu ^gpn (b) Expe. (nu var.) 0 0.2 0.4 0.6 0.8 1 : 100 101 102 , (c) Theo. (π var.) 0 0.2 0.4 0.6 0.8 1 : 5 10 15 20 25 30 35 Misclassification rate (%) (d) Expe. (π var.) Figure 1: Theoretical and experimental results based on artificial data. 4 Experiments In this section, we experimentally validate our theoretical findings. Artificial data Here, X+, X−and Xu are in R2 and drawn from three marginal densities p+(x) = N(+12/ √ 2, I2), p−(x) = N(−12/ √ 2, I2), p(x) = πp+(x) + (1 −π)p−(x), where N(µ, Σ) is the normal distribution with mean µ and covariance Σ, 12 and I2 are the all-one vector and identity matrix of size 2. The test set contains one million data drawn from p(x, y). The model g(x) = ⟨w, x⟩+ b where w ∈R2, b ∈R and the scaled ramp loss ℓsr are employed. In addition, an ℓ2-regularization is added with the regularization parameter fixed to 10−3, and there is no hard constraint on ∥w∥2 or ∥x∥2 as in Eq. (6). The solver for minimizing three regularized risk estimators comes from [7] (refer also to [27, 28] for the optimization technique). The results are reported in Figure 1. In (a)(b), n+ = 45, n−= 5, π = 0.5, and nu varies from 5 to 200; in (c)(d), n+ = 45, n−= 5, nu = 100, and π varies from 0.05 to 0.95. Specifically, (a) shows αpu,pn and αnu,pn as functions of nu, and (c) shows them as functions of π. For the experimental results, ˆgpn, ˆgpu and ˆgnu were trained based on 100 random samplings for every nu in (b) and π in (d), and means with standard errors of the misclassification rates are shown, as ℓsr is classificationcalibrated. Note that the empirical misclassification rates are essentially the risks w.r.t. ℓ01 as there were one million test data, and the fluctuations are attributed to the non-convex nature of ℓsr. Also, the curve of ˆgpn is not a flat line in (b), since its training data at every nu were exactly same as the training data of ˆgpu and ˆgnu for fair experimental comparisons. In Figure 1, the theoretical and experimental results are highly consistent. The red and blue curves intersect at nearly the same positions in (a)(b) and in (c)(d), even though the risk minimizers in the experiments were locally optimal and regularized, making our estimation error bounds inexact. Benchmark data Table 2 summarizes the specification of benchmarks, which were downloaded from many sources including the IDA benchmark repository [29], the UCI machine learning repository, the semi-supervised learning book [30], and the European ESPRIT 5516 project.3 In Table 2, three rows describe the number of features, the number of data, and the ratio of P data according to the true class labels. Given a random sampling of X+, X−and Xu, the test set has all the remaining data if they are less than 104, or else drawn uniformly from the remaining data of size 104. For benchmark data, the linear model for the artificial data is not enough, and its kernel version is employed. Consider training ˆgpu for example. Given a random sampling, g(x) = ⟨w, φ(x)⟩+ b is used where w ∈Rn++nu, b ∈R and φ : Rd →Rn++nu is the empirical kernel map [26] based on X+ and Xu for the Gaussian kernel. The kernel width and the regularization parameter are selected by five-fold cross-validation for each risk minimizer and each random sampling. 3See http://www.raetschlab.org/Members/raetsch/benchmark/ for IDA, http://archive.ics. uci.edu/ml/ for UCI, http://olivier.chapelle.cc/ssl-book/ for the SSL book and https://www. elen.ucl.ac.be/neural-nets/Research/Projects/ELENA/ for the ELENA project. Table 2: Specification of benchmark datasets. banana phoneme magic image german twonorm waveform spambase coil2 dim 2 5 10 18 20 20 21 57 241 size 5300 5404 19020 2086 1000 7400 5000 4597 1500 P ratio .448 .293 .648 .570 .300 .500 .329 .394 .500 7 0 50 100 150 200 250 300 nu 0 2 4 6 8 , ,pu;pn ,nu;pn , = 1 (a) Theo. 0 50 100 150 200 250 300 nu 30 35 40 45 Misclassification rate (%) ^gpu ^gnu ^gpn (b) banana 0 50 100 150 200 250 300 nu 30 35 40 45 Misclassification rate (%) (c) phoneme 0 50 100 150 200 250 300 nu 35 40 45 Misclassification rate (%) (d) magic 0 50 100 150 200 250 300 nu 30 35 40 45 Misclassification rate (%) (e) image 0 50 100 150 200 250 300 nu 40 42 44 46 48 Misclassification rate (%) (f) german 0 50 100 150 200 250 300 nu 35 40 45 Misclassification rate (%) (g) twonorm 0 50 100 150 200 250 300 nu 20 25 30 35 Misclassification rate (%) (h) waveform 0 50 100 150 200 250 300 nu 30 35 40 45 Misclassification rate (%) (i) spambase 0 50 100 150 200 250 300 nu 36 38 40 42 44 46 48 Misclassification rate (%) (j) coil2 Figure 2: Experimental results based on benchmark data by varying nu. 0 0.2 0.4 0.6 0.8 1 : 100 101 102 , ,pu;pn ,nu;pn , = 1 (a) Theo. 0 0.2 0.4 0.6 0.8 1 : 10 20 30 40 50 Misclassification rate (%) ^gpu ^gnu ^gpn (b) banana 0 0.2 0.4 0.6 0.8 1 : 10 20 30 40 50 Misclassification rate (%) (c) phoneme 0 0.2 0.4 0.6 0.8 1 : 10 20 30 40 50 Misclassification rate (%) (d) magic 0 0.2 0.4 0.6 0.8 1 : 10 20 30 40 Misclassification rate (%) (e) image 0 0.2 0.4 0.6 0.8 1 : 10 20 30 40 50 Misclassification rate (%) (f) german 0 0.2 0.4 0.6 0.8 1 : 10 20 30 40 50 Misclassification rate (%) (g) twonorm 0 0.2 0.4 0.6 0.8 1 : 10 20 30 40 Misclassification rate (%) (h) waveform 0 0.2 0.4 0.6 0.8 1 : 10 20 30 40 50 Misclassification rate (%) (i) spambase 0 0.2 0.4 0.6 0.8 1 : 10 20 30 40 50 Misclassification rate (%) (j) coil2 Figure 3: Experimental results based on benchmark data by varying π. The results by varying nu and π are reported in Figures 2 and 3 respectively. Similarly to Figure 1, in Figure 2, n+ = 25, n−= 5, π = 0.5, and nu varies from 10 to 300, while in Figure 3, n+ = 25, n−= 5, nu = 200, and π varies from 0.05 to 0.95. Figures 2(a) and 3(a) depict αpu,pn and αnu,pn as functions of nu and π, and all the remaining subfigures depict means with standard errors of the misclassification rates based on 100 random samplings for every nu and π. The theoretical and experimental results based on benchmarks are still highly consistent. However, unlike in Figure 1(b), in Figure 2 only the errors of ˆgpu decrease with nu, and the errors of ˆgnu just fluctuate randomly. This may be because benchmark data are more difficult than artificial data and hence n−= 5 is not sufficiently informative for ˆgnu even when nu = 300. On the other hand, we can see that Figures 3(a) and 1(c) look alike, and so do all the remaining subfigures in Figure 3 and Figure 1(d). Nevertheless, three intersections in Figure 3(a) are closer than those in Figure 1(c), as nu = 200 in Figure 3(a) and nu = 100 in Figure 1(c). The three intersections will become a single one if nu = ∞. By observing the experimental results, three curves in Figure 3 are also closer than those in Figure 1(d) when π ≥0.6, which demonstrates the validity of our theoretical findings. 5 Conclusions In this paper, we studied a fundamental problem in PU learning, namely, when PU learning is likely to outperform PN learning. Estimation error bounds of the risk minimizers were established in PN, PU and NU learning. We found that under the very mild assumption (5): The PU (or NU) bound is tighter than the PN bound, if αpu,pn in (14) (or αnu,pn in (15)) is smaller than one (cf. Theorem 6); either the limit of αpu,pn or that of αnu,pn will be smaller than one, if the size of U data increases faster in order than the sizes of P and N data (cf. Theorem 7). We validated our theoretical findings experimentally using one artificial data and nine benchmark data. Acknowledgments GN was supported by the JST CREST program and Microsoft Research Asia. MCdP, YM, and MS were supported by the JST CREST program. TS was supported by JSPS KAKENHI 15J09111. 8 References [1] F. Denis. PAC learning from positive statistical queries. In ALT, 1998. [2] F. Letouzey, F. Denis, and R. Gilleron. Learning from positive and unlabeled examples. In ALT, 2000. [3] C. Elkan and K. Noto. Learning classifiers from only positive and unlabeled data. In KDD, 2008. [4] G. Ward, T. Hastie, S. Barry, J. Elith, and J. Leathwick. Presence-only data and the EM algorithm. Biometrics, 65(2):554–563, 2009. [5] C. Scott and G. Blanchard. Novelty detection: Unlabeled data definitely help. In AISTATS, 2009. [6] G. Blanchard, G. Lee, and C. Scott. Semi-supervised novelty detection. Journal of Machine Learning Research, 11:2973–3009, 2010. [7] M. C. du Plessis, G. Niu, and M. Sugiyama. Analysis of learning from positive and unlabeled data. In NIPS, 2014. [8] M. C. du Plessis, G. Niu, and M. Sugiyama. Convex formulation for learning from positive and unlabeled data. In ICML, 2015. [9] G. Dupret and B. Piwowarski. A user browsing model to predict search engine click data from past observations. In SIGIR, 2008. [10] N. Craswell, O. Zoeter, M. Taylor, and B. Ramsey. An experimental comparison of click position-bias models. In WSDM, 2008. [11] O. Chapelle and Y. Zhang. A dynamic Bayesian network click model for web search ranking. In WWW, 2009. [12] J. Quiñonero-Candela, M. Sugiyama, A. Schwaighofer, and N. D. Lawrence. Dataset Shift in Machine Learning. MIT Press, 2009. [13] V. N. Vapnik. Statistical Learning Theory. John Wiley & Sons, 1998. [14] O. Bousquet, S. Boucheron, and G. Lugosi. Introduction to statistical learning theory. In O. Bousquet, U. von Luxburg, and G. Rätsch, editors, Advanced Lectures on Machine Learning, pages 169–207. Springer, 2004. [15] V. Koltchinskii. Rademacher penalties and structural risk minimization. IEEE Transactions on Information Theory, 47(5):1902–1914, 2001. [16] P. L. Bartlett and S. Mendelson. Rademacher and Gaussian complexities: Risk bounds and structural results. Journal of Machine Learning Research, 3:463–482, 2002. [17] R. Meir and T. Zhang. Generalization error bounds for Bayesian mixture algorithms. Journal of Machine Learning Research, 4:839–860, 2003. [18] M. Mohri, A. Rostamizadeh, and A. Talwalkar. Foundations of Machine Learning. MIT Press, 2012. [19] P. L. Bartlett, M. I. Jordan, and J. D. McAuliffe. Convexity, classification, and risk bounds. Journal of the American Statistical Association, 101(473):138–156, 2006. [20] M. Saerens, P. Latinne, and C. Decaestecker. Adjusting the outputs of a classifier to new a priori probabilities: A simple procedure. Neural Computation, 14(1):21–41, 2002. [21] M. C. du Plessis and M. Sugiyama. Semi-supervised learning of class balance under class-prior change by distribution matching. In ICML, 2012. [22] A. Iyer, S. Nath, and S. Sarawagi. Maximum mean discrepancy for class ratio estimation: Convergence bounds and kernel selection. In ICML, 2014. [23] M. C. du Plessis, G. Niu, and M. Sugiyama. Class-prior estimation for learning from positive and unlabeled data. In ACML, 2015. [24] H. G. Ramaswamy, C. Scott, and A. Tewari. Mixture proportion estimation via kernel embedding of distributions. In ICML, 2016. [25] K.-L. Chung. A Course in Probability Theory. Academic Press, 1968. [26] B. Schölkopf and A. Smola. Learning with Kernels. MIT Press, 2001. [27] R. Collobert, F. Sinz, J. Weston, and L. Bottou. Trading convexity for scalability. In ICML, 2006. [28] A. L. Yuille and A. Rangarajan. The concave-convex procedure (CCCP). In NIPS, 2001. [29] G. Rätsch, T. Onoda, and K. R. Müller. Soft margins for AdaBoost. Machine learning, 42(3):287–320, 2001. [30] O. Chapelle, B. Schölkopf, and A. Zien, editors. Semi-Supervised Learning. MIT Press, 2006. [31] C. McDiarmid. On the method of bounded differences. In J. Siemons, editor, Surveys in Combinatorics, pages 148–188. Cambridge University Press, 1989. [32] M. Ledoux and M. Talagrand. Probability in Banach Spaces: Isoperimetry and Processes. Springer, 1991. 9 | 2016 | 436 |
6,368 | A Non-generative Framework and Convex Relaxations for Unsupervised Learning Elad Hazan Princeton University 35 Olden Street 08540 ehazan@cs.princeton.edu. Tengyu Ma Princeton University 35 Olden Street, NJ 08540 tengyu@cs.princeton.edu. Abstract We give a novel formal theoretical framework for unsupervised learning with two distinctive characteristics. First, it does not assume any generative model and based on a worst-case performance metric. Second, it is comparative, namely performance is measured with respect to a given hypothesis class. This allows to avoid known computational hardness results and improper algorithms based on convex relaxations. We show how several families of unsupervised learning models, which were previously only analyzed under probabilistic assumptions and are otherwise provably intractable, can be efficiently learned in our framework by convex optimization. 1 Introduction Unsupervised learning is the task of learning structure from unlabelled examples. Informally, the main goal of unsupervised learning is to extract structure from the data in a way that will enable efficient learning from future labelled examples for potentially numerous independent tasks. It is useful to recall the Probably Approximately Correct (PAC) learning theory for supervised learning [28], based on Vapnik’s statistical learning theory [29]. In PAC learning, the learning can access labelled examples from an unknown distribution. On the basis of these examples, the learner constructs a hypothesis that generalizes to unseen data. A concept is said to be learnable with respect to a hypothesis class if there exists an (efficient) algorithm that outputs a generalizing hypothesis with high probability after observing polynomially many examples in terms of the input representation. The great achievements of PAC learning that made it successful are its generality and algorithmic applicability: PAC learning does not restrict the input domain in any way, and thus allows very general learning, without generative or distributional assumptions on the world. Another important feature is the restriction to specific hypothesis classes, without which there are simple impossibility results such as the “no free lunch” theorem. This allows comparative and improper learning of computationally-hard concepts. The latter is a very important point which is often understated. Consider the example of sparse regression, which is a canonical problem in high dimensional statistics. Fitting the best sparse vector to linear prediction is an NP-hard problem [20]. However, this does not prohibit improper learning, since we can use a `1 convex relaxation for the sparse vectors (famously known as LASSO [26]). Unsupervised learning, on the other hand, while extremely applicative and well-studied, has not seen such an inclusive theory. The most common approaches, such as restricted Boltzmann machines, topic models, dictionary learning, principal component analysis and metric clustering, are based almost entirely on generative assumptions about the world. This is a strong restriction which makes it very hard to analyze such approaches in scenarios for which the assumptions do not hold. A more discriminative approach is based on compression, such as the Minimum Description Length 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. criterion. This approach gives rise to provably intractable problems and doesn’t allow improper learning. Main results. We start by proposing a rigorous framework for unsupervised learning which allows data-dependent, comparative learning without generative assumptions about the world. It is general enough to encompass previous methods such as PCA, dictionary learning and topic models. Our main contribution are optimization-based relaxations and efficient algorithms that are shown to improperly probably learn previous models, specifically: 1. We consider the classes of hypothesis known as dictionary learning. We give a more general hypothesis class which encompasses and generalizes it according to our definitions. We proceed to give novel polynomial-time algorithms for learning the broader class. These algorithms are based on new techniques in sum-of-squares convex relaxations. As far as we know, this is the first result for efficient improper learning of dictionaries without generative assumptions. Moreover, our result handles polynomially over-complete dictionaries, while previous works [4, 8] apply to at most constant factor over-completeness. 2. We give efficient algorithms for learning a new hypothesis class which we call spectral autoencoders. We show that this class generalizes, according to our definitions, the class of PCA (principal component analysis) and its kernel extensions. Structure of this paper. In the following chapter we a non-generative, distribution-dependent definition for unsupervised learning which mirrors that of PAC learning for supervised learning. We then proceed to an illustrative example and show how Principal Component Analysis can be formally learned in this setting. The same section also gives a much more general class of hypothesis for unsupervised learning which we call polynomial spectral decoding, and show how they can be efficient learned in our framework using convex optimization. Finally, we get to our main contribution: a convex optimization based methodology for improper learning a wide class of hypothesis, including dictionary learning. 1.1 Previous work The vast majority of work on unsupervised learning, both theoretical as well as applicative, focuses on generative models. These include topic models [11], dictionary learning [13], Deep Boltzmann Machines and deep belief networks [24] and many more. Many times these models entail nonconvex optimization problems that are provably NP-hard to solve in the worst-case. A recent line of work in theoretical machine learning attempts to give efficient algorithms for these models with provable guarantees. Such algorithms were given for topic models [5], dictionary learning [6, 4], mixtures of gaussians and hidden Markov models [15, 3] and more. However, these works retain, and at times even enhance, the probabilistic generative assumptions of the underlying model. Perhaps the most widely used unsupervised learning methods are clustering algorithms such as k-means, k-medians and principal component analysis (PCA), though these lack generalization guarantees. An axiomatic approach to clustering was initiated by Kleinberg [17] and pursued further in [9]. A discriminative generalization-based approach for clustering was undertaken in [7] within the model of similarity-based clustering. Another approach from the information theory literature studies with online lossless compression. The relationship between compression and machine learning goes back to the Minimum Description Length criterion [23]. More recent work in information theory gives online algorithms that attain optimal compression, mostly for finite alphabets [1, 21]. For infinite alphabets, which are the main object of study for unsupervised learning of signals such as images, there are known impossibility results [16]. This connection to compression was recently further advanced, mostly in the context of textual data [22]. In terms of lossy compression, Rate Distortion Theory (RDT) [10, 12] is intimately related to our definitions, as a framework for finding lossy compression with minimal distortion (which would correspond to reconstruction error in our terminology). Our learnability definition can be seen of an extension of RDT to allow improper learning and generalization error bounds. Another learning framework derived from lossy compression is the information bottleneck criterion [27], and its 2 learning theoretic extensions [25]. The latter framework assumes an additional feedback signal, and thus is not purely unsupervised. The downside of the information-theoretic approaches is that worst-case competitive compression is provably computationally hard under cryptographic assumptions. In contrast, our compressionbased approach is based on learning a restriction to a specific hypothesis class, much like PAClearning. This circumvents the impossibility results and allows for improper learning. 2 A formal framework for unsupervised learning The basis constructs in an unsupervised learning setting are: 1. Instance domain X, such as images, text documents, etc. Target space, or range, Y. We usually think of X = Rd, Y = Rk with d ≫k. (Alternatively, Y can be all sparse vectors in a larger space. ) 2. An unknown, arbitrary distribution D on domain X. 3. A hypothesis class of decoding and encoding pairs, H ✓{(h, g) 2 {X 7! Y} ⇥{Y 7! X}}, where h is the encoding hypothesis and g is the decoding hypothesis. 4. A loss function ` : H ⇥X 7! R>0 that measures the reconstruction error, `((g, h), x) . For example, a natural choice is the `2-loss `((g, h), x) = kg(h(x)) −xk2 2. The rationale here is to learn structure without significantly compromising supervised learning for arbitrary future tasks. Near-perfect reconstruction is sufficient as formally proved in Appendix 6.1. Without generative assumptions, it can be seen that near-perfect reconstruction is also necessary. For convenience of notation, we use f as a shorthand for (h, g) 2 H, a member of the hypothesis class H. Denote the generalization ability of an unsupervised learning algorithm with respect to a distribution D as loss D (f) = E x⇠D[`(f, x)]. We can now define the main object of study: unsupervised learning with respect to a given hypothesis class. The definition is parameterized by real numbers: the first is the encoding length (measured in bits) of the hypothesis class. The second is the bias, or additional error compared to the best hypothesis. Both parameters are necessary to allow improper learning. Definition 2.1. We say that instance D, X is (k, γ)-C -learnable with respect to hypothesis class H if exists an algorithm that for every δ, " > 0, after seeing m(", δ) = poly(1/", log(1/δ), d) examples, returns an encoding and decoding pair (h, g) (not necessarily from H) such that: 1. with probability at least 1 −δ, lossD((h, g)) 6 min(h,g)2H lossD((h, g)) + " + γ. 2. h(x) has an explicit representation with length at most k bits. For convenience we typically encode into real numbers instead of bits. Real encoding can often (though not in the worst case) be trivially transformed to be binary with a loss of logarithmic factor. Following PAC learning theory, we can use uniform convergence to bound the generalization error of the empirical risk minimizer (ERM). Define the empirical loss for a given sample S ⇠Dm as loss S (f) = 1 m · X x2S `(f, x) Define the ERM hypothesis for a given sample S ⇠Dm as ˆfERM = arg min ˆ f2H lossS( ˆf) . 3 For a hypothesis class H, a loss function ` and a set of m samples S ⇠Dm, define the empirical Rademacher complexity of H with respect to ` and S as, 1 RS,`(H) = E σ⇠{±1}m " sup f2H 1 m X x2S σi`(f, x) # Let the Rademacher complexity of H with respect to distribution D and loss ` as Rm(H) = ES⇠Dm[RS,`(H)]. When it’s clear from the context, we will omit the subscript `. We can now state and apply standard generalization error results. The proof of following theorem is almost identical to [19, Theorem 3.1]. For completeness we provide a proof in Appendix 6. Theorem 2.1. For any δ > 0, with probability 1 −δ, the generalization error of the ERM hypothesis is bounded by: loss D ( ˆfERM) 6 min f2H loss D (f) + 6Rm(H) + s 4 log 1 δ 2m An immediate corollary of the theorem is that as long as the Rademacher complexity of a hypothesis class approaches zero as the number of examples goes to infinity, it can be C learned by an inefficient algorithm that optimizes over the hypothesis class by enumeration and outputs an best hypothesis with encoding length k and bias γ = 0. Not surprisingly such optimization is often intractable and hences the main challenge is to design efficient algorithms. As we will see in later sections, we often need to trade the encoding length and bias slightly for computational efficiency. Notations: For every vector z 2 Rd1 ⌦Rd2, we can view it as a matrix of dimension d1⇥d2, which is denoted as M(z). Therefore in this notation, M(u ⌦v) = uv>. Let vmax(·) : (Rd)⌦2 ! Rd be the function that compute the top right-singular vector of some vector in (Rd)⌦2 viewed as a matrix. That is, for z 2 (Rd)⌦2, then vmax(z) denotes the top right-singular vector of M(z). We also overload the notation vmax for generalized eigenvectors of higher order tensors. For T 2 (Rd)⌦`, let vmax(T) = argmaxkxk61 T(x, x, . . . , x) where T(·) denotes the multi-linear form defined by tensor T. 3 Spectral autoencoders: unsupervised learning of algebraic manifolds 3.1 Algebraic manifolds The goal of the spectral autoencoder hypothesis class we define henceforth is to learn the representation of data that lies on a low-dimensional algebraic variety/manifolds. The linear variety, or linear manifold, defined by the roots of linear equations, is simply a linear subspace. If the data resides in a linear subspace, or close enough to it, then PCA is effective at learning its succinct representation. One extension of the linear manifolds is the set of roots of low-degree polynomial equations. Formally, let k, s be integers and let c1, . . . , cds−k 2 Rds be a set of vectors in ds dimension, and consider the algebraic variety M = % x 2 Rd : 8i 2 [ds −k], hci, x⌦si = 0 . Observe that here each constraint hci, x⌦si is a degree-s polynomial over variables x, and when s = 1 the variety M becomes a liner subspace. Let a1, . . . , ak 2 Rds be a basis of the subspaces orthogonal to all of c1, . . . , cds−k, and let A 2 Rk⇥ds contains ai as rows. Then we have that given x 2 M, the encoding y = Ax⌦s pins down all the unknown information regarding x. In fact, for any x 2 M, we have A>Ax⌦s = x⌦s and therefore x is decodable from y. The argument can also be extended to the situation when the data point is close to M (according to a metric, as we discuss later). The goal of the rest of the subsections is to learn the encoding matrix A given data points residing close to M. 1Technically, this is the Rademacher complexity of the class of functions ` ◦H. However, since ` is usually fixed for certain problem, we emphasize in the definition more the dependency on H. 4 Warm up: PCA and kernel PCA. In this section we illustrate our framework for agnostic unsupervised learning by showing how PCA and kernel PCA can be efficiently learned within our model. The results of this sub-section are not new, and given only for illustrative purposes. The class of hypothesis corresponding to PCA operates on domain X = Rd and range Y = Rk for some k < d via linear operators. In kernel PCA, the encoding linear operator applies to the s-th tensor power x⌦s of the data. That is, the encoding and decoding are parameterized by a linear operator A 2 Rk⇥ds, Hpca k,s = % (hA, gA) : hA(x) = Ax⌦s, , gA(y) = A†y , where A† denotes the pseudo-inverse of A. The natural loss function here is the Euclidean norm, `((g, h), x) = kx⌦s −g(h(x))k2 = k(I −A†A)x⌦sk2 . Theorem 3.1. For a fixed constant s > 1, the class Hpca k,s is efficiently C -learnable with encoding length k and bias γ = 0. The proof of the Theorem follows from two simple components: a) finding the ERM among Hpca k,s can be efficiently solved by taking SVD of covariance matrix of the (lifted) data points. b) The Rademacher complexity of the hypothesis class is bounded by O(ds/m) for m examples. Thus by Theorem 2.1 the minimizer of ERM generalizes. The full proof is deferred to Appendix A. 3.2 Spectral Autoencoders In this section we give a much broader set of hypothesis, encompassing PCA and kernel-PCA, and show how to learn them efficiently. Throughout this section we assume that the data is normalized to Euclidean norm 1, and consider the following class of hypothesis which naturally generalizes PCA: Definition 3.1 (Spectral autoencoder). We define the class Hsa k,s as the following set of all hypothesis (g, h), Hsa k = ⇢ (h, g) : h(x) = Ax⌦s, A 2 Rk⇥ds g(y) = vmax(By), B 2 Rds⇥k ( . (3.1) We note that this notion is more general than kernel PCA: suppose some (g, h) 2 Hpca k,s has reconstruction error ", namely, A†Ax⌦s is "-close to x⌦s in Euclidean norm. Then by eigenvector perturbation theorem, we have that vmax(A†Ax⌦s) also reconstructs x with O(") error, and therefore there exists a PSCA hypothesis with O(") error as well . Vice versa, it’s quite possible that for every A, the reconstruction A†Ax⌦s is far away from x⌦s so that kernel PCA doesn’t apply, but with spectral decoding we can still reconstruct x from vmax(A†Ax⌦s) since the top eigenvector of A†Ax⌦s is close x. Here the key matter that distinguishes us from kernel PCA is in what metric x needs to be close to the manifold so that it can be reconstructed. Using PCA, the requirement is that x is in Euclidean distance close to M (which is a subspace), and using kernel PCA x⌦2 needs to be in Euclidean distance close to the null space of ci’s. However, Euclidean distances in the original space and lifted space typically are meaningless for high-dimensional data since any two data points are far away with each other in Euclidean distance. The advantage of using spectral autoencoders is that in the lifted space the geometry is measured by spectral norm distance that is much smaller than Euclidean distance (with a potential gap of d1/2). The key here is that though the dimension of lifted space is d2, the objects of our interests is the set of rank-1 tensors of the form x⌦2. Therefore, spectral norm distance is a much more effective measure of closeness since it exploits the underlying structure of the lifted data points. We note that spectral autoencoders relate to vanishing component analysis [18]. When the data is close to an algebraic manifold, spectral autoencoders aim to find the (small number of) essential non-vanishing components in a noise robust manner. 3.3 Learnability of polynomial spectral decoding For simplicity we focus on the case when s = 2. Ideally we would like to learn the best encodingdecoding scheme for any data distribution D. Though there are technical difficulties to achieve such a general result. A natural attempt would be to optimize the loss function f(A, B) = kg(h(x)) − xk2 = kx −vmax(BAx⌦2)k2. Not surprisingly, function f is not a convex function with respect to A, B, and in fact it could be even non-continuous (if not ill-defined)! 5 Here we make a further realizability assumption that the data distribution D admits a reasonable encoding and decoding pair with reasonable reconstruction error. Definition 3.2. We say a data distribution D is (k, ")-regularly spectral decodable if there exist A 2 Rk⇥d2 and B 2 Rd2⇥k with kBAkop 6 ⌧such that for x ⇠D, with probability 1, the encoding y = Ax⌦2 satisfies that M(By) = M(BAx⌦2) = xx> + E , (3.2) where kEkop 6 ". Here ⌧> 1 is treated as a fixed constant globally. To interpret the definition, we observe that if data distribution D is (k, ")-regularly spectrally decodable, then by equation (3.2) and Wedin’s theorem (see e.g. [30] ) on the robustness of eigenvector to perturbation, M(By) has top eigenvector2 that is O(")-close to x itself. Therefore, definition 3.2 is a sufficient condition for the spectral decoding algorithm vmax(By) to return x approximately, though it might be not necessary. Moreover, this condition partially addresses the non-continuity issue of using objective f(A, B) = kx−vmax(BAx⌦2)k2, while f(A, B) remains (highly) non-convex. We resolve this issue by using a convex surrogate. Our main result concerning the learnability of the aforementioned hypothesis class is: Theorem 3.2. The hypothesis class Hsa k,2 is C - learnable with encoding length O(⌧4k4/δ4) and bias δ with respect to (k, ")-regular distributions in polynomial time. Our approach towards finding an encoding and decoding matrice A, B is to optimize the objective, minimize f(R) = E h**Rx⌦2 −x⌦2** op i (3.3) s.t. kRkS1 6 ⌧k where k · kS1 denotes the Schatten 1-norm. Suppose D is (k, ")-regularly decodable, and suppose hA and gB are the corresponding encoding and decoding function. Then we see that R = AB will satisfies that R has rank at most k and f(R) 6 ". On the other hand, suppose one obtains some R of rank k0 such that f(R) 6 δ, then we can produce hA and gB with O(δ) reconstruction simply by choosing A 2 Rk0⇥d2B and B 2 Rd2⇥k0 such that R = AB. We use (non-smooth) Frank-Wolfe to solve objective (3.3), which in particular returns a low-rank solution. We defer the proof of Theorem 3.2 to the Appendix A.1. With a slightly stronger assumptions on the data distribution D, we can reduce the length of the code to O(k2/"2) from O(k4/"4). See details in Appendix B. 4 A family of optimization encodings and efficient dictionary learning In this section we give efficient algorithms for learning a family of unsupervised learning algorithms commonly known as ”dictionary learning”. In contrast to previous approaches, we do not construct an actual ”dictionary”, but rather improperly learn a comparable encoding via convex relaxations. We consider a different family of codes which is motivated by matrix-based unsupervised learning models such as topic-models, dictionary learning and PCA. This family is described by a matrix A 2 Rd⇥r which has low complexity according to a certain norm k·k↵, that is, kAk↵6 c↵. We can parametrize a family of hypothesis H according to these matrices, and define an encoding-decoding pair according to hA(x) = arg min kykβ6k 1 d |x −Ay|1 , gA(y) = Ay We choose `1 norm to measure the error mostly for convenience, though it can be quite flexible. The different norms k · k↵, k · kβ over A and y give rise to different learning models that have been considered before. For example, if these are Euclidean norms, then we get PCA. If k · k↵is the max column `2 or `1 norm and k · kb is the `0 norm, then this corresponds to dictionary learning (more details in the next section). The optimal hypothesis in terms of reconstruction error is given by A? = arg min kAk↵6c↵ E x⇠D 1 d |x −gA(hA(x))|1 = arg min kAk↵6c↵ E x⇠D min y2Rr:kykβ6k 1 d |x −Ay|1 . 2Or right singular vector when M(By) is not symmetric 6 The loss function can be generalized to other norms, e.g., squared `2 loss, without any essential change in the analysis. Notice that this optimization objective derived from reconstruction error is identically the one used in the literature of dictionary learning. This can be seen as another justification for the definition of unsupervised learning as minimizing reconstruction error subject to compression constraints. The optimization problem above is notoriously hard computationally, and significant algorithmic and heuristic literature attempted to give efficient algorithms under various distributional assumptions(see [6, 4, 2] and the references therein). Our approach below circumvents this computational hardness by convex relaxations that result in learning a different creature, albeit with comparable compression and reconstruction objective. 4.1 Improper dictionary learning: overview We assume the max column `1 norm of A is at most 1 and the `1 norm of y is assumed to be at most k. This is a more general setting than the random dictionaries (up to a re-scaling) that previous works [6, 4] studied. 3In this case, the magnitude of each entry of x is on the order of p k if y has k random ±1 entries. We think of our target error per entry as much smaller than 14. We consider Hk dict that are parametrized by the dictionary matrix A = Rd⇥r, Hdict k = % (hA, gA) : A 2 Rd⇥r, kAk`1!`1 6 1 , where hA(x) = arg min kyk16k |x −Ay|1 , gA(y) = Ay Here we allow r to be larger than d, the case that is often called over-complete dictionary. The choice of the loss can be replaced by `2 loss (or other Lipschitz loss) without any additional efforts, though for simplicity we stick to `1 loss. Define A? to be the the best dictionary under the model and "? to be the optimal error, A? = arg minkAk`1!`161 Ex⇠D ⇥ miny2Rr:kyk16k |x −Ay|1 ⇤ (4.1) "? = Ex⇠D ⇥1 d · |x −gA?(hA?(x))|1 ⇤ . Algorithm 1 group encoding/decoding for improper dictionary learning Inputs: N data points X 2 Rd⇥N ⇠DN. Convex set Q. Sampling probability ⇢. 1. Group encoding: Compute Z = arg min C2Q |X −C|1 , (4.2) and let Y = h(X) = P⌦(Z) , where P⌦(B) is a random sampling of B where each entry is picked with probability ⇢. 2. Group decoding: Compute g(Y ) = arg minC2Q |P⌦(C) −Y |1 . Theorem 4.1. For any δ > 0, p > 1, the hypothesis class Hdict k is C -learnable with encoding length ˜O(k2r1/p/δ2), bias δ + O("?) and sample complexity dO(p) in time nO(p2) We note that here r can be potentially much larger than d since by choosing a large constant p the overhead caused by r can be negligible. Since the average size of the entries is p k, therefore we can get the bias δ smaller than average size of the entries with code length roughly ⇡k. The proof of Theorem 4.1 is deferred to supplementary. To demonstrate the key intuition and technique behind it, in the rest of the section we consider a simpler algorithm that achieves a weaker goal: Algorithm 1 encodes multiple examples into some codes with the matching average encoding length ˜O(k2r1/p/δ2), and these examples can be decoded from the codes together with reconstruction error "? + δ. Next, we outline the analysis of Algorithm 1, and we will show later that one can reduce the problem of encoding a single examples to the problem of encoding multiple examples. 3The assumption can be relaxed to that A has `1 norm at most k and `2-norm at most p d straightforwardly. 4We are conservative in the scaling of the error here. Error much smaller than p k is already meaningful. 7 Here we overload the notation gA?(hA?(·)) so that gA?(hA?(X)) denotes the collection of all the gA?(hA?(xj)) where xj is the j-th column of X. Algorithm 1 assumes that there exists a convex set Q ⇢Rd⇥N such that % gA?(hA?(X)) : X 2 Rd⇥N ⇢{AY : kAk`1!`1 6 1, kY k`1!`1 6 k} ⇢Q . (4.3) That is, Q is a convex relaxation of the group of reconstructions allowed in the class Hdict. Algorithm 1 first uses convex programming to denoise the data X into a clean version Z, which belongs to the set Q. If the set Q has low complexity, then simple random sampling of Z 2 Q serves as a good encoding. The following Lemma shows that if Q has low complexity in terms of sampling Rademacher width, then Algorithm 1 will give a good group encoding and decoding scheme. Lemma 4.2. Suppose convex Q ⇢Rd⇥N satisfies condition (4.3). Then, Algorithm 1 gives a group encoding and decoding pair such that with probability 1 −δ, the average reconstruction error is bounded by "? + O( p SRWm(Q) + O( p log(1/δ)/m) where m = ⇢Nd and SRWm(·) is the sampling Rademacher width (defined in appendix), and the average encoding length is ˜O(⇢d). Towards analyzing the algorithm, we will show that the difference between Z and X is comparable to "?, which is a direct consequence of the optimization over a large set Q that contains optimal reconstruction. Then we prove that the sampling procedure doesn’t lose too much information given a denoised version of the data is already observed, and thus one can reconstruct Z from Y . The novelty here is to use these two steps together to denoise and achieve a short encoding. The typical bottleneck of applying convex relaxation on matrix factorization based problem (or any other problem) is the difficulty of rounding. Here instead of pursuing a rounding algorithm that output the factor A and Y , we look for a convex relaxation that preserves the intrinsic complexity of the set which enables the trivial sampling encoding. It turns out that controlling the width/complexity of the convex relaxation boils down to proving concentration inequalities with sum-of-squares (SoS) proofs, which is conceptually easier than rounding. Therefore, the remaining challenge is to design convex set Q that simultaneously has the following properties (a) is a convex relaxation in the sense of satisfying condition (4.3). (b) admits an efficient optimization algorithm. (c) has low complexity (that is, sampling rademacher width ˜O(N poly(k))). Concretely, we have the following theorem. We note that these three properties (with Lemma 4.2) imply that Algorithm 1 with Q = Qsos p and ⇢= O(k2r2/pd−1/δ2 · log d) gives a group encodingdecoding pair with average encoding length O(k2r2/p/δ2 · log d) and bias δ. Theorem 4.3. For every p > 4, let N = dc0p with a sufficiently large absolute constant c0. Then, there exists a convex set Qsos p ⇢Rd⇥N such that (a) it satisfies condition 4.3; (b) The optimization (4.2) and (2) are solvable by semidefinite programming with run-time nO(p2); (c) the sampling Rademacher width of Qsos p is bounded by p SRWm(Q) 6 ˜O(k2r2/pN/m). 5 Conclusions We have defined a new framework for unsupervised learning which replaces generative assumptions by notions of reconstruction error and encoding length. This framework is comparative, and allows learning of particular hypothesis classes with respect to an unknown distribution by other hypothesis classes. We demonstrate its usefulness by giving new polynomial time algorithms for two unsupervised hypothesis classes. First, we give new polynomial time algorithms for dictionary models in significantly broader range of parameters and assumptions. Another domain is the class of spectral encodings, for which we consider a new class of models that is shown to strictly encompass PCA and kernel-PCA. This new class is capable, in contrast to previous spectral models, learn algebraic manifolds. We give efficient learning algorithms for this class based on convex relaxations. Acknowledgements We thank Sanjeev Arora for many illuminating discussions and crucial observations in earlier phases of this work, amongst them that a representation which preserves information for all classifiers requires lossless compression. 8 References [1] Jayadev Acharya, Hirakendu Das, Ashkan Jafarpour, Alon Orlitsky, and Ananda Theertha Suresh. Tight bounds for universal compression of large alphabets. In Proceedings of the 2013 IEEE International Symposium on Information Theory, Istanbul, Turkey, July 7-12, 2013, pages 2875–2879, 2013. [2] Michal Aharon, Michael Elad, and Alfred Bruckstein. K-svd: Design of dictionaries for sparse representation. In IN: PROCEEDINGS OF SPARS05, pages 9–12, 2005. [3] Animashree Anandkumar, Rong Ge, Daniel Hsu, Sham M. Kakade, and Matus Telgarsky. Tensor decompositions for learning latent variable models. J. Mach. Learn. Res., 15(1):2773–2832, January 2014. [4] Sanjeev Arora, Rong Ge, Tengyu Ma, and Ankur Moitra. Simple, efficient, and neural algorithms for sparse coding. In Proceedings of The 28th Conference on Learning Theory, COLT 2015, Paris, France, July 3-6, 2015, pages 113–149, 2015. [5] Sanjeev Arora, Rong Ge, and Ankur Moitra. Learning topic models–going beyond svd. In Foundations of Computer Science (FOCS), 2012 IEEE 53rd Annual Symposium on, pages 1–10. IEEE, 2012. [6] Sanjeev Arora, Rong Ge, and Ankur Moitra. New algorithms for learning incoherent and overcomplete dictionaries. arXiv preprint arXiv:1308.6273, 2013. [7] Maria-Florina Balcan, Avrim Blum, and Santosh Vempala. A discriminative framework for clustering via similarity functions. In Proceedings of the Fortieth Annual ACM Symposium on Theory of Computing, STOC ’08, pages 671–680, 2008. [8] 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 on Symposium on Theory of Computing, STOC 2015, Portland, OR, USA, June 14-17, 2015, pages 143–151, 2015. [9] Shai Ben-David and Margareta Ackerman. Measures of clustering quality: A working set of axioms for clustering. In D. Koller, D. Schuurmans, Y. Bengio, and L. Bottou, editors, Advances in Neural Information Processing Systems 21, pages 121–128. Curran Associates, Inc., 2009. [10] Toby Berger. Rate distortion theory: A mathematical basis for data compression. 1971. [11] David M. Blei, Andrew Y. Ng, and Michael I. Jordan. Latent dirichlet allocation. J. Mach. Learn. Res., 3:993–1022, March 2003. [12] Thomas M. Cover and Joy A. Thomas. Elements of Information Theory (Wiley Series in Telecommunications and Signal Processing). Wiley-Interscience, 2006. [13] D. L. Donoho and X. Huo. Uncertainty principles and ideal atomic decomposition. IEEE Trans. Inf. Theor., 47(7):2845–2862, September 2006. [14] Elad Hazan and Satyen Kale. Projection-free online learning. In Proceedings of the 29th International Conference on Machine Learning, ICML 2012, Edinburgh, Scotland, UK, June 26 - July 1, 2012, 2012. [15] Daniel Hsu and Sham M Kakade. Learning mixtures of spherical gaussians: moment methods and spectral decompositions. In Proceedings of the 4th conference on Innovations in Theoretical Computer Science, pages 11–20. ACM, 2013. [16] Nikola Jevtic, Alon Orlitsky, and Narayana P. Santhanam. A lower bound on compression of unknown alphabets. Theor. Comput. Sci., 332(1-3):293–311, 2005. [17] Jon M. Kleinberg. An impossibility theorem for clustering. In S. Becker, S. Thrun, and K. Obermayer, editors, Advances in Neural Information Processing Systems 15, pages 463–470. MIT Press, 2003. [18] Roi Livni, David Lehavi, Sagi Schein, Hila Nachlieli, Shai Shalev-Shwartz, and Amir Globerson. Vanishing component analysis. In Proceedings of the 30th International Conference on Machine Learning, ICML 2013, 2013. [19] Mehryar Mohri, Afshin Rostamizadeh, and Ameet Talwalkar. Foundations of machine learning. MIT press, 2012. [20] B. K. Natarajan. Sparse approximate solutions to linear systems. SIAM J. Comput., 24(2):227–234, 1995. [21] Alon Orlitsky, Narayana P. Santhanam, and Junan Zhang. Universal compression of memoryless sources over unknown alphabets. IEEE Trans. Information Theory, 50(7):1469–1481, 2004. [22] Hristo S Paskov, Robert West, John C Mitchell, and Trevor Hastie. Compressive feature learning. In Advances in Neural Information Processing Systems, pages 2931–2939, 2013. [23] Jorma Rissanen. Modeling by shortest data description. Automatica, 14(5):465–471, 1978. [24] Ruslan Salakhutdinov. Learning Deep Generative Models. PhD thesis, University of Toronto, 2009. AAINR61080. [25] Ohad Shamir, Sivan Sabato, and Naftali Tishby. Learning and Generalization with the Information Bottleneck, pages 92–107. Springer Berlin Heidelberg, Berlin, Heidelberg, 2008. [26] Robert Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society. Series B (Methodological), 58(1):267–288, 1996. [27] Naftali Tishby, Fernando C. N. Pereira, and William Bialek. The information bottleneck method. CoRR, physics/0004057, 2000. [28] Leslie G Valiant. A theory of the learnable. Communications of the ACM, 27(11):1134–1142, 1984. [29] Vladimir N. Vapnik. Statistical Learning Theory. Wiley-Interscience, 1998. [30] Van Vu. Singular vectors under random perturbation. Random Structures and Algorithms, 39(4):526–538, 2011. 9 | 2016 | 437 |
6,369 | DISCO Nets: DISsimilarity COefficient Networks Diane Bouchacourt University of Oxford diane@robots.ox.ac.uk M. Pawan Kumar University of Oxford pawan@robots.ox.ac.uk Sebastian Nowozin Microsoft Research Cambridge sebastian.nowozin@microsoft.com Abstract We present a new type of probabilistic model which we call DISsimilarity COefficient Networks (DISCO Nets). DISCO Nets allow us to efficiently sample from a posterior distribution parametrised by a neural network. During training, DISCO Nets are learned by minimising the dissimilarity coefficient between the true distribution and the estimated distribution. This allows us to tailor the training to the loss related to the task at hand. We empirically show that (i) by modeling uncertainty on the output value, DISCO Nets outperform equivalent non-probabilistic predictive networks and (ii) DISCO Nets accurately model the uncertainty of the output, outperforming existing probabilistic models based on deep neural networks. 1 Introduction We are interested in the class of problems that require the prediction of a structured output y ∈Y given an input x ∈X. Complex applications often have large uncertainty on the correct value of y. For example, consider the task of hand pose estimation from depth images, where one wants to accurately estimate the pose y of a hand given a depth image x. The depth image often has some occlusions and missing depth values and this results in some uncertainty on the pose of the hand. It is, therefore, natural to use probabilistic models that are capable of representing this uncertainty. Often, the capacity of the model is restricted and cannot represent the true distribution perfectly. In this case, the choice of the learning objective influences final performance. Similar to Lacoste-Julien et al. [12], we argue that the learning objective should be tailored to the evaluation loss in order to obtain the best performance with respect to this loss. In details, we denote by ∆training the loss function employed during model training, and by ∆task the loss employed to evaluate the model’s performance. We present a simple example to illustrate the point made above. We consider a data distribution that is a mixture of two bidimensional Gaussians. We now consider two models to capture the data probability distribution. Each model is able to represent a bidimensional Gaussian distribution with diagonal covariance parametrised by (µ1, µ2, σ1, σ2). In this case, neither of the models will be able to recover the true data distribution since they do not have the ability to represent a mixture of Gaussians. In other words, we cannot avoid model error, similarly to the real data scenario. Each model uses its own training loss ∆training. Model A employs a loss that emphasises on the first dimension of the data, specified for x = (x1, x2), x′ = (x′ 1, x′ 2) ∈R2 by ∆A(x −x′) = (10 × (x1 −x′ 1)2 + 0.1 × (x2 −x′ 2)2) 1/2. Model B does the opposite and employs the loss function ∆B(x −x′) = (0.1 × (x1 −x′ 1)2 + 10 × (x2 −x′ 2)2) 1/2. Each model performs a grid search over the best parameters values for (µ1, µ2, σ1, σ2). Figure 1 shows the contours of the Mixture of Gaussians distribution of the data (in black), and the contour of the Gaussian fitted by each model (in red and green). Detailed setting of this example is available in the supplementary material. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Table 1: ∆task± SEM (standard error of the mean) with respect to ∆training employed. Evaluation is done the test set. ∆training ∆task ∆A ∆B ∆A 11.6 ± 0.287 13.7 ± 0.331 ∆B 12.1 ± 0.305 11.0 ± 0.257 Figure 1: Contour lines of the Gaussian distribution fitted by each model on the Mixture of Gaussians data distribution. Best viewed in color. As expected, the fitted Gaussian distributions differ according to ∆training employed. Table 1 shows that the loss on the test set, evaluated with ∆task, is minimised if ∆training = ∆task. This simple example illustrates the advantage to being able to tailor the model’s training objective function to have ∆training = ∆task. This is in contrast to the commonly employed learning objectives we present in Section 2, that are agnostic of the evaluation loss. In order to alleviate the aforementioned deficiency of the state-of-the-art, we introduce DISCO Nets, a new class of probabilistic model. DISCO Nets represent P, the true posterior distribution of the data, with a distribution Q parametrised by a neural network. We design a learning objective based on a dissimilarity coefficient between P and Q. The dissimilarity coefficient we employ was first introduced by Rao [23] and is defined for any non-negative symmetric loss function. Thus, any such loss can be incorporated in our setting, allowing the user to tailor DISCO Nets to his or her needs. Finally, contrarily to existing probabilistic models presented in Section 2, DISCO Nets do not require any specific architecture or training procedure, making them an efficient and easy-to-use class of model. 2 Related Work Deep neural networks, and in particular, Convolutional Neural Networks (CNNs) are comprised of several convolutional layers, followed by one or more fully connected (dense) layers, interleaved by non-linear function(s) and (optionally) pooling. Recent probabilistic models use CNNs to represent non-linear functions of the data. We observe that such models separate into two types. The first type of model does not explicitly compute the probability distribution of interest. Rather, these models allow the user to sample from this distribution by feeding the CNN with some noise z. Among such models, Generative Adversarial Networks (GAN) presented in Goodfellow et al. [7] are very popular and have been used in several computer vision applications, for example in Denton et al. [1], Radford et al. [22], Springenberg [25] and Yan et al. [28]. A GAN model consists of two networks, simultaneously trained in an adversarial manner. A generative model, referred as the Generator G, is trained to replicate the data from noise, while an adversarial discriminative model, referred as the Discriminator D, is trained to identify whether a sample comes from the true data or from G. The GAN training objective is based on a minimax game between the two networks and approximately optimizes a Jensen-Shannon divergence. However, as mentioned in Goodfellow et al. [7] and Radford et al. [22], GAN models require very careful design of the networks’ architecture. Their training procedure is tedious and tends to oscillate. GAN models have been generalized to conditional GAN (cGAN) in Mirza and Osindero [16], where some additional input information can be fed to the Generator and the Discriminator. For example in Mirza and Osindero [16] a cGAN model generates tags corresponding to an image. Gauthier [4] applies cGAN to face generation. Reed et al. [24] propose to generate images of flowers with a cGAN model, where the conditional information is a word description of the flower to generate1. While the application of cGAN is very promising, little quantitative evaluation has been done. Furthermore, cGAN models suffer from the same difficulties we mentioned for GAN. Another line of work has developed towards the use of statistical hypothesis testing to learn probabilistic models. In Dziugaite et al. [2] and Li et al. [14], the authors propose to train generative deep networks with an objective function based on the Maximum Mean Discrepancy (MMD) criterion. The MMD method (see Gretton et al. [8, 9]) is a statistical hypothesis test assessing if two probabilistic distributions are similar. As mentioned in Dziugaite et al. [2], the MMD test can been seen as playing the role of an adversary. 1At the time writing, we do not have access to the full paper of Reed et al. [24] and therefore cannot take advantage of this work in our experimental comparison. 2 The second type of model approximates intractable posterior distributions with use of variational inference. The Variational Auto-Encoders (VAE) presented in Kingma and Welling [10] is composed of a probabilistic encoder and a probabilistic decoder. The probabilistic encoder is fed with the input x ∈X and produces a posterior distribution P(z|x) over the possible values of noise z that could have generated x. The probabilistic decoder learns to map the noise z back to the data space X. The training of VAE uses an objective function based on a Kullback-Leibler Divergence. VAE and GAN models have been combined in Makhzani et al. [15], where the authors propose to regularise autoencoders with an adversarial network. The adversarial network ensures that the posterior distribution P(z|x) matches an arbitrary prior P(z). In hand pose estimation, imagine the user wants to obtain accurate positions of the thumb and the index finger but does not need accurate locations of the other fingers. The task loss ∆task might be based on a weighted L2-norm between the predicted and the ground-truth poses, with high weights on the thumb and the index. Existing probabilistic models cannot be tailored to task-specific losses and we propose the DISsimilarity COefficient Networks (DISCO Nets) to alleviate this deficiency. 3 DISCO Nets We begin the description of our model by specifying how it can be used to generate samples from the posterior distribution, and how the samples can in turn be employed to provide a pointwise estimate. In the subsequent subsection, we describe how to estimate the parameters of the model. 3.1 Prediction Sampling. A DISCO Net consists of several convolutional and dense layers (interleaved by nonlinear function(s) and possibly pooling) and takes as input a pair (x, z) ∈X × Z, where x is input data and z is some random noise. Given one pair (x, z), the DISCO Net produces a value for the output y. In the example of hand pose estimation, the input depth image x is fed to the convolutional layers. The output of the last convolutional layer is flattened and concatenated with a noise sample z. The resulting vector is fed to several dense layers, and the last dense layer outputs a pose y. From a single depth image x, by using different noise samples, the DISCO Net produces different pose candidates for the depth image. This process is illustrated in Figure 2. Importantly, DISCO Nets are flexible in the choice of the architecture. For example, the noise could be concatenated at any stage of the network, including at the start. Figure 2: For a single depth image x, using 3 different noise samples (z1, z2, z3), DISCO Nets output 3 different candidate poses (y1, y2, y3) (shown superimposed on the depth image). The depth image is from the NYU Hand Pose Dataset of Tompson et al. [27], preprocessed as in Oberweger et al. [17]. Best viewed in color. We denote Q the distribution that is parametrised by the DISCO Net’s neural network. For a given input x, DISCO Nets provide the user with samples y drawn from Q(y|x) without requiring the expensive computation of the (often intractable) partition function. In the remainder of the paper we consider x ∈Rdx, y ∈Rdy and z ∈Rdz. Pointwise Prediction. In order to obtain a single prediction y for a given input x, DISCO Nets use the principle of Maximum Expected Utility (MEU), similarly to Premachandran et al. [21]. The prediction y∆task maximises the expected utility, or rather minimises the expected task-specific loss ∆task, estimated using the sampled candidates. Formally, the prediction is made as follows: 3 y∆task = argmax k∈[1,K] EU(yk) = argmin k∈[1,K] K X k′=1 ∆task(yk, y′ k) (1) where (y1, ..., yK) are the candidate outputs sampled for the single input x. Details on the MEU method are in the supplementary material. 3.2 Learning DISCO Nets Objective Function. We want DISCO Nets to accurately model the true probability P(y|x) via Q(y|x). In other words, Q(y|x) should be as similar as possible to P(y|x). This similarity is evaluated with respect to the loss specific to the task at hand. Given any non-negative symmetric loss function between two outputs ∆(y, y′) with (y, y′) ∈Y × Y, we employ a diversity coefficient that is the expected loss between two samples drawn randomly from the two distributions. Formally, the diversity coefficient is defined as: DIV∆(P, Q, D) = Ex∼D(x)[Ey∼P (y|x)[Ey′∼Q(y′|x)[∆(y, y′)]]] (2) Intuitively, we should minimise DIV∆(P, Q, D) so that Q(y|x) is as similar as possible to P(y|x). However there is uncertainty on the output y to predict for a given x. In other words, P(y|x) is diverse and Q(y|x) should be diverse as well. Thus we encourage Q(y|x) to provide sample outputs, for a given x, that are diverse by minimising the following dissimilarity coefficient: DISC∆(P, Q, D) = DIV∆(P, Q, D) −γDIV∆(Q, Q, D) −(1 −γ)DIV∆(P, P, D) (3) with γ ∈[0, 1]. The dissimilarity DISC∆(P, Q, D) is the difference between the diversity between P and Q, and an affine combination of the diversity of each distribution, given x ∼D(x). These coefficients were introduced by Rao [23] with γ = 1/2 and used for latent variable models by Kumar et al. [11]. We do not need to consider the term DIV∆(P, P, D) as it is a constant in our problem, and thus the DISCO Nets objective function is defined as follows: F = DIV∆(P, Q, D) −γDIV∆(Q, Q, D) (4) When minimising F, the term γDIV∆(Q, Q, D) encourages Q(y|x) to be diverse. The value of γ balances between the two goals of Q(y|x) that are providing accurate outputs while being diverse. Optimisation. Let us consider a training dataset composed of N examples input-output pairs D = {(xn, yn), n = 1..N}. In order to train DISCO Nets, we need to compute the objective function of equation (4). We do not have knowledge of the true probability distributions P(y, x) and P(x). To overcome this deficiency, we construct estimators of each diversity term DIV∆(P, Q) and DIV∆(Q, Q). First, we take an empirical distribution of the data, that is, taking ground-truth pairs (xn, yn). We then estimate each distribution Q(y|xn) by sampling K outputs from our model for each xn. This gives us an unbiased estimate of each diversity term, defined as: d DIV∆(P, Q, D) = 1 N N X n=1 1 K K X k=1 ∆(yn, G(zk, xn; θ)) d DIV∆(Q, Q, D) = 1 N N X n=1 1 K(K −1) K X k=1 K X k′=1,k′̸=k ∆(G(zk, xn; θ), G(zk′, xn; θ)) (5) We have an unbiased estimate of the DISCO Nets’ objective function of equation (4): bF(∆, θ) = d DIV∆(P, Q, D) −γ d DIV∆(Q, Q, D) (6) where yk = G(zk, xn; θ) is a candidate output sampled from DISCO Nets for (xn,zk), and θ are the parameters of DISCO Nets. It is important to note that the second term of equation (6) is summing over k and k′ ̸= k to have an unbiased estimate, therefore we compute the loss between pairs of different samples G(zk, xn; θ) and G(zk′, xn; θ). The parameters θ are learned by Gradient Descent. Algorithm 1 shows the training of DISCO Nets. In steps 4 and 5 of Algorithm 1, we draw K random noise vectors (zn,1, ...zn,k) per input example xn, and generate K candidate outputs G(zn,k, xn; θ) per input. This allow us to compute an unbiased estimate of the gradient in step 7. For clarity, in the remainder of the paper we do not explicitely write the parameters θ and write G(zk, xn). 4 Algorithm 1: DISCO Nets Training algorithm. 1 for t=1...T epochs do 2 Sample minibatch of b training example pairs {(x1, y1)...(xb, yb)}. 3 for n=1...b do 4 Sample K random noise vectors (zn,1, ...zn,k) for training example xn 5 Generate K candidate outputs G(zn,k, xn; θ), k = 1..K for training example xn 6 end 7 Update parameters θt ←θt−1 by descending the gradient of equation (6) : ∇θ bF(∆, θ). 8 end 3.3 Strictly Proper Scoring Rules. Scoring Rule for Learning. A scoring rule S(Q, P), as defined in Gneiting and Raftery [5], evaluates the quality of a predictive distribution Q with respect to a true distribution P. When using a scoring rule one should ensure that it is proper, which means it is maximised when P = Q. A scoring rule is said to be strictly proper if P = Q is the unique maximiser of S. Hence maximising a proper scoring rule ensures that the model aims at predicting relevant forecast. Gneiting and Raftery [5] define score divergences corresponding to a proper scoring rule S: d(Q, P) = S(P, P) −S(Q, P) (7) If S is proper, d is a valid non-negative divergence function, with value 0 if (and only if, in the case of strictly proper) Q = P. For example the MMD criterion (see Gretton et al. [8, 9]) mentioned in Section 2 is an example of this type of divergence. In our case, any loss ∆expressed with an universal kernel will define the DISCO Nets’ objective function as such divergence (see Zawadzki and Lahaie [29]). For example, by Theorem 5 of Gneiting and Raftery [5], if we take as loss function ∆β(y, y′) = ||y −y′||β 2 = Pdy i=1 |(yi −y′i|2) β/2 with β ∈[0, 2] excluding 0 and 2, our training objective is (the negative of) a strictly proper scoring rule, that is: bF(∆, θ) = 1 N PN n=1 h 1 K P k ||yn −G(zk, xn)||β 2 −1 2 1 K(K −1) P k P k′̸=k ||G(zk′, xn) −G(zk, xn)||β 2 i (8) This score has been referred in the litterature as the Energy Score in Gneiting and Raftery [5], Gneiting et al. [6], Pinson and Tastu [19]. By employing a (strictly) proper scoring rule we ensure that our objective function is (only) minimised at the true distribution P, and expect DISCO Nets to generalise better on unseen data. We show below that strictly proper scoring rules are also relevant to assess the quality of the distribution Q captured by the model. Discriminative power of proper scoring rules. As observed in Fukumizu et al. [3], kernel density estimation (KDE) fails in high dimensional output spaces. Our goal is to compare the quality of the distribution captured between two models, Q1 and Q2. In our setting Q1 better models P than Q2 according to the scoring rule S and its associated divergence d if d(Q1, P) < d(Q2, P). As noted in Pinson and Tastu [19], S being proper does not ensure d(Q1, y) < d(Q2, y) for all observations y drawn from P. However if the scoring rule is strictly proper scoring rule, this property should be ensured in the neighbourhood of the true distribution. 4 Experiments : Hand Pose Estimation Given a depth image x, which often contains occlusions and missing values, we wish to predict the hand pose y. We use the NYU Hand Pose dataset of Tompson et al. [27] to estimate the efficiency of DISCO Nets for this task. 4.1 Experimental Setup NYU Hand Pose Dataset. The NYU Hand Pose dataset of Tompson et al. [27] contains 8252 testing and 72,757 training frames of captured RGBD data with ground-truth hand pose information. The training set is composed of images of one person whereas the testing set gathers samples from two persons. For each frame, the RGBD data from 3 Kinects is provided: a frontal view and 2 side views. In our experiments we use only the depth data from the frontal view. While the ground truth 5 contains J = 36 annotated joints, we follow the evaluation protocol of Oberweger et al. [17, 18] and use the same subset of J = 14 joints. We also perform the same data preprocessing as in Oberweger et al. [17, 18], and extract a fixed-size metric cube around the hand from the depth image. We resize the depth values within the cube to a 128 × 128 patch and normalized them in [−1, 1]. Pixels deeper than the back of the cube and missing depth values are both set to a depth of 1. Methods. We employ loss functions between two outputs of the form of the Energy score (8), that is, ∆training = ∆β(y, y′) = ||y −y′||β 2. Our first goal is to assess the advantages of DISCO Nets with respect to non-probabilistic deep networks. One model, referred as DISCOβ,γ, is a DISCO Nets probabilistic model, with γ ̸= 0 in the dissimilarity coefficient of equation (6). When taking γ = 0, noise is injected and the model capacity is the same as DISCOβ,γ̸=0. The model BASEβ, is a non-probabilistic model, by taking γ = 0 in the objective function of equation (6) and no noise is concatenated. This corresponds to a classic deep network which for a given input x generates a single output y = G(x). Note that we write G(x) and not G(z, x) since no noise is concatenated. Evaluation Metrics. We report classic non-probabilistic metrics for hand pose estimation employed in Oberweger et al. [17, 18] and Taylor et al. [26], that are, the Mean Joint Euclidean Error (MeJEE), the Max Joint Euclidean Error (MaJEE) and the Fraction of Frames within distance (FF). We refer the reader to the supplementary material for detailed expression of these metrics. These metrics use the Euclidean distance between the prediction and the ground-truth and require a single pointwise prediction. This pointwise prediction is chosen with the MEU method among K candidates. We added the probabilistic metric ProbLoss. ProbLoss is defined as in Equation 8 with the Euclidean norm and is the divergence associated with a strictly proper scoring rule. Thus, ProbLoss ranks the ability of the models to represent the true distribution. ProbLoss is computed using K candidate poses for a given depth image. For the non-probabilistic model BASEβ, only a single pointwise predicted output y is available. We construct the K candidates by adding some Gaussian random noise of mean 0 and diagonal covariance Σ = σ1, with σ ∈{1mm, 5mm, 10mm} and refer to the model as BASEβ,σ. 2 Loss functions. As we employ standard evaluation metrics based on the Euclidean norm, we train with the Euclidean norm (that is, ∆training(y, y′) = ||y −y′||β 2 with β = 1). When γ = 1 2 our objective function coincides with ProbLoss. Architecture. The novelty of DISCO Nets resides in their objective function. They do not require the use of a specific network architecture. This allows us to design a simple network architecture inspired by Oberweger et al. [18]. The architecture is shown in Figure 2. The input depth image x is fed to 2 convolutional layers, each having 8 filters, with kernels of size 5 × 5, with stride 1, followed by Rectified Linear Units (ReLUs) and Max Pooling layers of kernel size 3 × 3. A third and last convolutional layer has 8 filters, with kernels of size 5 × 5, with stride 1, followed by a Rectified Linear Unit. The ouput of the convolution is concatenated to the random noise vector z of size dz = 200, drawn from a uniform distribution in [−1, 1]. The result of the concatenation is fed to 2 dense layers of output size 1024, with ReLUs, and a third dense layer that outputs the candidate pose y ∈R3×J. For the non-probabilistic BASEβ,σ model no noise is concatenated as only a pointwise estimate is produced. Training. We use 10,000 examples from the 72,757 training frames to construct a validation dataset and train only on 62,757 examples. Back-propagation is used with Stochastic Gradient Descent with a batchsize of 256. The learning rate is fixed to λ = 0.01 and we use a momentum of m = 0.9 (see Polyak [20]). We also add L2-regularisation controlled by the parameter C. We use C = [0.0001, 0.001, 0.01] which is a relevant range as the comparative model BASEβ is best performing for C = 0.001. Note that DISCO Nets report consistent performances across the different values C, contrarily to BASEβ. We use 3 different random seeds to initialize each model network parameters. We report the performance of each model with its best cross-validated seed and C. We train all models for 400 epochs as it results in a change of less than 3% in the value of the loss on the validation dataset for BASEβ. We refer the reader to the supplementary material for details on the setting. 2We also evaluate the non-probabilistic model BASEβ using its pointwise prediction rather than the MEU method. Results are consistent and detailed in the supplementary material. 6 Table 2: Metrics values on the test set ± SEM. Best performances in bold. Model ProbLoss (mm) MeJEE (mm) MaJEE (mm) FF (80mm) BASEβ=1,σ=1 103.8±0.627 25.2±0.152 52.7±0.290 86.040 BASEβ=1,σ=5 99.3±0.620 25.5±0.151 52.9±0.289 85.773 BASEβ=1,σ=10 96.3±0.612 25.7±0.149 53.2±0.288 85.664 DISCOβ=1,γ=0 92.9±0.533 21.6±0.128 46.0±0.251 92.971 DISCOβ=1,γ=0.25 89.9±0.510 21.2±0.122 46.4±0.252 93.262 DISCOβ=1,γ=0.5 83.8 ±0.503 20.9±0.124 45.1±0.246 94.438 Table 3: Metrics values on the test set ± SEM for cGAN. Model ProbLoss (mm) MeJEE (mm) MaJEE (mm) FF (80mm) cGAN 442.7±0.513 109.8±0.128 201.4±0.320 0.000 cGANinit, fixed 128.9±0.480 31.8±0.117 64.3±0.230 78.454 4.2 Results. Quantitative Evaluation. Table 2 reports performances on the test dataset, with parameters crossvalidated on the validation set. All versions of the DISCO Net model outperform the BASEβ model. Among the different values of γ, we see that γ = 0.5 better captures the true distribution (lower ProbLoss) while retaining accurate performance on the standard pointwise metrics. Interestingly, using an all-zero noise at test-time gives similar performances on pointwise metrics. We link this to the observation that both the MEAN and the MEU method perform equivalently on these metrics (see supplementary material). Qualitative Evaluation. In Figure 3 we show candidate poses generated by DISCOβ=1,γ=0.5 for 3 testing examples. The left image shows the input depth image, and the right image shows the ground-truth pose (in grey) with 100 candidate outputs (superimposed in transparent red). The model predict the joint locations and we interpolate the joints with edges. If an edge is thinner and more opaque, it means the different predictions overlap and that the uncertainty on the location of the edge’s joints is low. We can see that DISCOβ=1,γ=0.5 captures relevant information on the structure of the hand. (a) When there are no occlusions, DISCO Nets model low uncertainty on all joints. (b) When the hand is half-fisted, DISCO Nets model the uncertainty on the location of the fingertips. (c) Here the fingertips of all fingers but the forefinger are occluded and DISCO Nets model high uncertainty on them. Figure 3: Visualisation of DISCOβ=1,γ=0.5 predictions for 3 examples from the testing dataset. The left image shows the input depth image, and the right image shows the ground-truth pose in grey with 100 candidate outputs superimposed in transparent red. Best viewed in color. Figure 4 shows the matrices of Pearson product-moment correlation coefficients between joints. We note that DISCO Net with γ = 0.5 better captures the correlation between the joints of a finger and between the fingers. P PR PL TR TM TT IM IT MM MT RM RT PM PT P PR PL TR TM TT IM IT MM MT RM RT PM PT γ = 0 P PR PL TR TM TT IM IT MM MT RM RT PM PT P PR PL TR TM TT IM IT MM MT RM RT PM PT γ = 0.5 Figure 4: Pearson coefficients matrices of the joints: Palm (no value as the empirical variance is null), Palm Right, Palm Left, Thumb Root, Thumb Mid, Index Mid, Index Tip, Middle Mid, Middle Tip, Ring Mid, Ring Tip, Pinky Mid, Pinky Tip. 7 4.3 Comparison with existing probabilistic models. To the best of our knowledge the conditional Generative Adversarial Networks (cGAN) from Mirza and Osindero [16] has not been applied to pose estimation. In order to compare cGAN to DISCO Nets, several issues must be overcome. First, we must design a network architecture for the Discriminator. This is a first disadvantage of cGAN compared to DISCO Nets which require no adversary. Second, as mentioned in Goodfellow et al. [7] and Radford et al. [22], GAN (and thus cGAN) require very careful design of the networks’ architecture and training procedure. In order to do a fair comparison, we followed the work in Mirza and Osindero [16] and practical advice for GAN presented in Larsen and Sønderby [13]. We try (i) cGAN, initialising all layers of D and G randomly, and (ii) cGANinit, fixed initialising the convolutional layers of G and D with the trained best-performing DISCOβ=1,γ=0.5 of Section 4.2, and keeping these layers fixed. That is, the convolutional parts of G and D are fixed feature extractors for the depth image. This is a setting similar to the one employed for tag-annotation of images in Mirza and Osindero [16]. Details on the setting can be found in the supplementary material. Table 3 shows that the cGAN model obtains relevant results only when the convolutional layers of G and D are initialised with our trained model and kept fixed, that is cGANinit, fixed. These results are still worse than DISCO Nets performances. While there may be a better architecture for cGAN, our experiments demonstrate the difficulty of training cGAN over DISCO Nets. 4.4 Reference state-of-the-art values. We train the best-performing DISCOβ=1,γ=0.5 of Section 4.2 on the entire dataset, and compare performances with state-of-the-art methods in Table 4 and Figure 5. These state-of-the-art methods are specifically designed for hand pose estimation. In Oberweger et al. [17] a constrained prior hand model, referred as NYU-Prior, is refined on each hand joint position to increase accuracy, referred as NYU-Prior-Refined. In Oberweger et al. [18], the input depth image is fed to a first network NYU-Init, that outputs a pose used to synthesize an image with a second network. The synthesized image is used with the input depth image to derive a pose update. We refer to the whole model as NYU-Feedback. On the contrary, DISCO Nets uses a single network whose architecture is similar to NYU-Prior (without constraining on a pose prior). By accurately modeling the distribution of the pose given the depth image, DISCO Nets obtain comparable performances to NYU-Prior and NYU-Prior-Refined. Without any extra effort, DISCO Nets could be embedded in the presented refinement and feedback methods, possibly boosting state-of-the-art performances. Table 4: DISCO Nets compared to stateof-the-art performances ± SEM. Model MeJEE (mm) MaJEE (mm) FF (80mm) NYU-Prior 20.7±0.150 44.8±0.289 91.190 NYU-Prior-Refined 19.7±0.157 44.7±0.327 88.148 NYU-Init 27.4±0.152 55.4±0.265 86.537 NYU-Feedback 16.0±0.096 36.1±0.208 97.334 DISCOβ=1,γ=0.5 20.7±0.121 45.1±0.246 93.250 Figure 5: Fractions of frames within distance d in mm (by 5 mm). Best viewed in color. 5 Discussion. We presented DISCO Nets, a new family of probabilistic model based on deep networks. DISCO Nets employ a prediction and training procedure based on the minimisation of a dissimilarity coefficient. Theoretically, this ensures that DISCO Nets accurately capture uncertainty on the correct output to predict given an input. Experimental results on the task of hand pose estimation consistently support our theoretical hypothesis as DISCO Nets outperform non-probabilistic equivalent models, and existing probabilistic models. Furthermore, DISCO Nets can be tailored to the task to perform. This allows a possible user to train them to tackle different problems of interest. As their novelty resides mainly in their objective function, DISCO Nets do not require any specific architecture and can be easily applied to new problems. We contemplate several directions for future work. First, we will apply DISCO Nets to other prediction problems where there is uncertainty on the output. Second, we would like to extend DISCO Nets to latent variables models, allowing us to apply DISCO Nets to diverse dataset where ground-truth annotations are missing or incomplete. 6 Acknowlegements. This work is funded by the Microsoft Research PhD Scholarship Programme. We would like to thank Pankaj Pansari, Leonard Berrada and Ondra Miksik for their useful discussions and insights. 8 References. [1] E.L. Denton, S. Chintala, A. Szlam, and R. Fergus. Deep generative image models using a Laplacian pyramid of adversarial networks. In NIPS. 2015. [2] G. K. Dziugaite, D. M. Roy, and Z. Ghahramani. Training generative neural networks via maximum mean discrepancy optimization. In UAI, 2015. [3] K. Fukumizu, L. Song, and A. Gretton. Kernel Bayes’ rule: Bayesian inference with positive definite kernels. JMLR, 2013. [4] J. Gauthier. Conditional generative adversarial nets for convolutional face generation. Class Project for Stanford CS231N: Convolutional Neural Networks for Visual Recognition, 2014. [5] T. Gneiting and A. E. Raftery. Strictly proper scoring rules, prediction, and estimation. Journal of the American Statistical Association, 2007. [6] Tilmann Gneiting, Larissa I. Stanberry, Eric P. Grimit, Leonhard Held, and Nicholas A. Johnson. Assessing probabilistic forecasts of multivariate quantities, with an application to ensemble predictions of surface winds. TEST, 2008. [7] I. J. Goodfellow, J. Pouget-Abadie, M. Mirza, Bing Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial nets. In NIPS. 2014. [8] A. Gretton, K. M. Borgwardt, M. J. Rasch, B. Scholkopf, and A. J. Smola. A kernel method for the two-sample problem. In NIPS, 2007. [9] A. Gretton, K. M. Borgwardt, M. J. Rasch, B. Scholkopf, and A. J. Smola. A kernel two-sample test. In JMLR, 2012. [10] D. P. Kingma and M. Welling. Auto-encoding variational Bayes. In ICLR, 2014. [11] M. P. Kumar, B. Packer, and D. Koller. Modeling latent variable uncertainty for loss-based learning. In ICML, 2012. [12] S. Lacoste-Julien, F. Huszar, and Z. Ghahramani. Approximate inference for the loss-calibrated Bayesian. In AISTATS, 2011. [13] A. B. L. Larsen and S. K. Sønderby. URL http://torch.ch/blog/2015/11/13/gan. html. [14] Y. Li, K. Swersky, and R. Zemel. Generative moment matching networks. In ICML, 2015. [15] A. Makhzani, J. Shlens, N. Jaitly, and I. J. Goodfellow. Adversarial autoencoders. ICLR Workshop, 2015. [16] M. Mirza and S. Osindero. Conditional generative adversarial nets. In NIPS Deep Learning Workshop, 2014. [17] M. Oberweger, P. Wohlhart, and V. Lepetit. Hands deep in deep learning for hand pose estimation. In Computer Vision Winter Workshop, 2015. [18] M. Oberweger, P. Wohlhart, and V. Lepetit. Training a Feedback Loop for Hand Pose Estimation. In ICCV, 2015. [19] Pierre Pinson and Julija Tastu. Discrimination ability of the Energy score. 2013. [20] B. T. Polyak. Some methods of speeding up the convergence of iteration methods. 1964. [21] V. Premachandran, D. Tarlow, and D. Batra. Empirical minimum Bayes risk prediction: How to extract an extra few% performance from vision models with just three more parameters. In CVPR, 2014. [22] A. Radford, L. Metz, and S. Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. In ICLR, 2015. [23] C.R. Rao. Diversity and dissimilarity coefficients: A unified approach. Theoretical Population Biology, pages Vol. 21, No. 1, pp 24–43, 1982. [24] S. Reed, Z. Akata, X. Yan, L. Logeswaran, H. Lee, and B. Schiele. Generative adversarial text to image synthesis. In ICML, 2016. [25] J. T. Springenberg. Unsupervised and semi-supervised learning with categorical generative adversarial networks. ICLR, 2016. [26] J. Taylor, J. Shotton, T. Sharp, and A. Fitzgibbon. The vitruvian Manifold: Inferring dense correspondences for oneshot human pose estimation. In CVPR, 2012. [27] J. Tompson, M. Stein, Y. Lecun, and K. Perlin. Real-time continuous pose recovery of human hands using convolutional networks. ACM Transactions on Graphics, 2014. [28] X. Yan, J. Yang, K. Sohn, and H. Lee. Attribute2image: Conditional image generation from visual attributes. 2016. [29] E. Zawadzki and S. Lahaie. Nonparametric scoring rules. In AAAI Conference on Artificial Intelligence. 2015. 9 | 2016 | 438 |
6,370 | Learning to Poke by Poking: Experiential Learning of Intuitive Physics Pulkit Agrawal∗ Ashvin Nair∗ Pieter Abbeel Jitendra Malik Sergey Levine Berkeley Artificial Intelligence Research Laboratory (BAIR) University of California Berkeley {pulkitag,anair17,pabbeel,malik,svlevine}@berkeley.edu Abstract We investigate an experiential learning paradigm for acquiring an internal model of intuitive physics. Our model is evaluated on a real-world robotic manipulation task that requires displacing objects to target locations by poking. The robot gathered over 400 hours of experience by executing more than 100K pokes on different objects. We propose a novel approach based on deep neural networks for modeling the dynamics of robot’s interactions directly from images, by jointly estimating forward and inverse models of dynamics. The inverse model objective provides supervision to construct informative visual features, which the forward model can then predict and in turn regularize the feature space for the inverse model. The interplay between these two objectives creates useful, accurate models that can then be used for multi-step decision making. This formulation has the additional benefit that it is possible to learn forward models in an abstract feature space and thus alleviate the need of predicting pixels. Our experiments show that this joint modeling approach outperforms alternative methods. 1 Introduction Humans can effortlessly manipulate previously unseen objects in novel ways. For example, if a hammer is not available, a human might use a piece of rock or back of a screwdriver to hit a nail. What enables humans to easily perform such tasks that machines struggle with? One possibility is that humans possess an internal model of physics (i.e. “intuitive physics” (Michotte, 1963; McCloskey, 1983)) that allows them to reason about physical properties of objects and forecast their dynamics under the effect of applied forces. Such models can be used to transform a given task into a search problem in a manner similar to how moves can be planned in a game of chess or tic-tac-toe by searching through the game tree. Because the search algorithm is independent of task semantics, solutions to different and possibly new tasks can be determined using the same mechanism. In human development, it is well known that infants spend years worth of time playing with objects in a seemingly random manner with no specific end goal (Smith & Gasser, 2005; Gopnik et al., 1999). One hypothesis is that infants distill this experience into intuitive physics models that predict how their actions effect the motion of objects. Once learnt, these models could be used for planning actions for achieving novel goals later in life. Inspired by this hypothesis, in this work we investigate whether a robot can use it’s own experience to learn an intuitive model of physics that is also effective for planning actions. In our setup (see Figure 1), a Baxter robot interacts with objects kept on a table in front of it by randomly poking them. The robot records the visual state of the world before and after it executes a poke in order to learn a mapping between its actions and the accompanying change in visual state caused by object motion. To date our robot has interacted with objects for more than 400 hours and in process collected more than 100K pokes on 16 distinct objects. ∗equal contribution, authors are listed in alphabetical order. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. CNN CNN Predict Poke Figure 1: Infants spend years worth of time playing with objects in a seemingly random manner. They might use this experience to learn a model of physics relating their actions with the resulting motion of objects. Inspired by this hypothesis, we let a robot interact with objects by randomly poking them. The robot pokes objects and records the visual state before (left) and after (right) the poke. The triplet of before image, after image and the applied poke is used to train a neural network (center) for learning the mapping between actions and the accompanying change in visual state. We show that this learn model can be used to push objects into a desired configuration. What kind of a model should the robot learn from it’s experience? One possibility is to build a model that predicts the next visual state from the current visual state and the applied force (i.e forward dynamics model). This is challenging because predicting the value of every pixel in the next image is non-trivial in real world scenarios. Moreover, in most cases it is not the precise pixel values that are of interest, but the occurrence of a more abstract event. For example, predicting that a glass jar will break when pushed from the table onto the ground is of greater interest (and easier) than predicting exactly how every piece of shattered glass will look. The difficulty, however, is that supervision for such abstract concepts or events is not readily available in unsupervised settings such as ours. In this work, we propose one solution to this problem by jointly training forward and inverse dynamics models. A forward model predicts the next state from the current state and action, and an inverse model predicts the action given the initial and target state. In joint training, the inverse model objective provides supervision for transforming image pixels into an abstract feature space, which the forward model can then predict. The inverse model alleviates the need for the forward model to make predictions in the pixel space and the forward model in turn regularizes the feature space for the inverse model. We empirically show that the joint model allows the robot to generalize and plan actions for achieving tasks with significantly different visual statistics as compared to the data used in the learning phase. Our model can be used for multi step decision making and displace objects with novel geometry and texture into desired goal locations that are much farther apart as compared to position of objects before and after a single poke. We probe the joint modeling approach further using simulation studies and show that the forward model regularizes the inverse model. 2 Data Figure 1 shows our experimental setup. The robot is equipped with a Kinect camera and a gripper for poking objects kept on a table in front of it. At any given time there were 1-3 objects chosen from a set of 16 distinct objects present on the table. The robot’s coordinate system was as following: X and Y axis represented the horizontal and vertical axes, while the Z axis pointed away from the robot. The robot poked objects by moving its finger along the XZ plane at a fixed height from the table. Poke Representation: For collecting a sample of interaction data, the robot first selects a random target point in its field of view to poke. One issue with random poking is that most pokes are executed in free space which severely slows down collection of interesting interaction data. For speedy data collection, a point cloud from the Kinect depth camera was used to only chose points that lie on any object except the table. Point cloud information was only used during data collection and at test time our system only requires RGB image data. After selecting a random point to poke (p) on the object, 2 Figure 2: These images depict the robot in the process of displacing the bottle away from the indicated dotted line. In the middle of the poke, the object flips and ends up moving in the wrong direction. Such occurrences are common because the real world objects have complex geometric and material properties. This makes learning manipulation strategies without prior knowledge very challenging. the robot randomly samples a poke direction (θ) and length (l). Kinematically, the poke is defined by points p1, p2 that are l 2 distance from p in the directions θo, (180 + θ)o respectively. The robot executes the poke by moving its finger from p1 to p2. Our robot can run autonomously 24x7 without any human intervention. Sometimes when objects are poked they move as expected, but other times due to non-linear interaction between the robot’s finger and the object they move in unexpected ways as shown in Figure 2. Any model of the poking data must deal with such non-linear interactions (see project website for more examples). A small amount of data in the early stages of the project was collected on a table with a green background, but most of our data was collected in a wooden arena with walls for preventing objects from falling down. All results in this paper are from data collected only from the wooden arena. 3 Method The forward and inverse models can be formally described by equations 1 and 2, respectively. The notation is as following: xt, ut are the world state and action applied time step t, ˆxt+1, ˆut+1 are the predicted state and actions, and Wfwd and Winv are parameters of the functions F and G that are used to construct the forward and inverse models. ˆxt+1 = F(xt, ut; Wfwd) (1) ˆut = G(xt, xt+1; Winv) (2) Given an initial and goal state, inverse models provide a direct mapping to actions required for achieving the goal state in one step (if feasible). However, multiple possible actions can transform the world from one visual state to another. For example, an object can appear in a certain part of the visual field if the agent moves or if the agent uses its arms to move the object. This multi-modality in the action space makes the learning hard. On the other hand, given xt and ut, there exists a next state xt+1 that is unique up to dynamics noise. This suggests that forward models might be easier to learn. However, learning forward models in image space is hard because predicting the value of each pixel in the future frames is a non-trivial problem with no known good solution. However, in most scenarios we are not interested in predicting every pixel, but predicting the occurrence of a more abstract event such as object motion, change in object pose etc. The ability to learn an abstract task relevant feature space should make it easier to learn a forward dynamics model. One possible approach is to learn a dynamics model in the feature representation of a higher layer of a deep neural network trained to perform image classification (say on ImageNet) (Vondrick et al., 2016). However, this is not a general way of learning task relevant features and it is unclear whether features adept at object recognition are also optimal for object manipulation. The alternative of adapting higher layer features of a neural network while simultaneously optimizing for the prediction loss leads to a degenerate solution of all the features reducing to zero, since the prediction loss in this case is also zero. Our key observation is that this degenerate solution can be avoided by imposing the constraint that it should be possible to infer the the executed action (ut) from the feature representation of two images obtained before (xt) and after (xt+1) the action (ut) is applied (i.e. optimizing the inverse model). This formulation provides a general mechanism for using general purpose function approximators such as deep neural networks for simultaneously learning a task relevant feature space and forecasting the future outcome of actions in this learned space. A second challenge in using forward models is that inferring the optimal action inevitably leads to finding a solution to non-convex problems that are subject to local optima. The inverse model does not suffers from this drawback as it directly outputs the required action. These considerations suggest that inverse and forward models have complementary strengths and therefore it is worthwhile to investigate training a joint model of inverse and forward dynamics. 3 It+1 It xt ˆlt ˆθt ˆpt pt, θt, lt xt+1 ˆxt+1 (c) (a) (b) Figure 3: (a) The collection of objects in the training set poked by the robot. (b) Example pairs of before (It) and after images (It+1) after a single poke was made by the robot. (c) A Siamese convolutional neural network was trained to predict the poke location (pt), angle (θt) and length (lt) required to transform objects in the image at the tth time step (It) into their state in It+1. Images It and It+1 are transformed into their latent feature representations (xt, xt+1) by passing them through a series of convolutional layers. For building the inverse model, xt, xt+1 are concatenated and passed through fully connected layers to predict the discretized poke. For building the forward model, the action ut = {pt, θt, lt} and xt are passed through a series of fully connected layers to predict xt+1. 3.1 Model A deep neural network is used to simultaneously learn a model of forward and inverse dynamics (see Figure 3). A tuple of before image (It), after image (It+1) and the robot’s action (ut) constitute one training sample. Input images at consequent time steps (It, It+1) are transformed into their latent feature representations (xt, xt+1) by passing them through a series of five convolutional layers with the same architecture as the first five layers of AlexNet (Krizhevsky et al., 2012). For building the inverse model, xt, xt+1 are concatenated and passed through fully connected layers to conditionally predict the poke location (pt), angle (θt) and length (lt) separately. For modeling multimodal poke distributions, poke location, angle and length of poke are discretized into a 20 × 20 grid, 36 bins and 11 bins respectively. The 11th bin of the poke length is used to denote no poke. For building the forward model, the feature representation of the before image (xt) and the action (ut; real-valued vector without discretization) are passed into a sequence of fully connected layer that predicts the feature representation of the next image (xt+1). Training is performed to optimize the loss defined in equation 3 below. Ljoint = Linv(ut, ˆut, W) + λLfwd(xt+1, ˆxt+1, W) (3) Linv is a sum of three cross entropy losses between the actual and predicted poke location, angle and length. Lfwd is a L1 loss between the predicted (ˆxt+1) and the ground truth (xt+1) feature representation of the after image (It+1). W are the parameters of the neural network. We used λ = 0.1 in all our experiments. We call this the joint model and we compare its performance against the inverse only model that was trained by setting λ = 0 in equation 3. More details about model training are provided in the supplementary materials. 3.2 Evaluation Procedure One way to test the learnt model is to provide the robot with an initial and goal image and task it to apply pokes that would displace objects into the configuration shown in the goal image. If the robot succeeds at achieving the goal configuration when the visual statistics of the pair of initial and goal image is similar to before and after image in the training set, then this would not be a convincing demonstration of generalization. However, if the robot is able to displace objects into goal positions that are much farther apart as compared to position of objects before and after a single poke then it might suggest that our model has not simply overfit but has learnt something about the underlying physics of how objects move when poked. This suggestion would be further strengthened if the robot is also able to push objects with novel geometry and texture in presence of multiple distractor objects. If the objects in the initial and goal image are farther apart than the maximum distance that can be pushed by a single poke, then the model would be required to output a sequence of pokes. We use a 4 Action Predictor Current Image (It) Goal Image (Ig) Next Image (It+1) (a) Greedy Planner (b) Blob Model (c) Pose Error Evaluation Angle (θ) Figure 4: (a) Greedy planner is used to output a sequence of pokes to displace the objects from their configuration in initial to the goal image. (b) The blob model first detects the location of objects in the current and goal image. Based on object positions, location and angle of the poke is computed and then executed by the robot. The obtained next and goal image are used to compute the next poke and this process is repeated iteratively. (c) The error of the models in poking objects to their correct pose is measured as the angle between the major axis of the objects in the final and goal images. greedy planning method (see Figure 4(a)) to output a sequence of pokes. First, images depicting the initial and goal state are passed through the learnt model to predict the poke which is then executed by the robot. Then, the image depicting the current world state (i.e. the current image) and the goal image are fed again into the model to output a poke. This process is repeated iteratively unless the robot predicts a no-poke (see section 3.1) or a maximum number of 10 pokes is reached. Error Metrics: In all our experiments, the initial and goal images differ in the position of only a single object. The location and pose of the object in the final image after the robot stops and the goal image are compared for quantitative evaluation. The location error is the Euclidean distance between the object locations. In order to account for different object distances in the initial and goal state, we use relative instead of absolute location error. Pose error is defined as the angle (in degrees) between the major axis of the objects in the final and goal images (see Figure 4(c)). Please see supplementary materials for further details. 3.3 Blob Model We compared the performance of the learnt model against a baseline blob model. This model first estimates object locations in current and goal image using template based object detector. It then uses the vector difference between these to compute the location, angle and length of poke executed by the robot (see supplementary materials for details). In a manner similar to greedy planning with the learnt model, this process is repeated iteratively until the object gets closer to the desired location in the goal image by a pre-defined threshold or a maximum number of pokes is reached. 4 Results The robot was tasked to displace objects in an initial image into their configuration depicted in a goal image (see Figure 5). The three rows in the figure show the performance when the robot is asked to displace an object (Nutella bottle) present in the training set, an object (red cup) whose geometry is different from objects in the training set and when the task is to move an object around an obstacle. These examples are representative of the robot’s performance and more examples can be found on the project website. It can be seen that the robot is able to successfully poke objects present in the training set and objects with novel geometry and texture into desired goal locations that are significantly farther than pair of before and after images used in the training set. Row 2 in Figure 5 also shows that the robot’s performance in unaffected by the presence of distractor objects that occupy the same location in the current and goal images. These results indicate that the learnt model allows the robot to perform tasks that show generalization beyond the training set (i.e. poking object by small distances). Row 3 in Figure 5 depicts an example where the robots fails to push the object around an obstacle (yellow object). The robot acts greedily and ends up pushing the obstacle along with the object. One more side-effect of greedy planning is zig-zag instead of straight trajectories taken by the object between its initial and goal locations. Investigating alternatives to 5 Initial State Goal State Training set object Unseen object End of Sequence (EoS) Limitation (EoS) Figure 5: The robot is able to successfully displace objects in the training set (row 1; Nutella bottle) and objects with previously unseen geometry (row 2; red cup) into goal locations that are significantly farther than pair of before and after images used in the training set. The robot is unable to push objects around obstacles (row 3; limitation of greedy planning). greedy planning, such as using the learnt forward model for planning pokes is a very interesting direction for future research. What representation could the robot have learnt that allows it to generalize? One possibility is that the robot ignores the geometry of the object and only infers the location of the object in the initial and goal image and uses the difference vector between object locations to deduce what poke to execute. This strategy is invariant to absolute distance between the object locations and is therefore capable of explaining the observed generalization to large distances. While we cannot prove that the model has learnt to detect object location, nearest neighbor visualizations of the learnt feature space clearly suggest sensitivity to object location (see supplementary materials). This is interesting because the robot received no direct supervision to locate objects. Because different objects have different geometries, they need to be poked at different places to move them in the same manner. For example, a Nutella bottle can be reliably moved forward without rotating the bottle by poking it on the side along the direction toward its center of mass, whereas a hammer is reliably moved by poking it where the hammer head meets the handle. Pushing an object to a desired pose is harder and requires a more detailed understanding of object geometry in comparison to pushing the object to a desired location. In order to test whether the learnt model represents any information about object geometry, we compared its performance against the baseline blob model (see section 3.3 and figure 4(b)) that ignores object geometry. For this comparison, the robot was tasked to push objects to a nearby goal by making only a single poke (see supplementary materials for more details). Results in Figure 6(a) show that both the inverse and joint model outperform the blob model. This indicates that in addition to representing information about object location, the learn models also represent some information about object geometry. 4.1 Forward model regularizes the inverse model We tested the hypothesis whether the forward model regularizes the feature space learnt by the inverse model in a 2-D simulation environment where the agent interacted with a red rectangular object by poking it by small forces. The rectangle was allowed to freely translate and rotate (Figure 6(c)). Model training was performed using an architecture similar to the one described in section 3.1. Additional details about the experimental setup, network architecture and training procedure for the simulation experiments are provided in the supplementary materials. Figure 6(c) shows that when less training data (10K, 20K examples) is available the joint model outperforms the inverse model and reaches closer to the goal state in fewer steps (i.e. fewer actions). This shows that indeed the forward model regularizes the inverse model and helps generalize better. However, when the number of training examples is increased to 100K both models are at par. This is not surprising because training with more data often results in better generalization and thus the inverse model is no longer reliant on the forward model for the regularization. Evaluation on the real robot supports the findings from the simulation experiments. Figure 6(b) shows that in a test of generalization, when an object is required to be displaced by a long distance, the joint model outperforms the inverse model. Similar performance of joint and blob model at this task is not surprising because even if the pokes are somewhat inaccurate but generally in the direction 6 0 1 2 3 4 Number of Steps 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 Relative Location Error Inverse Model, #Train 10K Joint Model, #Train 10K Inverse Model, #Train 20K Joint Model, #Train 20K Inverse Model, #Train 100K Joint Model, #Train 100K Initial State Goal State (c) Simulation experiments 0.0 0.1 0.2 0.3 0.4 (a) Pose error for nearby goals Blob Model Inverse Model Joint Model 0 20 40 60 (b) Relative location error for far away goals Figure 6: (a) Inverse and Joint model are more accurate than the blob model at pushing objects towards the desired pose. (b) The joint model outperforms the inverse-only model when the robot is tasked to push objects by distances that are significantly larger than object distance in before and after images used in the training set (i.e. a test of generalization). (c) Simulation studies reveal that when less number of training examples (10K, 20K) are available the joint model outperforms the inverse model and the performance is comparable with larger amount of data (100K). This result indicates that the forward model regularizes the inverse model. from object’s current to goal location, the object might traverse a zig-zag path but it would eventually reach the goal. The joint model is however more accurate at displacing objects into their correct pose as compared to the blob model (Figure 6(a)). 5 Related Work Learning visual control policies using reinforcement learning for tasks such as playing Atari games (Mnih et al., 2015), controlling robots in simulation (Lillicrap et al., 2016) and in the real world (Levine et al., 2016a) is of growing interest. However, these methods are model free and learn goal specific policies, which makes it difficult to repurpose the learned policies for new tasks. In contrast, the aim of this work is to learn intuitive physical models of object interaction which we show allow the agent to generalize. Other works in visual control have relied on model free methods that operate on a a low-dimensional state representation of images obtained using autoencoders (Lange et al., 2012; Finn et al., 2016; Kietzmann & Riedmiller, 2009). It is unclear that features obtained by optimizing pixelwise reconstruction are necessarily well suited for model based control. Learning to grasp objects by trial and error from large amounts of interaction data has recently been explored (Pinto & Gupta, 2016; Levine et al., 2016b). These methods aim to acquire a policy for solving a single concrete task, while our work is concerned with learning a general predictive model that could be used to achieve a variety of goals at test time. When an object is grasped, it is possible to fully control the state of the grasped object. However, in non-prehensile manipulation (i.e. manipulation without grasping (LaValle, 2006)) such as poking, the object state is not directly controllable which makes manipulation by poking harder than grasping (Dogar & Srinivasa, 2012). Learning a model of poking was considered by (Pinto et al., 2016), but their goal was to learn visual representations and they did not consider using the learnt models to displace objects to goal locations. A good review of model based control can be found in (Mayne, 2014) and (Jordan & Rumelhart, 1992; Wolpert et al., 1995) provide interesting perspectives. A model based deep learning method for cutting vegetables was considered by (Lenz et al., 2015). However, as their system operated on the robotic state space instead of vision and is thus limited in its generality. Model based control from visual inputs was considered by (Fragkiadaki et al., 2016; Wahlström et al., 2015; Watter et al., 2015; Oh et al., 2015) in synthetic domains of manipulating two degree of freedom robotic arm, inverted pendulum, billiards and Atari games. In contrast, we tackle manipulation of complex, compressible real world objects. Instead of learning a model of physics, some recents works (Wu et al., 2015; Mottaghi et al., 2016; Lerer et al., 2016) have proposed to use Newtonian physics in combination with neural networks to forecast object dynamics. 7 In robotic manipulation, a number of prior methods have been proposed that use hand-designed visual features and known object poses or key locations to plan and execute pushes and other non-prehensile manipulations (Kopicki et al., 2011; Lau et al., 2011; Meriçli et al., 2015). Unlike these methods, the goal in our work is to learn an intuitive physics model for pushing only from raw images, thus allowing the robot to learn by exploring the environment on its own without human intervention. 6 Discussion and Future Work In this work we propose to learn “intuitive" model of physics using interaction data. An alternative is to represent the world in terms of a fixed set of physical parameters such as mass, friction coefficient, normal forces etc and use a physics simulator for computing object dynamics from this representation (Kolev & Todorov, 2015; Mottaghi et al., 2016; Wu et al., 2015; Hamrick et al., 2011). This approach is general because physics simulators inevitably use Newton’s laws that apply to a wide range of physical phenomenon ranging from orbital motion of planets to a swinging pendulum. Estimating parameters such as as mass, friction coefficient etc. from sensory data is subject to errors, and it is possible that one parameterization is easier to estimate or more robust to sensory noise than another. For example, the conclusion that objects with feather like appearance fall slower than objects with stone like appearance can be reached by either correlating visual texture to the speed of falling objects, or by computing the drag force after estimating the cross section area of the object. Depending on whether estimation of visual texture or cross section area is more robust, one parameterization will result in more accurate predictions than the other. Pre-defining a set of parameters for predicting object dynamics, which is required by “simulator-based" approach might therefore lead to suboptimal solutions that are less robust. For many practical object manipulation tasks of interest, such as re-arranging objects, cutting vegetables, folding clothes, and so forth, small errors in execution are acceptable. The key challenge is robust performance in the face of varying environmental conditions. This suggests that a more robust but a somewhat imprecise model may in fact be desirable over a less robust and a more precise model. While the arguments presented above suggest that intuitive physics models are likely to be more robust than simulator based models, quantifying the robustness of these models is an interesting direction for future work. Furthermore, it is non-trivial to use simulator based models for manipulating deformable objects such as clothes and ropes because simulation of deformable objects is hard and also also requires representing objects by heavily handcrafted features that are unlikely to generalize across objects. The intuitive physics approach does not make any object specific assumptions and can be easily extended to work with deformable objects. This approach is in the spirit of recent successful deep learning techniques in computer vision and speech processing that learn features directly from data, whereas the simulator based physics approach is more similar to using hand-designed features. Current methods for learning intuitive physics models, such as ours are data inefficient and it is possible that combining intuitive and simulator based approaches leads to better models than either approach by itself. In poking based interaction, the robot does not have full control of the object state which makes it harder to predict and plan for the outcome of an action. The models proposed in this work generalize and are able to push objects into their desired location. However, performance on setting objects in the desired pose is not satisfactory, possibly because of the robot only executing pokes in large, discrete time steps. An interesting area of future investigation is to use continuous time control with smaller pokes that are likely to be more predictable than the large pokes used in this work. Further, although our approach is evaluated on a specific robotic manipulation task, there are no task specific assumptions, and the techniques are applicable to other tasks. In future, it would be interesting to see how the proposed approach scales with more complex environments, diverse object collections, different manipulation skills and to other non-manipulation based tasks, such as navigation. Other directions for future investigation include the use of forward model for planning and developing better strategies for data collection than random interaction. Supplementary Materials: and videos can be found at http://ashvin.me/pokebot-website/. Acknowledgement: We thank Alyosha Efros for inspiration and fruitful discussions throughout this work. The title of this paper is partly influenced by the term “pokebot" that Alyosha has been using for several years. We thank Ruzena Bajcsy for access to Baxter robot and Shubham Tulsiani for helpful comments. This work was supported in part by ONR MURI N00014-14-1-0671, ONR YIP 8 and by ARL through the MAST program. We are grateful to NVIDIA corporation for donating K40 GPUs and providing access to the NVIDIA PSG cluster. References Dogar, Mehmet R and Srinivasa, Siddhartha S. A planning framework for non-prehensile manipulation under clutter and uncertainty. Autonomous Robots, 33(3):217–236, 2012. Finn, Chelsea, Tan, Xin Yu, Duan, Yan, Darrell, Trevor, Levine, Sergey, and Abbeel, Pieter. Deep spatial autoencoders for visuomotor learning. ICRA, 2016. Fragkiadaki, Katerina, Agrawal, Pulkit, Levine, Sergey, and Malik, Jitendra. Learning visual predictive models of physics for playing billiards. ICLR, 2016. Gopnik, Alison, Meltzoff, Andrew N, and Kuhl, Patricia K. The scientist in the crib: Minds, brains, and how children learn. 1999. Hamrick, Jessica, Battaglia, Peter, and Tenenbaum, Joshua B. Internal physics models guide probabilistic judgments about object dynamics. In Cognitive Science Society, pp. 1545–1550, 2011. Jordan, Michael I and Rumelhart, David E. Forward models: Supervised learning with a distal teacher. Cognitive science, 16, 1992. Kietzmann, Tim C and Riedmiller, Martin. The neuro slot car racer: Reinforcement learning in a real world setting. In ICMLA, 2009. Kolev, Svetoslav and Todorov, Emanuel. Physically consistent state estimation and system identification for contacts. In International Conference on Humanoid Robots, pp. 1036–1043. IEEE, 2015. Kopicki, Marek, Zurek, Sebastian, Stolkin, Rustam, Mörwald, Thomas, and Wyatt, Jeremy. Learning to predict how rigid objects behave under simple manipulation. In ICRA, pp. 5722–5729. IEEE, 2011. Krizhevsky, Alex, Sutskever, Ilya, and Hinton, Geoffrey E. Imagenet classification with deep convolutional neural networks. In NIPS, pp. 1097–1105, 2012. Lange, Stanislav, Riedmiller, Martin, and Voigtlander, Arne. Autonomous reinforcement learning on raw visual input data in a real world application. In IJCNN, pp. 1–8. IEEE, 2012. Lau, Manfred, Mitani, Jun, and Igarashi, Takeo. Automatic learning of pushing strategy for delivery of irregular-shaped objects. In ICRA, pp. 3733–3738. IEEE, 2011. LaValle, Steven M. Planning algorithms. Cambridge university press, 2006. Lenz, Ian, Knepper, Ross, and Saxena, Ashutosh. Deepmpc: Learning deep latent features for model predictive control. In RSS, 2015. Lerer, Adam, Gross, Sam, and Fergus, Rob. Learning physical intuition of block towers by example. arXiv preprint arXiv:1603.01312, 2016. Levine, Sergey, Finn, Chelsea, Darrell, Trevor, and Abbeel, Pieter. End-to-end training of deep visuomotor policies. JMLR, 2016a. Levine, Sergey, Pastor, Peter, Krizhevsky, Alex, and Quillen, Deirdre. Learning hand-eye coordination for robotic grasping with deep learning and large-scale data collection. arXiv, 2016b. Lillicrap, Timothy P, Hunt, Jonathan J, Pritzel, Alexander, Heess, Nicolas, Erez, Tom, Tassa, Yuval, Silver, David, and Wierstra, Daan. Continuous control with deep reinforcement learning. ICLR, 2016. Mayne, David Q. Model predictive control: Recent developments and future promise. Automatica, 50(12):2967–2986, 2014. McCloskey, Michael. Intuitive physics. Scientific american, 248(4):122–130, 1983. Meriçli, Tekin, Veloso, Manuela, and Akın, H Levent. Push-manipulation of complex passive mobile objects using experimentally acquired motion models. Autonomous Robots, 38(3):317–329, 2015. Michotte, Albert. The perception of causality. 1963. Mnih, Volodymyr, Kavukcuoglu, Koray, Silver, David, Rusu, Andrei A, Veness, Joel, Bellemare, Marc G, Graves, Alex, Riedmiller, Martin, Fidjeland, Andreas K, Ostrovski, Georg, et al. Human-level control through deep reinforcement learning. Nature, 2015. Mottaghi, Roozbeh, Bagherinezhad, Hessam, Rastegari, Mohammad, and Farhadi, Ali. Newtonian image understanding: Unfolding the dynamics of objects in static images. CVPR, 2016. Oh, Junhyuk, Guo, Xiaoxiao, Lee, Honglak, Lewis, Richard, and Singh, Satinder. Action-conditional video prediction using deep networks in atari games. NIPS, 2015. Pinto, Lerrel and Gupta, Abhinav. Supersizing self-supervision: Learning to grasp from 50k tries and 700 robot hours. ICRA, 2016. Pinto, Lerrel, Gandhi, Dhiraj, Han, Yuanfeng, Park, Yong-Lae, and Gupta, Abhinav. The curious robot: Learning visual representations via physical interactions. In ECCV, pp. 3–18. Springer, 2016. Smith, Linda and Gasser, Michael. The development of embodied cognition: Six lessons from babies. Artificial life, 11(1-2):13–29, 2005. Vondrick, Carl, Pirsiavash, Hamed, and Torralba, Antonio. Anticipating the future by watching unlabeled video. CVPR, 2016. Wahlström, Niklas, Schön, Thomas B., and Deisenroth, Marc Peter. From pixels to torques: Policy learning with deep dynamical models. CoRR, abs/1502.02251, 2015. Watter, Manuel, Springenberg, Jost, Boedecker, Joschka, and Riedmiller, Martin. Embed to control: A locally linear latent dynamics model for control from raw images. In NIPS, pp. 2728–2736, 2015. Wolpert, Daniel M, Ghahramani, Zoubin, and Jordan, Michael I. An internal model for sensorimotor integration. Science-AAAS-Weekly Paper Edition, 269(5232):1880–1882, 1995. Wu, Jiajun, Yildirim, Ilker, Lim, Joseph J, Freeman, Bill, and Tenenbaum, Josh. Galileo: Perceiving physical object properties by integrating a physics engine with deep learning. In NIPS, pp. 127–135, 2015. 9 | 2016 | 439 |
6,371 | Supervised Word Mover’s Distance Gao Huang∗, Chuan Guo∗ Cornell University {gh349,cg563}@cornell.edu Matt J. Kusner† Alan Turing Institute, University of Warwick mkusner@turing.ac.uk Yu Sun, Kilian Q. Weinberger Cornell University {ys646,kqw4}@cornell.edu Fei Sha University of California, Los Angeles feisha@cs.ucla.edu Abstract Recently, a new document metric called the word mover’s distance (WMD) has been proposed with unprecedented results on kNN-based document classification. The WMD elevates high-quality word embeddings to a document metric by formulating the distance between two documents as an optimal transport problem between the embedded words. However, the document distances are entirely unsupervised and lack a mechanism to incorporate supervision when available. In this paper we propose an efficient technique to learn a supervised metric, which we call the Supervised-WMD (S-WMD) metric. The supervised training minimizes the stochastic leave-one-out nearest neighbor classification error on a perdocument level by updating an affine transformation of the underlying word embedding space and a word-imporance weight vector. As the gradient of the original WMD distance would result in an inefficient nested optimization problem, we provide an arbitrarily close approximation that results in a practical and efficient update rule. We evaluate S-WMD on eight real-world text classification tasks on which it consistently outperforms almost all of our 26 competitive baselines. 1 Introduction Document distances are a key component of many text retrieval tasks such as web-search ranking [24], book recommendation [16], and news categorization [25]. Because of the variety of potential applications, there has been a wealth of work towards developing accurate document distances [2, 4, 11, 27]. In large part, prior work focused on extracting meaningful document representations, starting with the classical bag of words (BOW) and term frequency-inverse document frequency (TF-IDF) representations [30]. These sparse, high-dimensional representations are frequently nearly orthogonal [17] and a pair of similar documents may therefore have nearly the same distance as a pair that are very different. It is possible to design more meaningful representations through eigendecomposing the BOW space with Latent Semantic Indexing (LSI) [11], or learning a probabilistic clustering of BOW vectors with Latent Dirichlet Allocation (LDA) [2]. Other work generalizes LDA [27] or uses denoising autoencoders [4] to learn a suitable document representation. Recently, Kusner et al. [19] proposed the Word Mover’s Distance (WMD), a new distance for text documents that leverages word embeddings [22]. Given these high-quality embeddings, the WMD defines the distances between two documents as the optimal transport cost of moving all words from one document to another within the word embedding space. This approach was shown to lead to state-of-the-art error rates in k-nearest neighbor (kNN) document classification. ∗Authors contributing equally †This work was done while the author was a student at Washington University in St. Louis 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Importantly, these prior works are entirely unsupervised and not learned explicitly for any particular task. For example, text documents could be classified by topic or by author, which would lead to very different measures of dissimilarity. Lately, there has been a vast amount of work on metric learning [10, 15, 36, 37], most of which focuses on learning a generalized linear Euclidean metric. These methods often scale quadratically with the input dimensionality, and can only be applied to high-dimensional text documents after dimensionality reduction techniques such as PCA [36]. In this paper we propose an algorithm for learning a metric to improve the Word Mover’s Distance. WMD stands out from prior work in that it computes distances between documents without ever learning a new document representation. Instead, it leverages low-dimensional word representations, for example word2vec, to compute distances. This allows us to transform the word embedding instead of the documents, and remain in a low-dimensional space throughout. At the same time we propose to learn word-specific ‘importance’ weights, to emphasize the usefulness of certain words for distinguishing the document class. At first glance, incorporating supervision into the WMD appears computationally prohibitive, as each individual WMD computation scales cubically with respect to the (sparse) dimensionality of the documents. However, we devise an efficient technique that exploits a relaxed version of the underlying optimal transport problem, called the Sinkhorn distance [6]. This, combined with a probabilistic filtering of the training set, reduces the computation time significantly. Our metric learning algorithm, Supervised Word Mover’s Distance (S-WMD), directly minimizes a stochastic version of the leave-one-out classification error under the WMD metric. Different from classic metric learning, we learn a linear transformation of the word representations while also learning re-weighted word frequencies. These transformations are learned to make the WMD distances match the semantic meaning of similarity encoded in the labels. We show across 8 datasets and 26 baseline methods the superiority of our method. 2 Background Here we describe the word embedding technique we use (word2vec) and the recently introduced Word Mover’s Distance. We then detail the setting of linear metric learning and the solution proposed by Neighborhood Components Analysis (NCA) [15], which inspires our method. word2vec may be the most popular technique for learning a word embedding over billions of words and was introduced by Mikolov et al. [22]. Each word in the training corpus is associated with an initial word vector, which is then optimized so that if two words w1 and w2 frequently occur together, they have high conditional probability p(w2|w1). This probability is the hierarchical softmax of the word vectors vw1 and vw2 [22], an easily-computed quantity which allows a simplified neural language model (the word2vec model) to be trained efficiently on desktop computers. Training an embedding over billions of words allows word2vec to capture surprisingly accurate word relationships [23]. Word embeddings can learn hundreds of millions of parameters and are typically by design unsupervised, allowing them to be trained on large unlabeled text corpora ahead of time. Throughout this paper we use word2vec, although many word embeddings could be used [5, 21? ]. Word Mover’s Distance. Leveraging the compelling word vector relationships of word embeddings, Kusner et al. [19] introduced the Word Mover’s Distance (WMD) as a distance between text documents. At a high level, the WMD is the minimum distance required to transport the words from one document to another. We assume that we are given a word embedding matrix X ∈Rd×n for a vocabulary of n words. Let xi ∈Rd be the representation of the ith word, as defined by this embedding. Additionally, let da, db be the n-dimensional normalized bag-of-words (BOW) vectors for two documents, where da i is the number of times word i occurs in da (normalized over all words in da). The WMD introduces an auxiliary ‘transport’ matrix T ∈Rn×n, such that Tij describes how much of da i should be transported to db j. Formally, the WMD learns T to minimize D(xi, xj) = min T≥0 n X i,j=1 Tij∥xi −xj∥p 2, subject to, n X j=1 Tij = da i , n X i=1 Tij = db j ∀i, j, (1) where p is usually set to 1 or 2. In this way, documents that share many words (or even related ones) should have smaller distances than documents with very dissimilar words. It was noted in Kusner et al. [19] that the WMD is a special case of the Earth Mover’s Distance (EMD) [29], also known more generally as the Wasserstein distance [20]. The authors also introduce the word centroid distance (WCD), which uses a fast approximation first described by Rubner et al. [29]: ∥Xd −Xd′∥2. 2 It can be shown that the WCD always lower bounds the WMD. Intuitively the WCD represents each document by the weighted average word vector, where the weights are the normalized BOW counts. The time complexity of solving the WMD optimization problem is O(q3 log q) [26], where q is the maximum number of unique words in either d or d′. The WCD scales asymptotically by O(dq). Regularized Transport Problem. To alleviate the cubic time complexity of the Wasserstein distance computation, Cuturi [6] formulated a smoothed version of the underlying transport problem by adding an entropy regularizer to the transport objective. This makes the objective function strictly convex, and efficient algorithms can be adopted to solve it. In particular, given a transport matrix T, let h(T) = −Pn i,j=1 Tij log(Tij) be the entropy of T. For any λ>0, the regularized (primal) transport problem is defined as min T≥0 n X i,j=1 Tij∥xi −xj∥p 2 −1 λh(T) subject to, n X j=1 Tij = da i , n X i=1 Tij = db j ∀i, j. (2) The larger λ is, the closer this relaxation is to the original Wasserstein distance. Cuturi [6] propose an efficient algorithm to solve for the optimal transport T∗ λ using a clever matrix-scaling algorithm. Specifically, we may define the matrix Kij = exp(−λ∥xi −xj∥2) and solve for the scaling vectors u, v to a fixed-point by computing u = da./(Kv), v = db./(K⊤u) in an alternating fashion. These yield the relaxed transport T∗ λ = diag(u)K diag(v). This algorithm can be shown to have empirical time complexity O(q2) [6], which is significantly faster than solving the WMD problem exactly. Linear Metric Learning. Assume that we have access to a training set {x1, . . . , xn} ⊂Rd, arranged as columns in matrix X ∈Rd×n, and corresponding labels {y1, . . . , yn} ⊆Yn, where Y contains some finite number of classes C = |Y|. Linear metric learning learns a matrix A ∈Rr×d, where r ≤d, and defines the generalized Euclidean distance between two documents xi and xj as dA(xi, xj) = ∥A(xi−xj)∥2. Popular linear metric learning algorithms are NCA [15], LMNN [36], and ITML [10] amongst others [37]. These methods learn a matrix A to minimize a loss function that is often an approximation of the leave-one-out (LOO) classification error of the kNN classifier. Neighborhood Components Analysis (NCA) was introduced by Goldberger et al. [15] to learn a generalized Euclidean metric. Here, the authors approximate the non-continuous leave-one-out kNN error by defining a stochastic neighborhood process. An input xi is assigned input xj as its nearest neighbor with probability pij = exp(−d2 A(xi, xj)) P k̸=i exp (−d2 A(xi, xk)), (3) where we define pii = 0. Under this stochastic neighborhood assignment, an input xi with label yi is classified correctly if its nearest neighbor is any xj ̸= xi from the same class (yj = yi). The probability of this event can be stated as pi = P j:yj=yi pij. NCA learns A by maximizing the expected LOO accuracy P i pi, or equivalently by minimizing −P i log(pi), the KL-divergence from a perfect classification distribution (pi = 1 for all xi). 3 Learning a Word Embedding Metric In this section we propose a method for learning a supervised document distance, by way of learning a generalized Euclidean metric within the word embedding space and a word importance vector. We will refer to the learned document distance as the Supervised Word Mover’s Distance (SWMD). To learn such a metric we assume we have a training dataset consisting of m documents {d1, . . . , dm} ⊂Σn, where Σn is the (n−1)-dimensional simplex (thus each document is represented as a normalized histogram over the words in the vocabulary, of size n). For each document we are given a label out of C possible classes, i.e. {y1, . . . , ym} ⊆{1, . . . , C}m. Additionally, we are given a word embedding matrix X ∈Rd×n (e.g., the word2vec embedding) which defines a d-dimensional word vector for each of the words in the vocabulary. Supervised WMD. As described in the previous section, it is possible to define a distance between any two documents da and db as the minimum cumulative word distance of moving da to db in word embedding space, as is done in the WMD. Given a labeled training set we would like to improve the distance so that documents that share the same labels are close, and those with different labels are far apart. We capture this notion of similarity in two ways: First we transform the word embedding, which captures a latent representation of words. We adapt this representation with a 3 linear transformation xi →Axi, where xi represents the embedding of the ith word. Second, as different classification tasks and data sets may value words differently, we also introduce a histogram importance vector w that re-weighs the word histogram values to reflect the importance of words for distinguishing the classes: ˜da = (w ◦da)/(w⊤da), (4) where “◦” denotes the element-wise Hadamard product. After applying the vector w and the linear mapping A, the WMD distance between documents da and db becomes DA,w(da, db) ≜min T≥0 n X i,j=1 Tij∥A(xi −xj)∥2 2 s.t. n X j=1 Tij = ˜da i and n X i=1 Tij = ˜db j ∀i, j. (5) Loss Function. Our goal is to learn the matrix A and vector w to make the distance DA,w reflect the semantic definition of similarity encoded in the labeled data. Similar to prior work on metric learning [10, 15, 36] we achieve this by minimizing the kNN-LOO error with the distance DA,w in the document space. As the LOO error is non-differentiable, we use the stochastic neighborhood relaxation proposed by Hinton & Roweis [18], which is also used for NCA. Similar to prior work we use the squared Euclidean word distance in Eq. (5). We use the KL-divergence loss proposed in NCA alongside the definition of neighborhood probability in (3) which yields, ℓ(A, w) = − m X a=1 log m X b:yb=ya exp(−DA,w(da, db)) P c̸=a exp (−DA,w(da, dc)) . (6) Gradient. We can compute the gradient of the loss ℓ(A, w) with respect to A and w as follows, ∂ ∂(A, w)ℓ(A, w) = m X a=1 X b̸=a pab pa (δab −pa) ∂ ∂(A, w)DA,w(da, db), (7) where δab =1 if and only if ya =yb, and δab =0 otherwise. 3.1 Fast computation of ∂DA,w(da, db)/∂(A, w) Notice that the remaining gradient term above ∂DA,w(da, db)/∂(A, w) contains the nested linear program defined in (5). In fact, computing this gradient just for a single pair of documents will require time complexity O(q3 log q), where q is the largest set of unique words in either document [8]. This quickly becomes prohibitively slow as the document size becomes large and the number of documents increase. Further, the gradient is not always guaranteed to exist [1, 7] (instead we must resort to subgradient descent). Motivated by the recent works on fast Wasserstein distance computation [6, 8, 12], we propose to relax the modified linear program in eq. (5) using the entropy as in eq. (2). As described in Section 2, this allows us to approximately solve eq. (5) in O(q2) time via T∗ λ =diag(u)K diag(v). We will use this approximate solution in the following gradients. Gradient w.r.t. A. It can be shown that, ∂ ∂ADA,w(da, db) = 2A n X i,j=1 Tab ij (xi −xj)(xi −xj)⊤, (8) where Tab is the optimizer of (5), so long as it is unique (otherwise it is a subgradient) [1]. We replace Tab by T∗ λ which is always unique as the relaxed transport is strongly convex [9]. Gradient w.r.t. w. To obtain the gradient with respect to w, we need the optimal solution to the dual transport problem: D∗ A,w(da, db) ≜max (α,β) α⊤˜da + β⊤˜db; s.t. αi + βj ≤∥A(xi −xj)∥2 2 ∀i, j. (9) Given that both ˜da and ˜db are functions of w, we have ∂ ∂wDA,w(da, db)= ∂D∗ A,w ∂˜da ∂˜da ∂w + ∂D∗ A,w ∂˜db ∂˜db ∂w = α∗◦da−(α∗⊤˜da)da w⊤da + β∗◦db−(β∗⊤˜db)db w⊤db . (10) 4 Instead of solving the dual directly, we obtain the relaxed optimal dual variables α∗ λ, β∗ λ via the vectors u, v that were used to derive our relaxed transport T∗ λ. Specifically, we can solve for the dual variables as such: α∗ λ = log(u) λ −log(u)⊤1 p 1 and β∗ λ = log(v) λ −log(v)⊤1 p 1, where 1 is the p-dimensional all ones vector. In general, we can observe from eq. (2) that the above approximation process becomes more accurate as λ grows. However, setting λ too large can make the algorithm converges slower. In our experiments, we use λ = 10, which leads to a nice trade-off between speed and approximation accuracy. 3.2 Optimization Algorithm 1 S-WMD 1: Input: word embedding: X, 2: dataset: {(d1, y1), . . . , (dm, ym)} 3: ca = Xda, ∀a∈{1, . . . , m} 4: A = NCA((c1, y1), . . . , (cm, ym)) 5: w = 1 6: while loop until convergence do 7: Randomly select B ⊆{1, . . . , m} 8: Compute gradients using eq. (11) 9: A ←A −ηAgA 10: w ←w −ηwgw 11: end while Alongside the fast gradient computation process introduced above, we can further speed up the training with a clever initialization and batch gradient descent. Initialization. The loss function in eq. (6) is nonconvex and is thus highly dependent on the initial setting of A and w. A good initialization also drastically reduces the number of gradient steps required. For w, we initialize all its entries to 1, i.e., all words are assigned with the same weights at the beginning. For A, we propose to learn an initial projection within the word centroid distance (WCD), defined as D′(da, db) = ∥Xda −Xdb∥2, described in Section 2. The WCD should be a reasonable approximation to the WMD. Kusner et al. [19] point out that the WCD is a lower bound on the WMD, which holds true after the transformation with A. We obtain our initialization by applying NCA in word embedding space using the WCD distance between documents. This is to say that we can construct the WCD dataset: {c1, . . . , cm} ⊂Rd, representing each text document as its word centroid, and apply NCA in the usual way as described in Section 2. We call this learned word distance Supervised Word Centroid Distance (S-WCD). Batch Gradient Descent. Once the initial matrix A is obtained, we minimize the loss ℓ(A, w) in (6) with batch gradient descent. At each iteration, instead of optimizing over the full training set, we randomly pick a batch of documents B from the training set, and compute the gradient for these documents. We can further speed up training by observing that the vast majority of NCA probabilities pab near zero. This is because most documents are far away from any given document. Thus, for a document da we can use the WCD to get a cheap neighbor ordering and only compute the NCA probabilities for the closest set of documents Na, based on the WCD. When we compute the gradient for each of the selected documents, we only use the document’s M nearest neighbor documents (defined by WCD distance) to compute the NCA neighborhood probabilities. In particular, the gradient is computed as follows, gA,w = X a∈B X b∈Na (pab/pa)(δab −pa) ∂ ∂(A, w)D(A,w)(da, db), (11) where again Na is the set of nearest neighbors of document a. With the gradient, we update A and w with learning rates ηA and ηw, respectively. Algorithm 1 summarizes S-WMD in pseudo code. Complexity. The empirical time complexity of solving the dual transport problem scales quadratically with p [26]. Therefore, the complexity of our algorithm is O(TBN[p2 + d2(p + r)]), where T denotes the number of batch gradient descent iterations, B = |B| the batch size, N = |Na| the size of the nearest neighbor set, and p the maximum number of unique words in a document. This is because computing T∗ ij, α∗and β∗using the alternating fixed point algorithm in Section 3.1 requires O(p2) time, while constructing the gradients from eqs. (8) and (10) takes O(d2(p + r)) time. The approximated gradient eq. (11) requires this computation to be repeated BN times. In our experiments, we set B = 32 and N = 200, and computing the gradient at each iteration can be done in seconds. 4 Results We evaluate S-WMD on 8 different document corpora and compare the kNN error with unsupervised WCD, WMD, and 6 document representations. In addition, all 6 document representation baselines 5 Table 1: The document datasets (and their descriptions) used for visualization and evaluation. BOW avg name description C n ne dim. words BBCSPORT BBC sports articles labeled by sport 5 517 220 13243 117 TWITTER tweets categorized by sentiment [31] 3 2176 932 6344 9.9 RECIPE recipe procedures labeled by origin 15 3059 1311 5708 48.5 OHSUMED medical abstracts (class subsampled) 10 3999 5153 31789 59.2 CLASSIC academic papers labeled by publisher 4 4965 2128 24277 38.6 REUTERS news dataset (train/test split [3]) 8 5485 2189 22425 37.1 AMAZON reviews labeled by product 4 5600 2400 42063 45.0 20NEWS canonical news article dataset [3] 20 11293 7528 29671 72 twitter recipe ohsumed classic amazon bbcsport reuters WMD S-WMD 20news Figure 1: t-SNE plots of WMD and S-WMD on all datasets. are used with and without 3 leading supervised metric learning algorithms—resulting in an overall total of 26 competitive baselines. Our code is implemented in Matlab and is freely available at https://github.com/gaohuang/S-WMD. Datasets and Baselines. We evaluate all approaches on 8 document datasets in the settings of news categorization, sentiment analysis, and product identification, among others. Table 1 describes the classification tasks as well as the size and number of classes C of each of the datasets. We evaluate against the following document representation/distance methods: 1. bag-of-words (BOW): a count of the number of word occurrences in a document, the length of the vector is the number of unique words in the corpus; 2. term frequency-inverse document frequency (TF-IDF): the BOW vector normalized by the document frequency of each word across the corpus; 3. Okapi BM25 [28]: a TF-IDF-like ranking function, first used in search engines; 4. Latent Semantic Indexing (LSI) [11]: projects the BOW vectors onto an orthogonal basis via singular value decomposition; 5. Latent Dirichlet Allocation (LDA) [2]: a generative probabilistic method that models documents as mixtures of word ‘topics’. We train LDA transductively (i.e., on the combined collection of training & testing words) and use the topic probabilities as the document representation ; 6. Marginalized Stacked Denoising Autoencoders (mSDA) [4]: a fast method for training stacked denoising autoencoders, which have state-of-the-art error rates on sentiment analysis tasks [14]. For datasets larger than RECIPE we use either a high-dimensional variant of mSDA or take 20% of the features that occur most often, whichever has better performance.; 7. Word Centroid Distance (WCD), described in Section 2; 8. Word Mover’s Distance (WMD), described in Section 2. For completeness, we also show results for the Supervised Word Centroid Distance (S-WCD) and the initialization of SWMD (S-WMD init.), described in Section 3. For methods that propose a document representation (as opposed to a distance), we use the Euclidean distance between these vector representations for visualization and kNN classification. For the supervised metric learning results we first reduce the dimensionality of each representation to 200 dimensions (if necessary) with PCA and then run either NCA, ITML, or LMNN on the projected data. We tune all free hyperparameters in all compared methods with Bayesian optimization (BO), using the implementation of Gardner et al. [13]3. kNN classification. We show the kNN test error of all document representation and distance methods in Table 2. For datasets that do not have a predefined train/test split: BBCSPORT, TWITTER, RECIPE, CLASSIC, and AMAZON we average results over five 70/30 train/test splits and report standard errors. For each dataset we highlight the best results in bold (and those whose standard error 3http://tinyurl.com/bayesopt 6 Table 2: The kNN test error for all datasets and distances. DATASET BBCSPORT TWITTER RECIPE OHSUMED CLASSIC REUTERS AMAZON 20NEWS AVERAGE-RANK UNSUPERVISED BOW 20.6 ± 1.2 43.6 ± 0.4 59.3 ± 1.0 61.1 36.0 ± 0.5 13.9 28.5 ± 0.5 57.8 26.1 TF-IDF 21.5 ± 2.8 33.2 ± 0.9 53.4 ± 1.0 62.7 35.0 ± 1.8 29.1 41.5 ± 1.2 54.4 25.0 OKAPI BM25 [28] 16.9 ± 1.5 42.7 ± 7.8 53.4 ± 1.9 66.2 40.6 ± 2.7 32.8 58.8 ± 2.6 55.9 26.1 LSI [11] 4.3 ± 0.6 31.7 ± 0.7 45.4 ± 0.5 44.2 6.7 ± 0.4 6.3 9.3 ± 0.4 28.9 12.0 LDA [2] 6.4 ± 0.7 33.8 ± 0.3 51.3 ± 0.6 51.0 5.0 ± 0.3 6.9 11.8 ± 0.6 31.5 16.6 MSDA [4] 8.4 ± 0.8 32.3 ± 0.7 48.0 ± 1.4 49.3 6.9 ± 0.4 8.1 17.1 ± 0.4 39.5 18.0 ITML [10] BOW 7.4 ± 1.4 32.0 ± 0.4 63.1 ± 0.9 70.1 7.5 ± 0.5 7.3 20.5 ± 2.1 60.6 23.0 TF-IDF 1.8 ± 0.2 31.1 ± 0.3 51.0 ± 1.4 55.1 9.9 ± 1.0 6.6 11.1 ± 1.9 45.3 14.8 OKAPI BM25 [28] 3.7 ± 0.5 31.9 ± 0.3 53.8 ± 1.8 77.0 18.3 ± 4.5 20.7 11.4 ± 2.9 81.5 21.5 LSI [11] 5.0 ± 0.7 32.3 ± 0.4 55.7 ± 0.8 54.7 5.5 ± 0.7 6.9 10.6 ± 2.2 39.6 17.6 LDA [2] 6.5 ± 0.7 33.9 ± 0.9 59.3 ± 0.8 59.6 6.6 ± 0.5 9.2 15.7 ± 2.0 87.8 22.5 MSDA [4] 25.5 ± 9.4 43.7 ± 7.4 54.5 ± 1.3 61.8 14.9 ± 2.2 5.9 37.4 ± 4.0 47.7 23.9 LMNN [36] BOW 2.4 ± 0.4 31.8 ± 0.3 48.4 ± 0.4 49.1 4.7 ± 0.3 3.9 10.7 ± 0.3 40.7 11.5 TF-IDF 4.0 ± 0.6 30.8 ± 0.3 43.7 ± 0.3 40.0 4.9 ± 0.3 5.8 6.8 ± 0.3 28.1 7.8 OKAPI BM25 [28] 1.9 ± 0.7 30.5 ± 0.4 41.7 ± 0.7 59.4 19.0 ± 9.3 9.2 6.9 ± 0.2 57.4 14.4 LSI [11] 2.4 ± 0.5 31.6 ± 0.2 44.8 ± 0.4 40.8 3.0 ± 0.1 3.2 6.6 ± 0.2 25.1 5.1 LDA [2] 4.5 ± 0.4 31.9 ± 0.6 51.4 ± 0.4 49.9 4.9 ± 0.4 5.6 12.1 ± 0.6 32.0 14.6 MSDA [4] 22.7 ± 10.0 50.3 ± 8.6 46.3 ± 1.2 41.6 11.1 ± 1.9 5.3 24.0 ± 3.6 27.1 17.3 NCA [15] BOW 9.6 ± 0.6 31.1 ± 0.5 55.2 ± 0.6 57.4 4.0 ± 0.1 6.2 16.8 ± 0.3 46.4 17.5 TF-IDF 0.6 ± 0.3 30.6 ± 0.5 41.4 ± 0.4 35.8 5.5 ± 0.2 3.8 6.5 ± 0.2 29.3 5.4 OKAPI BM25 [28] 4.5 ± 0.5 31.8 ± 0.4 45.8 ± 0.5 56.6 20.6 ± 4.8 10.5 8.5 ± 0.4 55.9 17.9 LSI [11] 2.4 ± 0.7 31.1 ± 0.8 41.6 ± 0.5 37.5 3.1 ± 0.2 3.3 7.7 ± 0.4 30.7 6.3 LDA [2] 7.1 ± 0.9 32.7 ± 0.3 50.9 ± 0.4 50.7 5.0 ± 0.2 7.9 11.6 ± 0.8 30.9 16.5 MSDA [4] 21.8 ± 7.4 37.9 ± 2.8 48.0 ± 1.6 40.4 11.2 ± 1.8 5.2 23.6 ± 3.1 26.8 16.1 DISTANCES IN THE WORD MOVER’S FAMILY WCD [19] 11.3 ± 1.1 30.7 ± 0.9 49.4 ± 0.3 48.9 6.6 ± 0.2 4.7 9.2 ± 0.2 36.2 13.5 WMD [19] 4.6 ± 0.7 28.7 ± 0.6 42.6 ± 0.3 44.5 2.8 ± 0.1 3.5 7.4 ± 0.3 26.8 6.1 S-WCD 4.6 ± 0.5 30.4 ± 0.5 51.3 ± 0.2 43.3 5.8 ± 0.2 3.9 7.6 ± 0.3 33.6 11.4 S-WMD INIT. 2.8 ± 0.3 28.2 ± 0.4 39.8 ± 0.4 38.0 3.3 ± 0.3 3.5 5.8 ± 0.2 28.4 4.3 S-WMD 2.1 ± 0.5 27.5 ± 0.5 39.2 ± 0.3 34.3 3.2 ± 0.2 3.2 5.8 ± 0.1 26.8 2.4 overlaps the mean of the best result). On the right we also show the average rank across datasets, relative to unsupervised BOW (bold indicates the best method). We highlight the unsupervised WMD in blue (WMD) and our new result in red (S-WMD). Despite the very large number of competitive baselines, S-WMD achieves the lowest kNN test error on 5/8 datasets, with the exception of BBCSPORT, CLASSIC and AMAZON. On these datasets it achieves the 4th lowest on BBCSPORT and CLASSIC, and tied at 2nd on 20NEWS. On average across all datasets it outperforms all other 26 methods. Another observation is that S-WMD right after initialization (S-WMD init.) performs quite well. However, as training S-WMD is efficient (shown in Table 3), it is often well worth the training time. windows sale bike mac apple gun space car DOD graphics hockey guns baseball bikes driver encryption clipper story card pro computer firearms atheism alt motorcycles motorcycle drivers Israeli Rutgers Israel motif sell RISC automotive animation Armenian shipping circuit Islamic monitor rider lists offer biker ride copy moon auto key bus NHL electronics homosexuals motherboard government controller compatible summarized powerbook happening dolphins security biblical diamond Turkish polygon playoff western virtual forsale warning crypto tapped rocket doctor flight riding Mazda label orbit asked autos image saint Boone Keith fired mouse chip SCSI cute TIFF talk hell NASA IDE sun fit DOS gay 1/1 Figure 2: The Top-100 words upweighted by S-WMD on 20NEWS. For unsupervised baselines, on datasets BBCSPORT and OHSUMED, where the previous state-of-the-art WMD was beaten by LSI, S-WMD reduces the error of LSI relatively by 51% and 22%, respectively. In general, supervision seems to help all methods on average. One reason why NCA with a TF-IDF document representation may be performing better than S-WMD could be because of the long document lengths in BBCSPORT and OHSUMED. Having denser BOW vectors may improve the inverse document frequency weights, which in turn may be a good initialization for NCA to further fine-tune. On datasets with smaller documents such as TWITTER, CLASSIC, and REUTERS, S-WMD outperforms NCA with TF-IDF relatively by 10%, 42%, and 15%, respectively. On CLASSIC WMD outperforms S-WMD possibly because of a poor initialization and that S-WMD uses the squared Euclidean distance between word vectors, which may be suboptimal for this dataset. This however, does not occur for any other dataset. Visualization. Figure 1 shows a 2D embedding of the test split of each dataset by WMD and S-WMD using t-Stochastic Neighbor Embedding (t-SNE) [33]. The quality of a distance can be visualized by how clustered points in the same class are. Using this metric, S-WMD noticeably improves upon WMD on almost all the 8 datasets. Figure 2 visualizes the top 100 words with 7 largest weights learned by S-WMD on the 20NEWS dataset. The size of each word is proportional its learned weight. We can observe that these upweighted words are indeed most representative for the true classes of this dataset. More detailed results and analysis can be found in the supplementary. Table 3: Distance computation times. FULL TRAINING TIMES DATASET METRICS S-WCD/S-WMD INIT. S-WMD BBCSPORT 1M 25S 4M 56S TWITTER 28M 59S 7M 53S RECIPE 23M 21S 23M 58S OHSUMED 46M 18S 29M 12S CLASSIC 1H 18M 36M 22S REUTERS 2H 7M 34M 56S AMAZON 2H 15M 20M 10S 20NEWS 14M 42S 1H 55M Training time. Table 3 shows the training times for S-WMD. Note that the time to learn the initial metric A is not included in time shown in the second column. Relative to the initialization, S-WMD is surprisingly fast. This is due to the fast gradient approximation and the batch gradient descent introduced in Section 3.1 and 3.2. We note that these times are comparable or even faster than the time it takes to train a linear metric on the baseline methods after PCA. 5 Related Work Metric learning is a vast field that includes both supervised and unsupervised techniques (see Yang & Jin [37] for a large survey). Alongside NCA [15], described in Section 2, there are a number of popular methods for generalized Euclidean metric learning. Large Margin Nearest Neighbors (LMNN) [36] learns a metric that encourages inputs with similar labels to be close in a local region, while encouraging inputs with different labels to be farther by a large margin. Information-Theoretic Metric Learning (ITML) [10] learns a metric by minimizing a KL-divergence subject to generalized Euclidean distance constraints. Cuturi & Avis [7] was the first to consider learning the ground distance in the Earth Mover’s Distance (EMD). In a similar work, Wang & Guibas [34] learns a ground distance that is not a metric, with good performance in certain vision tasks. Most similar to our work Wang et al. [35] learn a metric within a generalized Euclidean EMD ground distance using the framework of ITML for image classification. They do not, however, consider re-weighting the histograms, which allows our method extra flexibility. Until recently, there has been relatively little work towards learning supervised word embeddings, as state-of-the-art results rely on making use of large unlabeled text corpora. Tang et al. [32] propose a neural language model that uses label information from emoticons to learn sentiment-specific word embeddings. 6 Conclusion We proposed a powerful method to learn a supervised word mover’s distance, and demonstrated that it may well be the best performing distance metric for documents to date. Similar to WMD, our S-WMD benefits from the large unsupervised corpus, which was used to learn the word2vec embedding [22, 23]. The word embedding gives rise to a very good document distance, which is particularly forgiving when two documents use syntactically different but conceptually similar words. Two words may be similar in one sense but dissimilar in another, depending on the articles in which they are contained. It is these differences that S-WMD manages to capture through supervised training. By learning a linear metric and histogram re-weighting through the optimal transport of the word mover’s distance, we are able to produce state-of-the-art classification results efficiently. Acknowledgments The authors are supported in part by the, III-1618134, III-1526012, IIS-1149882 grants from the National Science Foundation and the Bill and Melinda Gates Foundation. We also thank Dor Kedem for many insightful discussions. References [1] Bertsimas, D. and Tsitsiklis, J. N. Introduction to linear optimization. Athena Scientific, 1997. [2] Blei, D. M., Ng, A. Y., and Jordan, M. I. Latent dirichlet allocation. JMLR, 2003. [3] Cardoso-Cachopo, A. Improving Methods for Single-label Text Categorization. PdD Thesis, Instituto Superior Tecnico, Universidade Tecnica de Lisboa, 2007. [4] Chen, M., Xu, Z., Weinberger, K. Q., and Sha, F. Marginalized denoising autoencoders for domain adaptation. In ICML, 2012. [5] Collobert, R. and Weston, J. A unified architecture for natural language processing: Deep neural networks with multitask learning. In ICML, pp. 160–167. ACM, 2008. 8 [6] Cuturi, M. Sinkhorn distances: Lightspeed computation of optimal transport. In Advances in Neural Information Processing Systems, pp. 2292–2300, 2013. [7] Cuturi, M. and Avis, D. Ground metric learning. JMLR, 2014. [8] Cuturi, M. and Doucet, A. Fast computation of wasserstein barycenters. In Jebara, Tony and Xing, Eric P. (eds.), ICML, pp. 685–693. JMLR Workshop and Conference Proceedings, 2014. [9] Cuturi, M. and Peyre, G. A smoothed dual approach for variational wasserstein problems. SIAM Journal on Imaging Sciences, 9(1):320–343, 2016. [10] Davis, J.V., Kulis, B., Jain, P., Sra, S., and Dhillon, I.S. Information-theoretic metric learning. In ICML, pp. 209–216, 2007. [11] Deerwester, S. C., Dumais, S. T., Landauer, T. K., Furnas, G. W., and Harshman, R. A. Indexing by latent semantic analysis. Journal of the American Society of Information Science, 41(6):391–407, 1990. [12] Frogner, C., Zhang, C., Mobahi, H., Araya, M., and Poggio, T.A. Learning with a wasserstein loss. In Advances in Neural Information Processing Systems, pp. 2044–2052, 2015. [13] Gardner, J., Kusner, M. J., Xu, E., Weinberger, K. Q., and Cunningham, J. Bayesian optimization with inequality constraints. In ICML, pp. 937–945, 2014. [14] Glorot, X., Bordes, A., and Bengio, Y. Domain adaptation for large-scale sentiment classification: A deep learning approach. In ICML, pp. 513–520, 2011. [15] Goldberger, J., Hinton, G.E., Roweis, S.T., and Salakhutdinov, R. Neighbourhood components analysis. In NIPS, pp. 513–520. 2005. [16] Gopalan, P. K., Charlin, L., and Blei, D. Content-based recommendations with poisson factorization. In NIPS, pp. 3176–3184, 2014. [17] Greene, D. and Cunningham, P. Practical solutions to the problem of diagonal dominance in kernel document clustering. In ICML, pp. 377–384. ACM, 2006. [18] Hinton, G.E. and Roweis, S.T. Stochastic neighbor embedding. In NIPS, pp. 833–840. MIT Press, 2002. [19] Kusner, M. J., Sun, Y., Kolkin, N. I., and Weinberger, K. Q. From word embeddings to document distances. In ICML, 2015. [20] Levina, E. and Bickel, P. The earth mover’s distance is the mallows distance: Some insights from statistics. In ICCV, volume 2, pp. 251–256. IEEE, 2001. [21] Levy, O. and Goldberg, Y. Neural word embedding as implicit matrix factorization. In NIPS, 2014. [22] Mikolov, T., Chen, K., Corrado, G., and Dean, J. Efficient estimation of word representations in vector space. In Workshop at ICLR, 2013. [23] Mikolov, T., Sutskever, I., Chen, K., Corrado, G. S., and Dean, J. Distributed representations of words and phrases and their compositionality. In NIPS, pp. 3111–3119, 2013. [24] Mohan, A., Chen, Z., and Weinberger, K. Q. Web-search ranking with initialized gradient boosted regression trees. JMLR, 14:77–89, 2011. [25] Ontrup, J. and Ritter, H. Hyperbolic self-organizing maps for semantic navigation. In NIPS, 2001. [26] Pele, O. and Werman, M. Fast and robust earth mover’s distances. In ICCV, pp. 460–467. IEEE, 2009. [27] Perina, A., Jojic, N., Bicego, M., and Truski, A. Documents as multiple overlapping windows into grids of counts. In NIPS, pp. 10–18. 2013. [28] Robertson, S. E., Walker, S., Jones, S., Hancock-Beaulieu, M. M., Gatford, M., et al. Okapi at trec-3. NIST SPECIAL PUBLICATION SP, pp. 109–109, 1995. [29] Rubner, Y., Tomasi, C., and Guibas, L. J. A metric for distributions with applications to image databases. In ICCV, pp. 59–66. IEEE, 1998. [30] Salton, G. and Buckley, C. Term-weighting approaches in automatic text retrieval. Information processing & management, 24(5):513–523, 1988. [31] Sanders, N. J. Sanders-twitter sentiment corpus, 2011. [32] Tang, D., Wei, F., Yang, N., Zhou, M., Liu, T., and Qin, B. Learning sentiment-specific word embedding for twitter sentiment classification. In ACL, pp. 1555–1565, 2014. [33] Van der Maaten, L. and Hinton, G. Visualizing data using t-sne. JMLR, 9(2579-2605):85, 2008. [34] Wang, F. and Guibas, L. J. Supervised earth movers distance learning and its computer vision applications. In ECCV. 2012. [35] Wang, X-L., Liu, Y., and Zha, H. Learning robust cross-bin similarities for the bag-of-features model. Technical report, Peking University, China, 2009. [36] Weinberger, K.Q. and Saul, L.K. Distance metric learning for large margin nearest neighbor classification. JMLR, 10:207–244, 2009. [37] Yang, L. and Jin, R. Distance metric learning: A comprehensive survey. 2, 2006. 9 | 2016 | 44 |
6,372 | Value Iteration Networks Aviv Tamar, Yi Wu, Garrett Thomas, Sergey Levine, and Pieter Abbeel Dept. of Electrical Engineering and Computer Sciences, UC Berkeley Abstract We introduce the value iteration network (VIN): a fully differentiable neural network with a ‘planning module’ embedded within. VINs can learn to plan, and are suitable for predicting outcomes that involve planning-based reasoning, such as policies for reinforcement learning. Key to our approach is a novel differentiable approximation of the value-iteration algorithm, which can be represented as a convolutional neural network, and trained end-to-end using standard backpropagation. We evaluate VIN based policies on discrete and continuous path-planning domains, and on a natural-language based search task. We show that by learning an explicit planning computation, VIN policies generalize better to new, unseen domains. 1 Introduction Over the last decade, deep convolutional neural networks (CNNs) have revolutionized supervised learning for tasks such as object recognition, action recognition, and semantic segmentation [3, 15, 6, 19]. Recently, CNNs have been applied to reinforcement learning (RL) tasks with visual observations such as Atari games [21], robotic manipulation [18], and imitation learning (IL) [9]. In these tasks, a neural network (NN) is trained to represent a policy – a mapping from an observation of the system’s state to an action, with the goal of representing a control strategy that has good long-term behavior, typically quantified as the minimization of a sequence of time-dependent costs. The sequential nature of decision making in RL is inherently different than the one-step decisions in supervised learning, and in general requires some form of planning [2]. However, most recent deep RL works [21, 18, 9] employed NN architectures that are very similar to the standard networks used in supervised learning tasks, which typically consist of CNNs for feature extraction, and fully connected layers that map the features to a probability distribution over actions. Such networks are inherently reactive, and in particular, lack explicit planning computation. The success of reactive policies in sequential problems is due to the learning algorithm, which essentially trains a reactive policy to select actions that have good long-term consequences in its training domain. To understand why planning can nevertheless be an important ingredient in a policy, consider the grid-world navigation task depicted in Figure 1 (left), in which the agent can observe a map of its domain, and is required to navigate between some obstacles to a target position. One hopes that after training a policy to solve several instances of this problem with different obstacle configurations, the policy would generalize to solve a different, unseen domain, as in Figure 1 (right). However, as we show in our experiments, while standard CNN-based networks can be easily trained to solve a set of such maps, they do not generalize well to new tasks outside this set, because they do not understand the goal-directed nature of the behavior. This observation suggests that the computation learned by reactive policies is different from planning, which is required to solve a new task1. 1In principle, with enough training data that covers all possible task configurations, and a rich enough policy representation, a reactive policy can learn to map each task to its optimal policy. In practice, this is often too expensive, and we offer a more data-efficient approach by exploiting a flexible prior about the planning computation underlying the behavior. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Figure 1: Two instances of a grid-world domain. Task is to move to the goal between the obstacles. In this work, we propose a NN-based policy that can effectively learn to plan. Our model, termed a value-iteration network (VIN), has a differentiable ‘planning program’ embedded within the NN structure. The key to our approach is an observation that the classic value-iteration (VI) planning algorithm [1, 2] may be represented by a specific type of CNN. By embedding such a VI network module inside a standard feed-forward classification network, we obtain a NN model that can learn the parameters of a planning computation that yields useful predictions. The VI block is differentiable, and the whole network can be trained using standard backpropagation. This makes our policy simple to train using standard RL and IL algorithms, and straightforward to integrate with NNs for perception and control. Connections between planning algorithms and recurrent NNs were previously explored by Ilin et al. [12]. Our work builds on related ideas, but results in a more broadly applicable policy representation. Our approach is different from model-based RL [25, 4], which requires system identification to map the observations to a dynamics model, which is then solved for a policy. In many applications, including robotic manipulation and locomotion, accurate system identification is difficult, and modelling errors can severely degrade the policy performance. In such domains, a model-free approach is often preferred [18]. Since a VIN is just a NN policy, it can be trained model free, without requiring explicit system identification. In addition, the effects of modelling errors in VINs can be mitigated by training the network end-to-end, similarly to the methods in [13, 11]. We demonstrate the effectiveness of VINs within standard RL and IL algorithms in various problems, among which require visual perception, continuous control, and also natural language based decision making in the WebNav challenge [23]. After training, the policy learns to map an observation to a planning computation relevant for the task, and generate action predictions based on the resulting plan. As we demonstrate, this leads to policies that generalize better to new, unseen, task instances. 2 Background In this section we provide background on planning, value iteration, CNNs, and policy representations for RL and IL. In the sequel, we shall show that CNNs can implement a particular form of planning computation similar to the value iteration algorithm, which can then be used as a policy for RL or IL. Value Iteration: A standard model for sequential decision making and planning is the Markov decision process (MDP) [1, 2]. An MDP M consists of states s ∈S, actions a ∈A, a reward function R(s, a), and a transition kernel P(s′|s, a) that encodes the probability of the next state given the current state and action. A policy π(a|s) prescribes an action distribution for each state. The goal in an MDP is to find a policy that obtains high rewards in the long term. Formally, the value V π(s) of a state under policy π is the expected discounted sum of rewards when starting from that state and executing policy π, V π(s) .= Eπ [P∞ t=0 γtr(st, at)| s0 = s], where γ ∈(0, 1) is a discount factor, and Eπ denotes an expectation over trajectories of states and actions (s0, a0, s1, a1 . . . ), in which actions are selected according to π, and states evolve according to the transition kernel P(s′|s, a). The optimal value function V ∗(s) .= maxπ V π(s) is the maximal long-term return possible from a state. A policy π∗is said to be optimal if V π∗(s) = V ∗(s) ∀s. A popular algorithm for calculating V ∗and π∗is value iteration (VI): Vn+1(s) = maxa Qn(s, a) ∀s, where Qn(s, a) = R(s, a) + γ P s′ P(s′|s, a)Vn(s′). (1) It is well known that the value function Vn in VI converges as n →∞to V ∗, from which an optimal policy may be derived as π∗(s) = arg maxa Q∞(s, a). Convolutional Neural Networks (CNNs) are NNs with a particular architecture that has proved useful for computer vision, among other domains [8, 16, 3, 15]. A CNN is comprised of stacked convolution and max-pooling layers. The input to each convolution layer is a 3dimensional signal X, typically, an image with l channels, m horizontal pixels, and n vertical pixels, and its output h is a l′-channel convolution of the image with kernels W 1, . . . , W l′, hl′,i′,j′ = σ P l,i,j W l′ l,i,jXl,i′−i,j′−j , where σ is some scalar activation function. A max-pooling layer selects, for each channel l and pixel i, j in h, the maximum value among its neighbors N(i, j), hmaxpool l,i,j = maxi′,j′∈N(i,j) hl,i′,j′. Typically, the neighbors N(i, j) are chosen as a k × k image 2 patch around pixel i, j. After max-pooling, the image is down-sampled by a constant factor d, commonly 2 or 4, resulting in an output signal with l′ channels, m/d horizontal pixels, and n/d vertical pixels. CNNs are typically trained using stochastic gradient descent (SGD), with backpropagation for computing gradients. Reinforcement Learning and Imitation Learning: In MDPs where the state space is very large or continuous, or when the MDP transitions or rewards are not known in advance, planning algorithms cannot be applied. In these cases, a policy can be learned from either expert supervision – IL, or by trial and error – RL. While the learning algorithms in both cases are different, the policy representations – which are the focus of this work – are similar. Additionally, most state-of-the-art algorithms such as [24, 21, 26, 18] are agnostic to the policy representation, and only require it to be differentiable, for performing gradient descent on some algorithm-specific loss function. Therefore, in this paper we do not commit to a specific learning algorithm, and only consider the policy. Let φ(s) denote an observation for state s. The policy is specified as a parametrized function πθ(a|φ(s)) mapping observations to a probability over actions, where θ are the policy parameters. For example, the policy could be represented as a neural network, with θ denoting the network weights. The goal is to tune the parameters such that the policy behaves well in the sense that πθ(a|φ(s)) ≈π∗(a|φ(s)), where π∗is the optimal policy for the MDP, as defined in Section 2. In IL, a dataset of N state observations and corresponding optimal actions φ(si), ai ∼π∗(φ(si)) i=1,...,N is generated by an expert. Learning a policy then becomes an instance of supervised learning [24, 9]. In RL, the optimal action is not available, but instead, the agent can act in the world and observe the rewards and state transitions its actions effect. RL algorithms such as in [27, 21, 26, 18] use these observations to improve the value of the policy. 3 The Value Iteration Network Model In this section we introduce a general policy representation that embeds an explicit planning module. As stated earlier, the motivation for such a representation is that a natural solution to many tasks, such as the path planning described above, involves planning on some model of the domain. Let M denote the MDP of the domain for which we design our policy π. We assume that there is some unknown MDP ¯ M such that the optimal plan in ¯ M contains useful information about the optimal policy in the original task M. However, we emphasize that we do not assume to know ¯ M in advance. Our idea is to equip the policy with the ability to learn and solve ¯ M, and to add the solution of ¯ M as an element in the policy π. We hypothesize that this will lead to a policy that automatically learns a useful ¯ M to plan on. We denote by ¯s ∈¯S, ¯a ∈¯A, ¯R(¯s, ¯a), and ¯P(¯s′|¯s, ¯a) the states, actions, rewards, and transitions in ¯ M. To facilitate a connection between M and ¯ M, we let ¯R and ¯P depend on the observation in M, namely, ¯R = fR(φ(s)) and ¯P = fP (φ(s)), and we will later learn the functions fR and fP as a part of the policy learning process. For example, in the grid-world domain described above, we can let ¯ M have the same state and action spaces as the true grid-world M. The reward function fR can map an image of the domain to a high reward at the goal, and negative reward near an obstacle, while fP can encode deterministic movements in the grid-world that do not depend on the observation. While these rewards and transitions are not necessarily the true rewards and transitions in the task, an optimal plan in ¯ M will still follow a trajectory that avoids obstacles and reaches the goal, similarly to the optimal plan in M. Once an MDP ¯ M has been specified, any standard planning algorithm can be used to obtain the value function ¯V ∗. In the next section, we shall show that using a particular implementation of VI for planning has the advantage of being differentiable, and simple to implement within a NN framework. In this section however, we focus on how to use the planning result ¯V ∗within the NN policy π. Our approach is based on two important observations. The first is that the vector of values ¯V ∗(s) ∀s encodes all the information about the optimal plan in ¯ M. Thus, adding the vector ¯V ∗as additional features to the policy π is sufficient for extracting information about the optimal plan in ¯ M. However, an additional property of ¯V ∗is that the optimal decision ¯π∗(¯s) at a state ¯s can depend only on a subset of the values of ¯V ∗, since ¯π∗(¯s) = arg max¯a ¯R(¯s, ¯a) + γ P ¯s′ ¯P(¯s′|¯s, ¯a) ¯V ∗(¯s′). Therefore, if the MDP has a local connectivity structure, such as in the grid-world example above, the states for which ¯P(¯s′|¯s, ¯a) > 0 is a small subset of ¯S. In NN terminology, this is a form of attention [31], in the sense that for a given label prediction (action), only a subset of the input features (value function) is relevant. Attention is known to improve learning performance by reducing the effective number of network parameters during learning. Therefore, the second element in our network is an attention module that outputs a vector of (attention 3 modulated) values ψ(s). Finally, the vector ψ(s) is added as additional features to a reactive policy πre(a|φ(s), ψ(s)). The full network architecture is depicted in Figure 2 (left). Returning to our grid-world example, at a particular state s, the reactive policy only needs to query the values of the states neighboring s in order to select the correct action. Thus, the attention module in this case could return a ψ(s) vector with a subset of ¯V ∗for these neighboring states. K recurrence Reward Q Prev. Value New Value VI Module P R V Figure 2: Planning-based NN models. Left: a general policy representation that adds value function features from a planner to a reactive policy. Right: VI module – a CNN representation of VI algorithm. Let θ denote all the parameters of the policy, namely, the parameters of fR, fP , and πre, and note that ψ(s) is in fact a function of φ(s). Therefore, the policy can be written in the form πθ(a|φ(s)), similarly to the standard policy form (cf. Section 2). If we could back-propagate through this function, then potentially we could train the policy using standard RL and IL algorithms, just like any other standard policy representation. While it is easy to design functions fR and fP that are differentiable (and we provide several examples in our experiments), back-propagating the gradient through the planning algorithm is not trivial. In the following, we propose a novel interpretation of an approximate VI algorithm as a particular form of a CNN. This allows us to conveniently treat the planning module as just another NN, and by back-propagating through it, we can train the whole policy end-to-end. 3.1 The VI Module We now introduce the VI module – a NN that encodes a differentiable planning computation. Our starting point is the VI algorithm (1). Our main observation is that each iteration of VI may be seen as passing the previous value function Vn and reward function R through a convolution layer and max-pooling layer. In this analogy, each channel in the convolution layer corresponds to the Q-function for a specific action, and convolution kernel weights correspond to the discounted transition probabilities. Thus by recurrently applying a convolution layer K times, K iterations of VI are effectively performed. Following this idea, we propose the VI network module, as depicted in Figure 2B. The inputs to the VI module is a ‘reward image’ ¯R of dimensions l, m, n, where here, for the purpose of clarity, we follow the CNN formulation and explicitly assume that the state space ¯S maps to a 2-dimensional grid. However, our approach can be extended to general discrete state spaces, for example, a graph, as we report in the WikiNav experiment in Section 4.4. The reward is fed into a convolutional layer ¯Q with ¯A channels and a linear activation function, ¯Q¯a,i′,j′ = P l,i,j W ¯a l,i,j ¯Rl,i′−i,j′−j. Each channel in this layer corresponds to ¯Q(¯s, ¯a) for a particular action ¯a. This layer is then max-pooled along the actions channel to produce the next-iteration value function layer ¯V , ¯Vi,j = max¯a ¯Q(¯a, i, j). The next-iteration value function layer ¯V is then stacked with the reward ¯R, and fed back into the convolutional layer and max-pooling layer K times, to perform K iterations of value iteration. The VI module is simply a NN architecture that has the capability of performing an approximate VI computation. Nevertheless, representing VI in this form makes learning the MDP parameters and reward function natural – by backpropagating through the network, similarly to a standard CNN. VI modules can also be composed hierarchically, by treating the value of one VI module as additional input to another VI module. We further report on this idea in the supplementary material. 3.2 Value Iteration Networks We now have all the ingredients for a differentiable planning-based policy, which we term a value iteration network (VIN). The VIN is based on the general planning-based policy defined above, with the VI module as the planning algorithm. In order to implement a VIN, one has to specify the state 4 and action spaces for the planning module ¯S and ¯A, the reward and transition functions fR and fP , and the attention function; we refer to this as the VIN design. For some tasks, as we show in our experiments, it is relatively straightforward to select a suitable design, while other tasks may require more thought. However, we emphasize an important point: the reward, transitions, and attention can be defined by parametric functions, and trained with the whole policy2. Thus, a rough design can be specified, and then fine-tuned by end-to-end training. Once a VIN design is chosen, implementing the VIN is straightforward, as it is simply a form of a CNN. The networks in our experiments all required only several lines of Theano [28] code. In the next section, we evaluate VIN policies on various domains, showing that by learning to plan, they achieve a better generalization capability. 4 Experiments In this section we evaluate VINs as policy representations on various domains. Additional experiments investigating RL and hierarchical VINs, as well as technical implementation details are discussed in the supplementary material. Source code is available at https://github.com/avivt/VIN. Our goal in these experiments is to investigate the following questions: 1. Can VINs effectively learn a planning computation using standard RL and IL algorithms? 2. Does the planning computation learned by VINs make them better than reactive policies at generalizing to new domains? An additional goal is to point out several ideas for designing VINs for various tasks. While this is not an exhaustive list that fits all domains, we hope that it will motivate creative designs in future work. 4.1 Grid-World Domain Our first experiment domain is a synthetic grid-world with randomly placed obstacles, in which the observation includes the position of the agent, and also an image of the map of obstacles and goal position. Figure 3 shows two random instances of such a grid-world of size 16 × 16. We conjecture that by learning the optimal policy for several instances of this domain, a VIN policy would learn the planning computation required to solve a new, unseen, task. In such a simple domain, an optimal policy can easily be calculated using exact VI. Note, however, that here we are interested in evaluating whether a NN policy, trained using RL or IL, can learn to plan. In the following results, policies were trained using IL, by standard supervised learning from demonstrations of the optimal policy. In the supplementary material, we report additional RL experiments that show similar findings. We design a VIN for this task following the guidelines described above, where the planning MDP ¯ M is a grid-world, similar to the true MDP. The reward mapping fR is a CNN mapping the image input to a reward map in the grid-world. Thus, fR should potentially learn to discriminate between obstacles, non-obstacles and the goal, and assign a suitable reward to each. The transitions ¯P were defined as 3 × 3 convolution kernels in the VI block, exploiting the fact that transitions in the grid-world are local3. The recurrence K was chosen in proportion to the grid-world size, to ensure that information can flow from the goal state to any other state. For the attention module, we chose a trivial approach that selects the ¯Q values in the VI block for the current state, i.e., ψ(s) = ¯Q(s, ·). The final reactive policy is a fully connected network that maps ψ(s) to a probability over actions. We compare VINs to the following NN reactive policies: CNN network: We devised a CNN-based reactive policy inspired by the recent impressive results of DQN [21], with 5 convolution layers, and a fully connected output. While the network in [21] was trained to predict Q values, our network outputs a probability over actions. These terms are related, since π∗(s) = arg maxa Q(s, a). Fully Convolutional Network (FCN): The problem setting for this domain is similar to semantic segmentation [19], in which each pixel in the image is assigned a semantic label (the action in our case). We therefore devised an FCN inspired by a state-of-the-art semantic segmentation algorithm [19], with 3 convolution layers, where the first layer has a filter that spans the whole image, to properly convey information from the goal to every other state. In Table 1 we present the average 0 −1 prediction loss of each model, evaluated on a held-out test-set of maps with random obstacles, goals, and initial states, for different problem sizes. In addition, for each map, a full trajectory from the initial state was predicted, by iteratively rolling-out the next-states 2VINs are fundamentally different than inverse RL methods [22], where transitions are required to be known. 3Note that the transitions defined this way do not depend on the state ¯s. Interestingly, we shall see that the network learned to plan successful trajectories nevertheless, by appropriately shaping the reward. 5 Figure 3: Grid-world domains (best viewed in color). A,B: Two random instances of the 28 × 28 synthetic gridworld, with the VIN-predicted trajectories and ground-truth shortest paths between random start and goal positions. C: An image of the Mars domain, with points of elevation sharper than 10◦colored in red. These points were calculated from a matching image of elevation data (not shown), and were not available to the learning algorithm. Note the difficulty of distinguishing between obstacles and non-obstacles. D: The VIN-predicted (purple line with cross markers), and the shortest-path ground truth (blue line) trajectories between between random start and goal positions. Domain VIN CNN FCN Prediction Success Traj. Pred. Succ. Traj. Pred. Succ. Traj. loss rate diff. loss rate diff. loss rate diff. 8 × 8 0.004 99.6% 0.001 0.02 97.9% 0.006 0.01 97.3% 0.004 16 × 16 0.05 99.3% 0.089 0.10 87.6% 0.06 0.07 88.3% 0.05 28 × 28 0.11 97% 0.086 0.13 74.2% 0.078 0.09 76.6% 0.08 Table 1: Performance on grid-world domain. Top: comparison with reactive policies. For all domain sizes, VIN networks significantly outperform standard reactive networks. Note that the performance gap increases dramatically with problem size. predicted by the network. A trajectory was said to succeed if it reached the goal without hitting obstacles. For each trajectory that succeeded, we also measured its difference in length from the optimal trajectory. The average difference and the average success rate are reported in Table 1. Clearly, VIN policies generalize to domains outside the training set. A visualization of the reward mapping fR (see supplementary material) shows that it is negative at obstacles, positive at the goal, and a small negative constant otherwise. The resulting value function has a gradient pointing towards a direction to the goal around obstacles, thus a useful planning computation was learned. VINs also significantly outperform the reactive networks, and the performance gap increases dramatically with the problem size. Importantly, note that the prediction loss for the reactive policies is comparable to the VINs, although their success rate is significantly worse. This shows that this is not a standard case of overfitting/underfitting of the reactive policies. Rather, VIN policies, by their VI structure, focus prediction errors on less important parts of the trajectory, while reactive policies do not make this distinction, and learn the easily predictable parts of the trajectory yet fail on the complete task. The VINs have an effective depth of K, which is larger than the depth of the reactive policies. One may wonder, whether any deep enough network would learn to plan. In principle, a CNN or FCN of depth K has the potential to perform the same computation as a VIN. However, it has much more parameters, requiring much more training data. We evaluate this by untying the weights in the K recurrent layers in the VIN. Our results, reported in the supplementary material, show that untying the weights degrades performance, with a stronger effect for smaller sizes of training data. 4.2 Mars Rover Navigation In this experiment we show that VINs can learn to plan from natural image input. We demonstrate this on path-planning from overhead terrain images of a Mars landscape. Each domain is represented by a 128 × 128 image patch, on which we defined a 16 × 16 grid-world, where each state was considered an obstacle if the terrain in its corresponding 8 × 8 image patch contained an elevation angle of 10 degrees or more, evaluated using an external elevation data base. An example of the domain and terrain image is depicted in Figure 3. The MDP for shortest-path planning in this case is similar to the grid-world domain of Section 4.1, and the VIN design was similar, only with a deeper CNN in the reward mapping fR for processing the image. The policy was trained to predict the shortest-path directly from the terrain image. We emphasize that the elevation data is not part of the input, and must be inferred (if needed) from the terrain image. 6 After training, VIN achieved a success rate of 84.8%. To put this rate in context, we compare with the best performance achievable without access to the elevation data, which is 90.3%. To make this comparison, we trained a CNN to classify whether an 8 × 8 patch is an obstacle or not. This classifier was trained using the same image data as the VIN network, but its labels were the true obstacle classifications from the elevation map (we reiterate that the VIN did not have access to these ground-truth obstacle labels during training or testing). The success rate of planner that uses the obstacle map generated by this classifier from the raw image is 90.3%, showing that obstacle identification from the raw image is indeed challenging. Thus, the success rate of the VIN, which was trained without any obstacle labels, and had to ‘figure out’ the planning process is quite remarkable. 4.3 Continuous Control Network Train Error Test Error VIN 0.30 0.35 CNN 0.39 0.59 Figure 4: Continuous control domain. Top: average distance to goal on training and test domains for VIN and CNN policies. Bottom: trajectories predicted by VIN and CNN on test domains. We now consider a 2D path planning domain with continuous states and continuous actions, which cannot be solved using VI, and therefore a VIN cannot be naively applied. Instead, we will construct the VIN to perform ‘high-level’ planning on a discrete, coarse, grid-world representation of the continuous domain. We shall show that a VIN can learn to plan such a ‘highlevel’ plan, and also exploit that plan within its ‘low-level’ continuous control policy. Moreover, the VIN policy results in better generalization than a reactive policy. Consider the domain in Figure 4. A red-colored particle needs to be navigated to a green goal using horizontal and vertical forces. Gray-colored obstacles are randomly positioned in the domain, and apply an elastic force and friction when contacted. This domain presents a non-trivial control problem, as the agent needs to both plan a feasible trajectory between the obstacles (or use them to bounce off), but also control the particle (which has mass and inertia) to follow it. The state observation consists of the particle’s continuous position and velocity, and a static 16 × 16 downscaled image of the obstacles and goal position in the domain. In principle, such an observation is sufficient to devise a ‘rough plan’ for the particle to follow. As in our previous experiments, we investigate whether a policy trained on several instances of this domain with different start state, goal, and obstacle positions, would generalize to an unseen domain. For training we chose the guided policy search (GPS) algorithm with unknown dynamics [17], which is suitable for learning policies for continuous dynamics with contacts, and we used the publicly available GPS code [7], and Mujoco [29] for physical simulation. We generated 200 random training instances, and evaluate our performance on 40 different test instances from the same distribution. Our VIN design is similar to the grid-world cases, with some important modifications: the attention module selects a 5 × 5 patch of the value ¯V , centered around the current (discretized) position in the map. The final reactive policy is a 3-layer fully connected network, with a 2-dimensional continuous output for the controls. In addition, due to the limited number of training domains, we pre-trained the VIN with transition weights that correspond to discounted grid-world transitions. This is a reasonable prior for the weights in a 2-d task, and we emphasize that even with this initialization, the initial value function is meaningless, since the reward map fR is not yet learned. We compare with a CNN-based reactive policy inspired by the state-of-the-art results in [21, 20], with 2 CNN layers for image processing, followed by a 3-layer fully connected network similar to the VIN reactive policy. Figure 4 shows the performance of the trained policies, measured as the final distance to the target. The VIN clearly outperforms the CNN on test domains. We also plot several trajectories of both policies on test domains, showing that VIN learned a more sensible generalization of the task. 4.4 WebNav Challenge In the previous experiments, the planning aspect of the task corresponded to 2D navigation. We now consider a more general domain: WebNav [23] – a language based search task on a graph. In WebNav [23], the agent needs to navigate the links of a website towards a goal web-page, specified by a short 4-sentence query. At each state s (web-page), the agent can observe average wordembedding features of the state φ(s) and possible next states φ(s′) (linked pages), and the features of the query φ(q), and based on that has to select which link to follow. In [23], the search was performed 7 on the Wikipedia website. Here, we report experiments on the ‘Wikipedia for Schools’ website, a simplified Wikipedia designed for children, with over 6000 pages and at most 292 links per page. In [23], a NN-based policy was proposed, which first learns a NN mapping from (φ(s), φ(q)) to a hidden state vector h. The action is then selected according to π(s′|φ(s), φ(q)) ∝exp h⊤φ(s′) . In essence, this policy is reactive, and relies on the word embedding features at each state to contain meaningful information about the path to the goal. Indeed, this property naturally holds for an encyclopedic website that is structured as a tree of categories, sub-categories, sub-sub-categories, etc. We sought to explore whether planning, based on a VIN, can lead to better performance in this task, with the intuition that a plan on a simplified model of the website can help guide the reactive policy in difficult queries. Therefore, we designed a VIN that plans on a small subset of the graph that contains only the 1st and 2nd level categories (< 3% of the graph), and their word-embedding features. Designing this VIN requires a different approach from the grid-world VINs described earlier, where the most challenging aspect is to define a meaningful mapping between nodes in the true graph and nodes in the smaller VIN graph. For the reward mapping fR, we chose a weighted similarity measure between the query features φ(q), and the features of nodes in the small graph φ(¯s). Thus, intuitively, nodes that are similar to the query should have high reward. The transitions were fixed based on the graph connectivity of the smaller VIN graph, which is known, though different from the true graph. The attention module was also based on a weighted similarity measure between the features of the possible next states φ(s′) and the features of each node in the simplified graph φ(¯s). The reactive policy part of the VIN was similar to the policy of [23] described above. Note that by training such a VIN end-to-end, we are effectively learning how to exploit the small graph for doing better planning on the true, large graph. Both the VIN policy and the baseline reactive policy were trained by supervised learning, on random trajectories that start from the root node of the graph. Similarly to [23], a policy is said to succeed a query if all the correct predictions along the path are within its top-4 predictions. After training, the VIN policy performed mildly better than the baseline on 2000 held-out test queries when starting from the root node, achieving 1030 successful runs vs. 1025 for the baseline. However, when we tested the policies on a harder task of starting from a random position in the graph, VINs significantly outperformed the baseline, achieving 346 successful runs vs. 304 for the baseline, out of 4000 test queries. These results confirm that indeed, when navigating a tree of categories from the root up, the features at each state contain meaningful information about the path to the goal, making a reactive policy sufficient. However, when starting the navigation from a different state, a reactive policy may fail to understand that it needs to first go back to the root and switch to a different branch in the tree. Our results indicate such a strategy can be better represented by a VIN. We remark that there is still room for further improvements of the WebNav results, e.g., by better models for reward and attention functions, and better word-embedding representations of text. 5 Conclusion and Outlook The introduction of powerful and scalable RL methods has opened up a range of new problems for deep learning. However, few recent works investigate policy architectures that are specifically tailored for planning under uncertainty, and current RL theory and benchmarks rarely investigate the generalization properties of a trained policy [27, 21, 5]. This work takes a step in this direction, by exploring better generalizing policy representations. Our VIN policies learn an approximate planning computation relevant for solving the task, and we have shown that such a computation leads to better generalization in a diverse set of tasks, ranging from simple gridworlds that are amenable to value iteration, to continuous control, and even to navigation of Wikipedia links. In future work we intend to learn different planning computations, based on simulation [10], or optimal linear control [30], and combine them with reactive policies, to potentially develop RL solutions for task and motion planning [14]. Acknowledgments This research was funded in part by Siemens, by ONR through a PECASE award, by the Army Research Office through the MAST program, and by an NSF CAREER grant. A. T. was partially funded by the Viterbi Scholarship, Technion. Y. W. was partially funded by a DARPA PPAML program, contract FA8750-14-C-0011. 8 References [1] R. Bellman. Dynamic Programming. Princeton University Press, 1957. [2] D. Bertsekas. Dynamic Programming and Optimal Control, Vol II. Athena Scientific, 4th edition, 2012. [3] D. Ciresan, U. Meier, and J. Schmidhuber. Multi-column deep neural networks for image classification. In Computer Vision and Pattern Recognition, pages 3642–3649, 2012. [4] M. Deisenroth and C. E. Rasmussen. Pilco: A model-based and data-efficient approach to policy search. In ICML, 2011. [5] Y. Duan, X. Chen, R. Houthooft, J. Schulman, and P. Abbeel. Benchmarking deep reinforcement learning for continuous control. arXiv preprint arXiv:1604.06778, 2016. [6] C. Farabet, C. Couprie, L. Najman, and Y. LeCun. Learning hierarchical features for scene labeling. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(8):1915–1929, 2013. [7] C. Finn, M. Zhang, J. Fu, X. Tan, Z. McCarthy, E. Scharff, and S. Levine. Guided policy search code implementation, 2016. Software available from rll.berkeley.edu/gps. [8] K. Fukushima. Neural network model for a mechanism of pattern recognition unaffected by shift in position- neocognitron. Transactions of the IECE, J62-A(10):658–665, 1979. [9] A. Giusti et al. A machine learning approach to visual perception of forest trails for mobile robots. IEEE Robotics and Automation Letters, 2016. [10] X. Guo, S. Singh, H. Lee, R. L. Lewis, and X. Wang. Deep learning for real-time atari game play using offline monte-carlo tree search planning. In NIPS, 2014. [11] X. Guo, S. Singh, R. Lewis, and H. Lee. Deep learning for reward design to improve monte carlo tree search in atari games. arXiv:1604.07095, 2016. [12] R. Ilin, R. Kozma, and P. J. Werbos. Efficient learning in cellular simultaneous recurrent neural networks-the case of maze navigation problem. In ADPRL, 2007. [13] J. Joseph, A. Geramifard, J. W. Roberts, J. P. How, and N. Roy. Reinforcement learning with misspecified model classes. In ICRA, 2013. [14] L. P. Kaelbling and T. Lozano-Pérez. Hierarchical task and motion planning in the now. In IEEE International Conference on Robotics and Automation (ICRA), pages 1470–1477, 2011. [15] A. Krizhevsky, I. Sutskever, and G. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012. [16] 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. [17] S. Levine and P. Abbeel. Learning neural network policies with guided policy search under unknown dynamics. In NIPS, 2014. [18] S. Levine, C. Finn, T. Darrell, and P. Abbeel. End-to-end training of deep visuomotor policies. JMLR, 17, 2016. [19] J. Long, E. Shelhamer, and T. Darrell. Fully convolutional networks for semantic segmentation. In IEEE Conference on Computer Vision and Pattern Recognition, pages 3431–3440, 2015. [20] V. Mnih, A. P. Badia, M. Mirza, A. Graves, T. Lillicrap, T. Harley, D. Silver, and K. Kavukcuoglu. Asynchronous methods for deep reinforcement learning. arXiv preprint arXiv:1602.01783, 2016. [21] V. Mnih, K. Kavukcuoglu, D. Silver, A. Rusu, J. Veness, M. Bellemare, A. Graves, M. Riedmiller, A. Fidjeland, G. Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015. [22] G. Neu and C. Szepesvári. Apprenticeship learning using inverse reinforcement learning and gradient methods. In UAI, 2007. [23] R. Nogueira and K. Cho. Webnav: A new large-scale task for natural language based sequential decision making. arXiv preprint arXiv:1602.02261, 2016. [24] S. Ross, G. Gordon, and A. Bagnell. A reduction of imitation learning and structured prediction to no-regret online learning. In AISTATS, 2011. [25] J. Schmidhuber. An on-line algorithm for dynamic reinforcement learning and planning in reactive environments. In International Joint Conference on Neural Networks. IEEE, 1990. [26] J. Schulman, S. Levine, P. Abbeel, M. Jordan, and P. Moritz. Trust region policy optimization. In ICML, 2015. [27] R. S. Sutton and A. G. Barto. Reinforcement learning: An introduction. MIT press, 1998. [28] Theano Development Team. Theano: A Python framework for fast computation of mathematical expressions. arXiv e-prints, abs/1605.02688, May 2016. [29] E. Todorov, T. Erez, and Y. Tassa. Mujoco: A physics engine for model-based control. In Intelligent Robots and Systems (IROS), 2012 IEEE/RSJ International Conference on, pages 5026–5033. IEEE, 2012. [30] M. Watter, J. Springenberg, J. Boedecker, and M. Riedmiller. Embed to control: A locally linear latent dynamics model for control from raw images. In NIPS, 2015. [31] K. Xu, J. Ba, R. Kiros, K. Cho, A. Courville, R. Salakhudinov, R. Zemel, and Y. Bengio. Show, attend and tell: Neural image caption generation with visual attention. In ICML, 2015. 9 | 2016 | 440 |
6,373 | Training and Evaluating Multimodal Word Embeddings with Large-scale Web Annotated Images Junhua Mao1 Jiajing Xu2 Yushi Jing2 Alan Yuille1,3 1University of California, Los Angeles 2Pinterest Inc. 3Johns Hopkins University mjhustc@ucla.edu, {jiajing,jing}@pinterest.com, alan.l.yuille@gmail.com Abstract In this paper, we focus on training and evaluating effective word embeddings with both text and visual information. More specifically, we introduce a large-scale dataset with 300 million sentences describing over 40 million images crawled and downloaded from publicly available Pins (i.e. an image with sentence descriptions uploaded by users) on Pinterest [2]. This dataset is more than 200 times larger than MS COCO [22], the standard large-scale image dataset with sentence descriptions. In addition, we construct an evaluation dataset to directly assess the effectiveness of word embeddings in terms of finding semantically similar or related words and phrases. The word/phrase pairs in this evaluation dataset are collected from the click data with millions of users in an image search system, thus contain rich semantic relationships. Based on these datasets, we propose and compare several Recurrent Neural Networks (RNNs) based multimodal (text and image) models. Experiments show that our model benefits from incorporating the visual information into the word embeddings, and a weight sharing strategy is crucial for learning such multimodal embeddings. The project page is: http://www.stat. ucla.edu/~junhua.mao/multimodal_embedding.html1. 1 Introduction Word embeddings are dense vector representations of words with semantic and relational information. In this vector space, semantically related or similar words should be close to each other. A large-scale training dataset with billions of words is crucial to train effective word embedding models. The trained word embeddings are very useful in various tasks and real-world applications that involve searching for semantically similar or related words and phrases. A large proportion of the state-of-the-art word embedding models are trained on pure text data only. Since one of the most important functions of language is to describe the visual world, we argue that the effective word embeddings should contain rich visual semantics. Previous work has shown that visual information is important for training effective embedding models. However, due to the lack of large training datasets of the same scale as the pure text dataset, the models are either trained on relatively small datasets (e.g. [13]), or the visual contraints are only applied to limited number of pre-defined visual concepts (e.g. [21]). Therefore, such work did not fully explore the potential of visual information in learning word embeddings. In this paper, we introduce a large-scale dataset with both text descriptions and images, crawled and collected from Pinterest, one of the largest database of annotated web images. On Pinterest, users save web images onto their boards (i.e. image collectors) and supply their descriptions of the images. More descriptions are collected when the same images are saved and commented by other users. Compared to MS COCO (i.e. the image benchmark with sentences descriptions [22]), our dataset is much larger (40 million images with 300 million sentences compared to 0.2 million images and 1 million sentences in the current release of MS COCO) and is at the same scale as the standard pure 1The datasets introduced in this work will be gradually released on the project page. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. text training datasets (e.g. Wikipedia Text Corpus). Some sample images and their descriptions are shown in Figure 1 in Section 3.1. We believe training on this large-scale dataset will lead to richer and better generalized models. We denote this dataset as the Pinterest40M dataset. One challenge for word embeddings learning is how to directly evaluate the quality of the model with respect to the tasks (e.g. the task of finding related or similar words and phrases). State-ofthe-art neural language models often use the negative log-likelihood of the predicted words as their training loss, which is not always correlated with the effectiveness of the learned embedding. Current evaluation datasets (e.g. [5, 14, 11]) for word similarity or relatedness contain only less than a thousand word pairs and cannot comprehensively evaluate all the embeddings of the words appearing in the training set. The challenge of constructing large-scale evaluation datasets is partly due to the difficulty of finding a large number of semantically similar or related word/phrase pairs. In this paper, we utilize user click information collected from Pinterest’s image search system to generate millions of these candidate word/phrase pairs. Because user click data are somewhat noisy, we removed inaccurate entries in the dataset by using crowdsourcing human annotations. This led to a final gold standard evaluation dataset consists of 10,674 entries. Equipped with these datasets, we propose, train and evaluate several Recurrent Neural Network (RNN [10]) based models with input of both text descriptions and images. Some of these models directly minimize the Euclidean distance between the visual features and the word embeddings or RNN states, similar to previous work (e.g. [13, 21]). The best performing model is inspired by recent image captioning models [9, 24, 36], with the additional weight-sharing strategy originally proposed in [23] to learn novel visual concepts. This strategy imposes soft constraints between the visual features and all the related words in the sentences. Our experiments validate the effectiveness and importance of incorporating visual information into the learned word embeddings. We make three major contributions: Firstly, we constructed a large-scale multimodal dataset with both text descriptions and images, which is at the same scale as the pure text training set. Secondly, we collected and labeled a large-scale evaluation dataset for word and phrase similarity and relatedness evaluation. Finally, we proposed and compared several RNN based models for learning multimodal word embeddings effectively. To facilitate research in this area, we will gradually release the datasets proposed in this paper on our project page. 2 Related Work Image-Sentence Description Datasets The image descriptions datasets, such as Flickr8K [15], Flickr30K [37], IAPR-TC12 [12], and MS COCO [22], greatly facilitated the development of models for language and vision tasks such as image captioning. Because it takes lots of resources to label images with sentences descriptions, the scale of these datasets are relatively small (MS COCO, the largest dataset among them, only contains 1 million sentences while our Pinterest40M dataset has 300 million sentences). In addition, the language used to describe images in these datasets is relatively simple (e.g. MS COCO only has around 10,000 unique words appearing at least 3 times while there are 335,323 unique words appearing at least 50 times in Pinterest40M). The Im2Text dataset proposed in [28] adopts a similar data collection process to ours by using 1 million images with 1 million user annotated captions from Flickr. But its scale is still much smaller than our Pinterest40M dataset. Recently, [34] proposed and released the YFCC100M dataset, which is a large-scale multimedia dataset contains metadata of 100 million Flickr images. It provides rich information about images, such as tags, titles, and locations where they were taken. The users’ comments can be obtained by querying the Flickr API. Because of the different functionality and user groups between Flickr and Pinterest, the users’ comments of Flickr images are quite different from those of Pinterest (e.g. on Flickr, users tend to comment more on the photography techniques). This dataset provides complementary information to our Pinterest40M dataset. Word Similarity-Relatedness Evaluation The standard benchmarks, such as WordSim-353/WSSim [11, 3], MEN [5], and SimLex-999 [14], consist of a couple hundreds of word pairs and their similarity or relatedness scores. The word pairs are composed by asking human subjects to write the first related, or similar, word that comes into their mind when presented with a concept word (e.g. [27, 11]), or by randomly selecting frequent words in large text corpus and manually searching for useful pairs (e.g. [5]). In this work, we are able to collect a large number of word/phrase pairs 2 This strawberry limeade cake is fruity, refreshing, and gorgeous! Those lovely layers are impossible to resist. Make two small fishtail braids on each side, then put them together with a ponytail. White and gold ornate library with decorated ceiling, ironwork balcony, crystal chandelier, and glass-covered shelves. (I don't know if you're allowed to read a beat-up paperback in this room.) This is the place I will be going (hopefully) on my first date with Prince Stephen. It's the palace gardens, and they are gorgeous. I cannot wait to get to know him and exchange photography ideas! This flopsy-wopsy who just wants a break from his walk. | 18 German Shepherd Puppies Who Need To Be Snuggled Immediately Figure 1: Sample images and their sample descriptions collected from Pinterest. with good quality by mining them from the click data of Pinterest’s image search system used by millions of users. In addition, because this dataset is collected through a visual search system, it is more suitable to evaluate multimodal embedding models. Another related evaluation is the analogy task proposed in [25]. They ask the model questions like “man to woman is equal king to what?” as their evaluation. But such questions do not directly measure the word similarity or relatedness, and cannot cover all the semantic relationships of million of words in the dictionary. RNN for Language and Vision Our models are inspired by recent RNN-CNN based image captioning models [9, 24, 36, 16, 6, 18, 23], which can be viewed as a special case of the sequence-tosequence learning framework [33, 7]. We adopt Gated Recurrent Units (GRUs [7]), a variation of the simple RNN model. Multimodal Word Embedding Models For pure text, one of the most effective approaches to learn word embeddings is to train neural network models to predict a word given its context words in a sentence (i.e. the continuous bag-of-word model [4]) or to predict the context words given the current word (i.e. the skip-gram model [25]). There is a large literature on word embedding models that utilize visual information. One type of methods takes a two-step strategy that first extracts text and image features separately and then fuses them together using singular value decomposition [5], stacked autoencoders [31], or even simple concatenation [17]. [13, 21, 19] learn the text and image features jointly by fusing visual or perceptual information in a skip-gram model [25]. However, because of the lack of large-scale multimodal datasets, they only associate visual content with a pre-defined set of nouns (e.g. [21]) or perception domains (e.g. [14]) in the sentences, or focus on abstract scenes (e.g. [19]). By contrast, our best performing model places a soft constraint between visual features and all the words in the sentences by a weight sharing strategy as shown in Section 4. 3 Datasets We constructed two datasets: one for training our multimodal word-embeddings (see Section 3.1) and another one for the evaluation of the learned word-embeddings (see Section 3.2). 3.1 Training Dataset Table 1: Scale comparison with other image descriptions benchmarks. Image Sentences Flickr8K [15] 8K 40K Flickr30K [37] 30K 150K IAPR-TC12 [12] 20K 34K MS COCO [22] 200K 1M Im2Text [28] 1M 1M Pinterset40M 40M 300M Pinterest is one of the largest repository of Web images. Users commonly tag images with short descriptions and share the images (and desriptions) with others. Since a given image can be shared and tagged by multiple, sometimes thousands of users, many images have a very rich set of descriptions, making this source of data ideal for training model with both text and image inputs. The dataset is prepared in the following way: first, we crawled the public available data on Pinterest to construct our training dataset of more than 40 million images. Each image is associated with an average of 12 sentences, and we removed duplicated or short sentences with less than 4 words. The duplication detection is conducted by calculating the 3 User Query hair styles Most Clicked Items Annotations: hair tutorial prom night ideas long hair beautiful … Annotations: pony tails unique hairstyles hair tutorial picture inspiration … … Positive Phrases for the Query hair tutorial pony tails makeup … inspiration ideas Remove overlapping words pony tails makeup … Sorted by Click Final List Figure 2: The illustration of the positive word/phrase pairs generation. We calculate a score for each annotation (i.e. a short phrase describes the items) by aggregating the click frequency of the items to which it belongs and rank them according to the score. The final list of positive phrases are generated from the top ranked phrases after removing phrases containing overlapping words with the user query phrase. See text for details. overlapped word unigram ratios. Some sample images and descriptions are shown in Figure 1. We denote this dataset as the Pinterest40M dataset. Our dataset contains 40 million images with 300 million sentences (around 3 billion words), which is much larger than the previous image description datasets (see Table 1). In addition, because the descriptions are annotated by users who expressed interest in the images, the descriptions in our dataset are more natural and richer than the annotated image description datasets. In our dataset, there are 335,323 unique words with a minimum number of occurence of 50, compared with 10,232 and 65,552 words appearing at least 3 times in MS COCO and IM2Text dataset respectively. To the best of our knowledge, there is no previous paper that trains a multimodal RNN model on a dataset of such scale. 3.2 Evaluation Datasets This work proposes to use labeled phrase triplets – each triplet is a three-phrase tuple containing phrase A, phrase B and phrase C, where A is considered as semantically closer to B than A is to C. At testing time, we compute the distance in the word embedding space between A/B and A/C, and consider a test triplet as positive if d(A, B) < d(A, C). This relative comparison approach was commonly used to evaluate and compare different word embedding models [30]. In order to generate large number of phrase triplets, we rely on user-click data collected from Pinterest image search system. At the end, we construct a large-scale evaluation dataset with 9.8 million triplets (see Section 3.2.1), and its cleaned up gold standard version with 10 thousand triplets (see Section 3.2.2). 3.2.1 The Raw Evaluation Dataset from User Clickthrough Data It is very hard to obtain a large number of semantically similar or related word and phrase pairs. This is one of the challenges for constructing a large-scale word/phrase similarity and relatedness evaluation dataset. We address this challenge by utilizing the user clickthrough data from Pinterest image search system, see Figure 2 for an illustration. More specifically, given a query from a user (e.g. “hair styles”), the search system returns a list of items, and each item is composed of an image and a set of annotations (i.e. short phrases or words that describe the item). Please note that the same annotation can appear in multiple items, e.g., “hair tutorial” can describe items related to prom hair styles or ponytails. We derive a matching score for each annotation by aggregating the click frequency of the items containing the annotation. The annotations are then ranked according to the matching scores, and the top ranked annotations are considered as the positive set of phrases or words with respect to the user query. To increase the difficulty of this dataset, we remove the phrases that share common words with the user query from the initial list of positive phrases. E.g. “hair tutorials” will be removed because the word “hair” is contained in the query phrase “hair styles”. A stemmer in Python’s “stemmer” package is also adopted to find words with the same root (e.g. “cake” and “cakes” are considered as the same word). This pruning step also prevents giving bias to methods which measure the similarity between the positive phrase and the query phrase by counting the number of overlapping words between them. In this way, we collected 9,778,508 semantically similar phrase pairs. 4 Table 2: Sample triplets from the Gold RP10K dataset. Base Phrase Positive Phrase Negative Phrase hair style ponytail pink nail summer lunch salads sides packaging bottle oil painting ideas art tips snickerdoodle muffins la multi ani birthdays wishes tandoori teach activities preschool rental house ideas karting go carts office waiting area looking down the view soft curls for medium hair black ceiling home ideas paleo potluck new marriage quotes true love winter travel packing sexy scientist costume labs personal word wall framing a mirror decorating bathroom celebrity style inspiration Previous word similarity/relatedness datasets (e.g. [11, 14]) manually annotated each word pair with an absolute score reflecting how much the words in this pair are semantically related. In the testing stage, a predicted similarity score list of the word pairs generated by the model in the dataset is compared with the groundtruth score list. The Spearman’s rank correlation between the two lists is calculated as the score of the model. However, it is often too hard and expensive to label the absolute related score and maintain the consistency across all the pairs in a large-scale dataset, even if we average the scores of several annotators. We adopt a simple strategy by composing triplets for the phrase pairs. More specifically, we randomly sample negative phrases from a pool of 1 billion phrases. The negative phrase should not contain any overlapping word (a stemmer is also adopted) with both of the phrases in the original phrase pair. In this way, we construct 9,778,508 triplets with the format of (base phrase, positive phrase, negative phrase). In the evaluation, a model should be able to distinguish the positive phrase from the negative phrase by calculating their similarities with the base phrase in the embedding space. We denote this dataset as Related Phrase 10M (RP10M) dataset. 3.2.2 The Cleaned-up Gold Standard Dataset Because the raw Related Query 10M dataset is built upon user click information, it contains some noisy triplets (e.g. the positive and base phrase are not related, or the negative phrase is strongly related to the base phrase). To create a gold standard dataset, we conduct a clean up step using the crowdsourcing platform CrowdFlower [1] to remove these inaccurate triplets. A sample question and choices for the crowdsourcing annotators are shown in Figure 3. The positive and negative phrases in a triplet are randomly given as choice “A” or “B”. The annotators are required to choose which phrase is more related to the base phrase, or if they are both related or unrelated. To help the annotators understand the meaning of the phrases, they can click on the phrases to get Google search results. We annotate 21,000 triplets randomly sampled from the raw Related Query 10M dataset. Three to five annotators are assigned to each question. A triplet is accepted and added in the final cleaned up dataset only if more than 50% of the annotators agree with the original positive and negative label of the queries (note that they do not know which one is positive in the annotation process). In practice, 70% of the selected phrases triplets have more than 3 annotators to agree. This leads to a gold standard dataset with 10,674 triplets. We denote this dataset as Gold Phrase Query 10K (Gold RP10K) dataset. Figure 3: The interface for the annotators. They are required to choose which phrase (positive and negative phrases will be randomly labeled as “A” or “B”) is more related to base phrase. They can click on the phrases to see Google search results. 5 Image CNN UW UW T One Hot Embedding (128) wt GRU (512) FC (128) Sampled SoftMax wt+1 Model A Set Image CNN Supervision on the final state Model B Image CNN Supervision Model C Figure 4: The illustration of the structures of our model A, B, and C. We use a CNN to extract visual representations and use a RNN to model sentences. The numbers on the bottom right corner of the layers indicate their dimensions. We use a sampled softmax layer with 1024 negative words to accelerate the training. Model A, B, and C differ from each other by the way that we fuse the visual representation into the RNN. See text for more details. This dataset is very challenging and a successfully model should be able to capture a variety of semantic relationships between words or phrases. Some sample triplets are shown in Table 2. 4 The Multimodal Word Embedding Models We propose three RNN-CNN based models to learn the multimodal word embeddings, as illustrated in Figure 4. All of the models have two parts in common: a Convolutional Neural Network (CNN [20]) to extract visual representations and a Recurrent Neural Network (RNN [10]) to model sentences. For the CNN part, we resize the images to 224 × 224, and adopt the 16-layer VGGNet [32] as the visual feature extractor. The binarized activation (i.e. 4096 binary vectors) of the layer before its SoftMax layer are used as the image features and will be mapped to the same space of the state of RNN (Model A, B) or the word embeddings (Model C), depends on the structure of the model, by a fully connected layer and a Rectified Linear Unit function (ReLU [26], ReLU(x) = max(0, x)). For the RNN part, we use a Gated Recurrent Unit (GRU [7]), an recently very popular RNN structure, with a 512 dimensional state cell. The state of GRU ht for each word with index t in a sentence can be represented as: rt = σ(Wr[et, ht−1] + br) (1) ut = σ(Wu[et, ht−1] + bu) (2) ct = tanh(Wc[et, rt ⊙ht−1] + bc) (3) ht = ut ⊙ht−1 + (1 −ut) ⊙ct (4) where ⊙represents the element-wise product, σ(.) is the sigmoid function, et denotes the word embedding for the word wt, rt and ut are the reset gate and update gate respectively. The inputs of the GRU are words in a sentence and it is trained to predict the next words given the previous words. We add all the words that appear more than 50 times in the Pinterest40M dataset into the dictionary. The final vocabulary size is 335,323. Because the vocabulary size is very huge, we adopt the sampled SoftMax loss [8] to accelerate the training. For each training step, we sample 1024 negative words according to their log frequency in the training data and calculate the sampled SoftMax loss for the positive word. This sampled SoftMax loss function of the RNN part is adopted with Model A, B and C. Minimizing this loss function can be considered as approximately maximizing the probability of the sentences in the training set. As illustrated in Figure 4, Model A, B and C have different ways to fuse the visual information in the word embeddings. Model A is inspired by the CNN-RNN based image captioning models [36, 23]. We map the visual representation in the same space as the GRU states to initialize them (i.e. set h0 = ReLU(WIfI)). Since the visual information is fed after the embedding layer, it is usually hard to ensure that this information is fused in the learned embeddings. We adopt a transposed weight sharing strategy proposed in [23] that was originally used to enhance the models’ ability to learn novel visual concepts. More specifically, we share the weight matrix of the SoftMax layer UM with the matrix Uw of the word embedding layer in a transposed manner. In this way, U T w is learned to decode the visual information and is enforced to incorporate this information into the word embedding matrix 6 Table 3: Performance comparison of our Model A, B, C, their variants and a state-of-the-art skip-gram model [25] trained on Google News dataset with 300 billion words. Gold RP10K RP10M dim Pure text RNN 0.748 0.633 128 Model A without weight sharing 0.773 0.681 128 Model A (weight shared multimodal RNN) 0.843 0.725 128 Model B (direct visual supervisions on the final RNN state) 0.705 0.646 128 Model C (direct visual supervisions on the embeddings) 0.771 0.687 128 Word2Vec-GoogleNews [25] 0.716 0.596 300 GloVe-Twitter [29] 0.693 0.617 200 Uw. In the experiments, we show that this strategy significantly improve the performance of the trained embeddings. Model A is trained by maximizing the log likelihood of the next words given the previous words conditioned on the visual representations, similar to the image captioning models. Compared to Model A, we adopt a more direct way to utilize the visual information for Model B and Model C. We add direct supervisions of the final state of the GRU (Model B) or the word embeddings (Model C), by adding new loss terms, in addition to the negative log-likelihood loss from the sampled SoftMax layer: Lstate = 1 n X s ∥hls −ReLU(WIfIs) ∥ (5) Lemb = 1 n X s 1 ls X t ∥et −ReLU(WIfIs) ∥ (6) where ls is the length of the sentence s in a mini-batch with n sentences, Eqn. 5 and Eqn. 6 denote the additional losses for model B and C respectively. The added loss term is balanced by a weight hyperparameter λ with the negative log-likehood loss from the sampled SoftMax layer. 5 Experiments 5.1 Training Details We convert the words in all sentences of the Pinterest40M dataset to lower cases. All the nonalphanumeric characters are removed. A start sign ⟨bos⟩and an end sign ⟨eos⟩are added at the beginning and the end of all the sentences respectively. We use the stochastic gradient descent method with a mini-batch size of 256 sentences and a learning rate of 1.0. The gradient is clipped to 10.0. We train the models until the loss does not decrease on a small validation set with 10,000 images and their descriptions. The models will scan the dataset for roughly five 5 epochs. The bias terms of the gates (i.e. br and bu in Eqn. 1 and 2) in the GRU layer are initialized to 1.0. 5.2 Evaluation Details We use the trained embedding models to extract embeddings for all the words in a phrase and aggregate them by average pooling to get the phrase representation. We then check whether the cosine distance between the (base phrase, positive phrase) pair are smaller than the (base phrase, negative phrase) pair. The average precision over all the triplets in the raw Related Phrases 10M (RP10M) dataset and the Gold standard Related Phrases 10K (Gold RP10K) dataset are reported. 5.3 Results on the Gold RP10K and RP10M datasets We evaluate and compare our Model A, B, C, their variants and several strong baselines on our RP10M and Gold RP10K datasets. The results are shown in Table 3. “Pure Text RNN” denotes the baseline model without input of the visual features trained on Pinterest40M. It have the same model structure as our Model A except that we initialize the hidden state of GRU with a zero vector. “Model A without weight sharing” denotes a variant of Model A where the weight matrix Uw of the word embedding layer is not shared with the weight matrix UM of the sampled SoftMax layer (see Figure 4 for details). 2 “Word2Vec-GoogleNews” denotes the state-of-the-art off-the-shelf word 2We also try to adopt the weight sharing strategy in Model B and C, but the performance is very similar to the non-weight sharing version. 7 embedding models of Word2Vec [25] trained on the Google-News data (about 300 billion words). “GloVe-Twitter” denotes the GloVe model [29] trained on the Twitter data (about 27 billion words). They are pure text models, but trained on a very large dataset (our model only trains on 3 billion words). Comparing these models, we can draw the following conclusions: • Under our evaluation criteria, visual information significantly helps the learning of word embeddings when the model successfully fuses the visual and text information together. E.g., our Model A outperforms the Word2Vec model by 9.5% and 9.2% on the Gold RP10K and RP10M datasets respectively. Model C also outperforms the pure text RNN baselines. • The weight sharing strategy is crucial to enhance the ability of Model A to fuse visual information into the learned embeddings. E.g., our Model A outperforms the baseline without this sharing strategy by 7.0% and 4.4% on Gold RP10K and RP10M respectively. • Model A performs the best among all the three models. It shows that soft supervision imposed by the weight-sharing strategy is more effective than direct supervision. This is not surprising since not all the words are semantically related to the content of the image and a direct and hard constraint might hinder the learning of the embeddings for these words. • Model B does not perform very well. The reason might be that most of the sentences have more than 8 words and the gradient from the final state loss term Lstate cannot be easily passed to the embedding of all the words in the sentence. • All the models trained on the Pinterest40M dataset performs better than the skip-gram model [25] trained on a much larger dataset of 300 billion words. 6 Discussion In this paper, we investigate the task of training and evaluating word embedding models. We introduce Pinterest40M, the largest image dataset with sentence descriptions to the best of our knowledge, and construct two evaluation dataset (i.e. RP10M and Gold RP10K) for word/phrase similarity and relatedness evaluation. Based on these datasets, we propose several CNN-RNN based multimodal models to learn effective word embeddings. Experiments show that visual information significantly helps the training of word embeddings, and our proposed model successfully incorporates such information into the learned embeddings. There are lots of possible extensions of the proposed model and the dataset. E.g., we plan to separate semantically similar or related phrase pairs from the Gold RP10K dataset to better understand the performance of the methods, similar to [3]. We will also give relatedness or similarity scores for the pairs (base phrase, positive phrase) to enable same evaluation strategy as previous datasets (e.g. [5, 11]). Finally, we plan to propose better models for phrase representations. Acknowledgement We are grateful to James Rubinstein for setting up the crowdsourcing experiments for dataset cleanup. We thank Veronica Mapes, Pawel Garbacki, and Leon Wong for discussions and support. We appreciate the comments and suggestions from anonymous reviewers of NIPS 2016. This work is partly supported by the Center for Brains, Minds and Machines NSF STC award CCF-1231216 and the Army Research Office ARO 62250-CS. Figure 5: t-SNE [35] visualization of the 500 most frequent words learned by our Model A. 8 References [1] The crowdflower platform. https://www.crowdflower.com/. [2] Pinterest. https://www.pinterest.com/. [3] E. Agirre, E. Alfonseca, K. Hall, J. Kravalova, M. Pa¸sca, and A. Soroa. A study on similarity and relatedness using distributional and wordnet-based approaches. In NAACL HLT, pages 19–27, 2009. [4] Y. Bengio, H. Schwenk, J.-S. Senécal, F. Morin, and J.-L. Gauvain. Neural probabilistic language models. In Innovations in Machine Learning, pages 137–186. Springer, 2006. [5] E. Bruni, N.-K. Tran, and M. Baroni. Multimodal distributional semantics. JAIR, 49(1-47), 2014. [6] X. Chen and C. L. Zitnick. Learning a recurrent visual representation for image caption generation. arXiv preprint arXiv:1411.5654, 2014. [7] K. Cho, B. Van Merriënboer, C. Gulcehre, D. Bahdanau, F. Bougares, H. Schwenk, and Y. Bengio. Learning phrase representations using rnn encoder-decoder for statistical machine translation. arXiv preprint arXiv:1406.1078, 2014. [8] S. J. K. Cho, R. Memisevic, and Y. Bengio. On using very large target vocabulary for neural machine translation. In ACL, 2015. [9] J. Donahue, L. Anne Hendricks, S. Guadarrama, M. Rohrbach, S. Venugopalan, K. Saenko, and T. Darrell. Long-term recurrent convolutional networks for visual recognition and description. In CVPR, 2015. [10] J. L. Elman. Finding structure in time. Cognitive science, 14(2):179–211, 1990. [11] L. Finkelstein, E. Gabrilovich, Y. Matias, E. Rivlin, Z. Solan, G. Wolfman, and E. Ruppin. Placing search in context: The concept revisited. In WWW, pages 406–414. ACM, 2001. [12] M. Grubinger, P. Clough, H. Müller, and T. Deselaers. The iapr tc-12 benchmark: A new evaluation resource for visual information systems. In International Workshop OntoImage, pages 13–23, 2006. [13] F. Hill and A. Korhonen. Learning abstract concept embeddings from multi-modal data: Since you probably can’t see what i mean. In EMNLP, pages 255–265. Citeseer, 2014. [14] F. Hill, R. Reichart, and A. Korhonen. Simlex-999: Evaluating semantic models with (genuine) similarity estimation. Computational Linguistics, 2015. [15] M. Hodosh, P. Young, and J. Hockenmaier. Framing image description as a ranking task: Data, models and evaluation metrics. Journal of Artificial Intelligence Research, pages 853–899, 2013. [16] A. Karpathy and L. Fei-Fei. Deep visual-semantic alignments for generating image descriptions. In CVPR, pages 3128–3137, 2015. [17] D. Kiela and L. Bottou. Learning image embeddings using convolutional neural networks for improved multi-modal semantics. In EMNLP, pages 36–45. Citeseer, 2014. [18] R. Kiros, R. Salakhutdinov, and R. S. Zemel. Unifying visual-semantic embeddings with multimodal neural language models. arXiv preprint arXiv:1411.2539, 2014. [19] S. Kottur, R. Vedantam, J. M. Moura, and D. Parikh. Visual word2vec (vis-w2v): Learning visually grounded word embeddings using abstract scenes. arXiv preprint arXiv:1511.07067, 2015. [20] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, pages 1097–1105, 2012. [21] A. Lazaridou, N. T. Pham, and M. Baroni. Combining language and vision with a multimodal skip-gram model. arXiv preprint arXiv:1501.02598, 2015. [22] T.-Y. Lin, M. Maire, S. Belongie, J. Hays, P. Perona, D. Ramanan, P. Dollár, and C. L. Zitnick. Microsoft coco: Common objects in context. In ECCV, pages 740–755. Springer, 2014. [23] J. Mao, X. Wei, Y. Yang, J. Wang, Z. Huang, and A. L. Yuille. Learning like a child: Fast novel visual concept learning from sentence descriptions of images. In ICCV, pages 2533–2541, 2015. [24] J. Mao, W. Xu, Y. Yang, J. Wang, Z. Huang, and A. Yuille. Deep captioning with multimodal recurrent neural networks (m-rnn). In ICLR, 2015. [25] T. Mikolov, I. Sutskever, K. Chen, G. S. Corrado, and J. Dean. Distributed representations of words and phrases and their compositionality. In NIPS, pages 3111–3119, 2013. [26] V. Nair and G. E. Hinton. Rectified linear units improve restricted boltzmann machines. In Proceedings of the 27th International Conference on Machine Learning (ICML-10), pages 807–814, 2010. [27] D. L. Nelson, C. L. McEvoy, and T. A. Schreiber. The university of south florida free association, rhyme, and word fragment norms. Behavior Research Methods, Instruments, & Computers, 36(3):402–407, 2004. [28] V. Ordonez, G. Kulkarni, and T. L. Berg. Im2text: Describing images using 1 million captioned photographs. In Advances in Neural Information Processing Systems, pages 1143–1151, 2011. [29] J. Pennington, R. Socher, and C. D. Manning. Glove: Global vectors for word representation. In EMNLP, volume 14, pages 1532–43, 2014. [30] T. Schnabel, I. Labutov, D. Mimno, and T. Joachims. Evaluation methods for unsupervised word embeddings. In EMNLP, pages 298–307, 2015. [31] C. Silberer and M. Lapata. Learning grounded meaning representations with autoencoders. In ACL, pages 721–732, 2014. [32] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015. [33] I. Sutskever, O. Vinyals, and Q. V. Le. Sequence to sequence learning with neural networks. In NIPS, pages 3104–3112, 2014. [34] B. Thomee, D. A. Shamma, G. Friedland, B. Elizalde, K. Ni, D. Poland, D. Borth, and L.-J. Li. Yfcc100m: The new data in multimedia research. Communications of the ACM, 59(2):64–73, 2016. [35] L. Van der Maaten and G. Hinton. Visualizing data using t-sne. JMLR, 9(2579-2605):85, 2008. [36] O. Vinyals, A. Toshev, S. Bengio, and D. Erhan. Show and tell: A neural image caption generator. In CVPR, pages 3156–3164, 2015. [37] P. Young, A. Lai, M. Hodosh, and J. Hockenmaier. From image descriptions to visual denotations: New similarity metrics for semantic inference over event descriptions. In ACL, pages 479–488, 2014. 9 | 2016 | 441 |
6,374 | Simple and Efficient Weighted Minwise Hashing Anshumali Shrivastava Department of Computer Science Rice University Houston, TX, 77005 anshumali@rice.edu Abstract Weighted minwise hashing (WMH) is one of the fundamental subroutine, required by many celebrated approximation algorithms, commonly adopted in industrial practice for large -scale search and learning. The resource bottleneck with WMH is the computation of multiple (typically a few hundreds to thousands) independent hashes of the data. We propose a simple rejection type sampling scheme based on a carefully designed red-green map, where we show that the number of rejected sample has exactly the same distribution as weighted minwise sampling. The running time of our method, for many practical datasets, is an order of magnitude smaller than existing methods. Experimental evaluations, on real datasets, show that for computing 500 WMH, our proposal can be 60000x faster than the Ioffe’s method without losing any accuracy. Our method is also around 100x faster than approximate heuristics capitalizing on the efficient “densified" one permutation hashing schemes [26, 27]. Given the simplicity of our approach and its significant advantages, we hope that it will replace existing implementations in practice. 1 Introduction (Weighted) Minwise Hashing (or Sampling), [2, 4, 17] is the most popular and successful randomized hashing technique, commonly deployed in commercial big-data systems for reducing the computational requirements of many large-scale applications [3, 1, 25]. Minwise sampling is a known LSH for the Jaccard similarity [22]. Given two positive vectors x, y ∈RD, x, y > 0, the (generalized) Jaccard similarity is defined as J(x, y) = PD i=1 min{xi, yi} PD i=1 max{xi, yi} . (1) J(x, y) is a frequently used measure for comparing web-documents [2], histograms (specially images [13]), gene sequences [23], etc. Recently, it was shown to be a very effective kernel for large-scale non-linear learning [15]. WMH leads to the best-known LSH for L1 distance [13], commonly used in computer vision, improving over [7]. Weighted Minwise Hashing (WMH) (or Minwise Sampling) generates randomized hash (or fingerprint) h(x), of the given data vector x ≥0, such that for any pair of vectors x and y, the probability of hash collision (or agreement of hash values) is given by, Pr(h(x) = h(y)) = P min{xi, yi} P max{xi, yi} = J(x, y). (2) A notable special case is when x and y are binary (or sets), i.e. xi, yi ∈{0, 1}D . For this case, the similarity measure boils down to J(x, y) = P min{xi,yi} P max{xi,yi} = |x∩y| |x∪y|. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Being able to generate a randomized signature, h(x), satisfying Equation 2 is the key breakthrough behind some of the best-known approximations algorithms for metric labelling [14], metric embedding [5], mechanism design, and differential privacy [8]. A typical requirement for algorithms relying on minwise hashing is to generate, some large enough, k independent Minwise hashes (or fingerprints) of the data vector x, i.e. compute hi(x) i ∈{1, 2, ..., k} repeatedly with independent randomization. These independent hashes can then be used for a variety of data mining tasks such as cheap similarity estimation, indexing for sublinear-search, kernel features for large scale learning, etc. The bottleneck step in all these applications is the costly computation of the multiple hashes, which requires multiple passes over the data. The number of required hashes typically ranges from few hundreds to several thousand [26]. For example, the number of hashes required by the famous LSH algorithm is O(nρ) which grows with the size of the data. [15] showed the necessity of around 4000 hashes per data vector in large-scale learning with J(x, y) as the kernel, making hash generation the most costly step. Owing to the significance of WMH and its impact in practice, there is a series of work over the last decade trying to reduce its costly computation cost [11].The first groundbreaking work on Minwise hashing [2] computed hashes h(x) only for unweighted sets x (or binary vectors), i.e. when the vector components xis can only take values 0 and 1. Later it was realized that vectors with positive integer weights, which are equivalent to weighted sets, can be reduced to unweighted set by replicating elements in proportion to their weights [10, 11]. This scheme was very expensive due to blowup in the number of elements caused by replications. Also, it cannot handle real weights. In [11], the authors showed few approximate solutions to reduce these replications. Later [17], introduced the concept of consistent weighted sampling (CWS), which focuses on sampling directly from some well-tailored distribution to avoid any replication. This method, unlike previous ones, could handle real weights exactly. Going a step further, Ioffe [13] was able to compute the exact distribution of minwise sampling leading to a scheme with worst case O(d), where d is the number of non-zeros. This is the fastest known exact weighted minwise sampling scheme, which will also be our main baseline. O(dk) for computing k independent hashes is very expensive for modern massive datasets, especially when k with ranges up to thousands. Recently, there was a big success for the binary case, where using the novel idea of “Densification" [26, 27, 25] the computation time for unweighted minwise was brought down to O(d + k). This resulted in over 100-1000 fold improvement. However, this speedup was limited only to binary vectors. Moreover, the samples were not completely independent. Capitalizing on recent advances for fast unweighted minwise hashing, [11] exploited the old idea of replication to convert weighted sets into unweighted sets. To deal with non-integer weights, the method samples the coordinates with probabilities proportional to leftover weights. The overall process converts the weighted minwise sampling to an unweighted problem, however, at a cost of incurring some bias (see Algorithm 2). This scheme is faster than Ioffe’s scheme but, unlike other prior works on CWS, it is not exact and leads to biased and correlated samples. Moreover, it requires strong and expensive independence [12]. All these lines of work lead to a natural question: does there exist an unbiased and independent WMH scheme with same property as Ioffe’s hashes but significantly faster than all existing methodologies? We answer this question positively. 1.1 Our Contributions: 1. We provide an unbiased weighted minwise hashing scheme, where each hash computation takes time inversely proportional to effective sparsity (define later) which can be an order of magnitude (even more) smaller than O(d). This improves upon the best-known scheme in the literature by Ioffe [13] for a wide range of datasets. Experimental evaluations on real datasets show more than 60000x speedup over the best known exact scheme and around 100x times faster than biased approximate schemes based on the recent idea of fast minwise hashing. 2. In practice, our hashing scheme requires much fewer bits usually (5-9) bits instead of 64 bits (or higher) required by existing schemes, leading to around 8x savings in space, as shown on real datasets. 2 3. We derive our scheme from elementary first principles. Our scheme is simple and it only requires access to uniform random number generator, instead of costly sampling and transformations needed by other methods. The hashing procedure is different from traditional schemes and could be of independent interest in itself. Our scheme naturally provide the quantification of when and how much savings we can obtain compared to existing methodologies. 4. Weighted Minwise sampling is a fundamental subroutine in many celebrated approximation algorithms. Some of the immediate consequences of our proposal are as follows: • We obtain an algorithmic improvement, over the query time of LSH based algorithm, for L1 distance and Jaccard Similarity search. • We reduce the kernel feature [21] computation time with min-max kernels [15]. • We reduce the sketching time for fast estimation of a variety of measures, including L1 and earth mover distance [14, 5]. 2 Review: Ioffe’s Algorithm and Fast Unweighted Minwise Hashing Algorithm 1 Ioffe’s CWS [13] input Vector x, random seed[][] for i = 1 to k do for Iterate over x j s.t xj > 0 do randomseed = seed[i][j]; Sample ri, j, ci, j ∼Gamma(2, 1). Sample βi,j ∼Uniform(0, 1) t j = log xj ri, j + βi,j y j = exp(ri,j(t j −βi,j)) z j = y j ∗exp(ri, j) a j = ci, j/z j end for k∗= arg minj aj HashPairs[i] = (k∗, tk∗) end for RETURN HashPairs[] We briefly review the state-of-the-art methodologies for Weighted Minwise Hashing (WMH). Since WMH is only defined for weighted sets, our vectors under consideration will always be positive, i.e. every xi ≥0. D will denote the dimensionality of the data, and we will use d to denote the number (or the average) of non-zeros of the vector(s) under consideration. The fastest known scheme for exact weighted minwise hashing is based on an elegant derivation of the exact sampling process for “Consistent Weighted Sampling" (CWS) due to Ioffe [13], which is summarized in Algorithm 1. This scheme requires O(d) computations. O(d) for a single hash computation is quite expensive. Even the unweighted case of minwise hashing had complexity O(d) per hashes, until recently. [26, 27] showed a new one permutation based scheme for generating k near-independent unweighted minwise hashes in O(d + k) breaking the old O(dk) barrier. However, this improvement does not directly extend to the weighted case. Nevertheless, it leads to a very powerful heuristic in practice. Algorithm 2 Reduce to Unweighted [11] input Vector x, S = φ for Iterate over xj s.t xj > 0 do floorxj = ⌊x j⌋ for i = 1 to floorx j do S = S ∪(i, j) end for r = Uniform(0, 1) if r ≤xj −floorx j then S = S ∪( floorx j + 1, j) end if end for RETURN S (unweighted set) It was known that with some bias, weighted minwise sampling can be reduced to an unweighted minwise sampling using the idea of sampling weights in proportion to their probabilities [10, 14]. Algorithm 2 describes such a procedure. A reasonable idea is then to use the fast unweighted hashing scheme, on the top of this biased approximation [11, 24]. The inside for-loop in Algorithm 2 blows up the number of non-zeros in the returned unweighted set. This makes the process slower and dependent on the magnitude of weights. Moreover, unweighted sampling requires very costly random permutations for good accuracy [20]. Both the Ioffe’s scheme and the biased unweighted approximation scheme generate big hash values requiring 32-bits or higher storage per hash value. For reducing this to a manageable size of say 4-8 bits, a commonly adopted practical methodology is to randomly rehash it to smaller space at the cost of loss in accuracy [16]. It turns out that our hashing scheme generates 5-9 bits values, h(x), satisfying Equation 2, without losing any accuracy, for many real datasets. 3 3 Our Proposal: New Hashing Scheme We first describe our procedure in details. We will later talk about the correctness of the scheme. We will then discuss its runtime complexity and other practical issues. 3.1 Procedure 𝑴𝟎= 𝟎 𝑴𝟏 𝒚𝟐 𝑴𝟐 𝑴𝟑 𝑴𝟒= 𝑴 𝒚𝟑= 𝟎 𝒚𝟒 𝑴𝟎= 𝟎 𝒙𝟏 𝑴𝟏 𝒙𝟐 𝑴𝟐 𝑴𝟑 𝑴𝟒= 𝑴 𝒙𝟑 𝒙𝟒 𝒚𝟏 y x Figure 1: Illustration of Red-Green Map of 4 dimensional vectors x and y. We will denote the ith component of vector x ∈ RD by xi. Let mi be the upper bound on the value of component xi in the given dataset. We can always assume the mi to be an integer, otherwise we take the ceiling ⌈mi⌉as our upper bound. Define iX k=1 mi = Mi. and D X k=1 mi = MD = M (3) If the data is normalized, then mi = 1 and M = D. Given a vector x, we first create a red-green map associated with it, as shown in Figure 1. For this, we first take an interval [0, M] and divide it into D disjoint intervals, with ith interval being [Mi−1, Mi] which is of the size mi. Note that PD i=1 mi = M, so we can always do that. We then create two regions, red and green. For the ith interval [Mi−1, Mi], we mark the subinterval [Mi−1, Mi−1 + xi] as green and the rest [Mi−1 + xi, Mi] with red, as shown in Figure 1. If xi = 0 for some i, then the whole ith interval [Mi−1, Mi] is marked as red. Formally, for a given vector x, define the green xgreen and the red xred regions as follows xgreen = ∪D i=1[Mi, Mi + xi]; xred = ∪D i=1[Mi + xi, Mi+1]; (4) Algorithm 3 Weighted MinHash input Vector x, Mi’s, k, random seed[]. Initialise Hashes[] to all 0s. for i = 1 to k do randomseed = seed[i]; while true do r = M × Uniform(0, 1); if ISGREEN(r), (check if r ∈xred then break; end if randomseed = ⌈r ∗1000000⌉; Hashes[i] + +; end while end for RETURN Hashes Our sampling procedure simply draws an independent random real number between [0, M], if the random number lies in the red region we repeat and re-sample. We stop the process as soon as the generated random number lies in the green region. Our hash value for a given data vector, h(x), is simply the number of steps taken before we stop. We summarize the procedure in Algorithm 3. More formally, Definition 1 Define {ri : i = 1, 2, 3....} as a sequence of i.i.d uniformly generated random number between [0, M]. Then we define the hash of x, h(x) as h(x) = arg min i ri, s.t. ri ∈xgreen (5) Our procedure can be viewed as a form of rejection sampling [30]. To the best of our knowledge, there has been no prior evidence in the literature, where that the number of samples rejected has locality sensitive property. We want our hashing scheme to be consistent [13] across different data points to guarantee Equation 2. This requires ensuring the consistency of the random numbers in hashes [13]. We can achieve the required consistency by pre-generating the sequence of random numbers and storing them analogous to other hashing schemes. However, there is an easy way to generate a fixed sequence of random numbers on the fly by ensuring the consistency of the random seed. This does not require any storage, except the starting seed. Our Algorithm 3 uses this criterion, to ensure the consistency of random numbers. We start with a fixed random seed for generating random numbers. If the generated random number lies in the red region, then before re-sampling, we reset the seed of our random number generator as a function of discarded random number. In the algorithm, we used ⌈100000 ∗r⌉, where ⌈⌉is the ceiling operation, as a convenient way to ensure the consistency of sequence, without any memory overhead. This seems to works nicely in practice. Since we are sampling real numbers, the probability of any repetition (or cycle) is zero. For generating k independent hashes we just use different random seeds which are kept fixed for the entire dataset. 4 3.2 Correctness We show that the simple, but very unusual, scheme given in Algorithms 3 actually does possess the required property, i.e. for any pair of points x and y Equation 2 holds. Unlike the previous works on this line [17, 13] which requires computing the exact distribution of associated quantities, the proof of our proposed scheme is elementary and can be derived from first principles. This is not surprising given the simplicity of our procedure. Theorem 1 For any two vectors x and y, we have Pr h(x) = h(y) = J(x, y) = PD i=1 min{xi, yi} PD i=1 max{xi, yi} (6) Theorem 1 implies that the sampling process is exact and we automatically have an unbiased estimator of J(x, y), using k independently generated WMH, hi(x)s from Algorithm 3. ˆJ = 1 k k X i=1 1{hi(x) = hi(y)}; E( ˆJ) = J(x, y); Var( ˆJ) = J(x, y)(1 −J(x, y)) k , (7) where 1 is the indicator function. 3.3 Running Time Analysis and Fast Implementation Define sx = Size of green region Size of red region + Size of green region = PD i=1 xi M = ||x||1 M , (8) as the effective sparsity of the vector x. Note that this is also the probability of Pr(r ∈xgreen). Algorithm 3 has a while loop. We show that the expected times the while loops runs, which is also the expected value of h(x), is the inverse of effective sparsity . Formally, Theorem 2 E(h(x)) = 1 sx ; Var(h(x)) = 1 −sx s2x ; Pr h(x) ≥ log δ log (1 −sx) ≤δ. (9) 3.4 When is this advantageous over Ioffe’s scheme? The time to compute each hash value, in expectation, is the inverse of effective sparsity 1 s. This is a very different quantity compared to existing solutions which needs O(d). For datasets with 1 s << d, we can expect our method to be much faster. For real datasets, such as image histograms, where minwise sampling is popular[13], the value of this sparsity is of the order of 0.02-0.08 (see Section 4.2) leading to 1 sx ≈13−50. On the other hand, the number of non-zeros is around half million. Therefore, we can expect significant speed-ups. Corollary 1 The expected amount of bits required to represent h(x) is small, in particular, E(bits) ≤−log sx; E(bits) ≈log 1 sx −(1 −sx) 2 ; (10) Existing hashing scheme require 64 bits, which is quite expensive. A popular approach for reducing space uses least significant bits of hashes [16, 13]. This tradeoff in space comes at the cost of accuracy [16]. Our hashing scheme naturally requires only few bits, typically 5-9 (see Section 4.2), eliminating the need for trading accuracy for manageable space. We know from Theorem 2 that each hash function computation requires 1 s number of function calls to ISGREEN(r). If we can implement ISGREEN(r) in constant time, i.e O(1), then we can generate generate k independent hashes in total O(d + k s) time instead of O(dk) required by [13]. Note that O(d) is the time to read the input vector which cannot be avoided. Once the data is loaded into the memory, our procedure is actually O( k s) for computing k hashes, for all k ≥1. This can be a huge improvement as in many real scenarios 1 s ≪d 5 Before we jump into a constant time implementation of ISGREEN(r), we would like readers to note that there is a straightforward binary search algorithm for ISGREEN(r) in log d time. We consider d intervals [Mi, Mi + xi] for all i, such that xi , 0. Because of the nature of the problem, Mi−1 + xi−1 ≤Mi ∀i. Therefore, these intervals are disjoint and sorted. Therefore, given a random number r, determining if r ∈∪D i=1[Mi, Mi + xi] only needs binary search over d ranges. Thus, in expectation, we already have a scheme that generates k independent hashes in total O(d + k s log d) time improving over best known O(dk) required by [13] for exact unbiased sampling, whenever d ≫1 s. Algorithm 4 ComputeHashMaps (Once per dataset) input Mi’s, index =0, CompToM[0] =0 for i = 0 to D −1 do if i < D −1 then CompToM[i + 1] = Mi + CompToM[i] end if for j = 0 to Mi −1 do IntToComp[index] = i index++ end for end for RETURN CompToM[] and IntToComp[] We show that with some algorithmic tricks and few more data structures, we can implement ISGREEN(r) in constant time O(1). We need two global pre-computed hashmaps, IntToComp (Integer to Vector Component) and CompToM (Vector Component to M value). IntToComp is a hashmap that maps every integer between [0, M] to the associated components, i.e., all integers between [Mi, Mi+1] are mapped to i, because it is associated with ith component. CompToM maps every component of vectors i ∈ {1, 2, 3, ..., D} to its associated value Mi. The procedure for computing these hashmaps is straightforward and is summarized in Algorithm 4. It should be noted that these hash-maps computation is a one time pre-processing operation over the entire dataset having a negligible cost. Mi’s can be computed (estimated) while reading the data. Algorithm 5 ISGREEN(r) input r, x, Hashmaps IntToComp[] and CompToM[] from Algorithm 4. index = ⌈r⌉ i = IntToComp[index] Mi = CompToM[i] if r ≤Mi + xi then RETURN TRUE end if RETURN FALSE Using these two pre-computed hashmaps, the ISGREEN(r) methodology works as follows: We first compute the ceiling of r, i.e. ⌈r⌉, then we find the component i associated with r, i.e., r ∈[Mi, Mi+1], and the corresponding associated Mi using hashmaps IntToComp and CompToM. Finally, we return true if r ≤xi + Mi otherwise we return false. The main observation is that since we ensure that all Mi’s are Integers, for any real number r, if r ∈[Mi, Mi+1] then the same holds for ⌈r⌉, i.e., ⌈r⌉∈[Mi, Mi+1]. Hence we can work with hashmaps using ⌈r⌉as the key. The overall procedure is summarized in Algorithm 5. Note that our overall procedure is much simpler compared to Algorithm 1. We only need to generate random numbers followed by a simple condition check using two hash lookups. Our analysis shows that we have to repeat this only for small number of times. Compare this with the scheme of Ioffe where for every non-zero component of a vector we need to sample two Gamma variables followed by computing several expensive transformations including exponentials. We next demonstrate the benefits of our approach in practice. 4 Experiments In this section, we demonstrate that in real high-dimensional settings, our proposal provides significant speedup and requires less memory over existing methods. We also need to validate our theory that our scheme is unbiased and should be indistinguishable in accuracy with Ioffe’s method. Baselines: Ioffe’s method is the fastest known exact method in the literature, so it serves as our natural baseline. We also compare our method with biased unweighted approximations (see Algorithm 2) which capitalizes on recent success in fast unweighted minwise hashing [26, 27], we call it Fast-WDOPH (for Fast Weighted Densified One Permutation Hashing). Fast-WDOPH needs very long permutation, which is expensive. For efficiency, 6 Number of Hashes 10 20 30 40 50 Average Error 0 0.05 0.1 0.15 0.2 Sim=0.8 Proposed Fast-WDOPH Ioffe Number of Hashes 10 20 30 40 50 Average Error 0 0.05 0.1 0.15 0.2 0.25 Sim=0.72 Proposed Fast-WDOPH Ioffe Number of Hashes 10 20 30 40 50 Average Error 0 0.1 0.2 0.3 Sim=0.61 Proposed Fast-WDOPH Ioffe Number of Hashes 10 20 30 40 50 Average Error 0 0.1 0.2 0.3 Sim=0.56 Proposed Fast-WDOPH Ioffe Number of Hashes 10 20 30 40 50 Average Error 0 0.1 0.2 0.3 Sim=0.44 Proposed Fast-WDOPH Ioffe Number of Hashes 10 20 30 40 50 Average Error 0 0.1 0.2 0.3 0.4 Sim=0.27 Proposed Fast-WDOPH Ioffe Figure 2: Average Errors in Jaccard Similarity Estimation with the Number of Hash Values. Estimates are averaged over 200 repetitions. we implemented the permutation using fast 2-universal hashing which is always recommended [18]. Data non-zeros (d) Dim (D) Sparsity (s) Hist 737 768 0.081 Caltech101 95029 485640 0.024 Oxford 401879 580644 0.086 Table 1: Basic Statistics of the Datasets Datasets: Weighted Minwise sampling is commonly used for sketching image histograms [13]. We chose two popular publicly available vision dataset Caltech101 [9] and Oxford [19]. We used the standard publicly available Histogram of Oriented Gradient (HOG) codes [6], popular in vision task, to convert images into feature vectors. In addition, we also used random web images [29] and computed simple histograms of RGB values. We call this dataset as Hist. The statistics of these datasets is summarized in Table 1. These datasets cover a wide range of variations in terms of dimensionality, non-zeros and sparsity. 4.1 Comparing Estimation Accuracy Method Prop Ioffe FastWDOPH Hist 10ms 986ms 57ms Caltech101 57ms 87105ms 268ms Oxford 11ms 746120ms 959ms Table 2: Time taken in milliseconds (ms) to compute 500 hashes by different schemes. Our proposed scheme is significantly faster. In this section, we perform a sanity check experiment and compare the estimation accuracy with WMH. For this task we take 9 pairs of vectors from our datasets with varying level of similarities. For each of the pair (x, y), we generate k weighted minwise hashes hi(x) and hi(y) for i ∈{1, 2, .., k}, using the three competing schemes. We then compute the estimate of the Jaccard similarity J(x, y) using the formula 1 k Pk i=1 1{hi(x) = hi(y)} (See Equation 7). We compute the errors in the estimate as a function of k. To minimize the effect of randomization, we average the errors from 200 random repetitions with different seeds. We plot this average error with k = {1, 2, ..., 50} in Figure 2 for different similarity levels. We can clearly see from the plots that the accuracy of the proposed scheme is indistinguishable from Ioffe’s scheme. This is not surprising because both the schemes are unbiased and have the same theoretical distribution. This validates Theorem 1 The accuracy of Fast-WDOPH is inferior to that of the other two unbiased schemes and sometimes its performance is poor. This is because the weighted to unweighted reduction is biased and approximate. The bias of this reduction depends on the vector pairs under consideration, which can be unpredictable. 7 4.2 Speed Comparisons We compute the average time (in milliseconds) taken by the competing algorithms to compute 500 hashes of a given data vector for all the three datasets. Our experiments were coded in C# on Intel Xenon CPU with 256 GB RAM. Table 2 summarises the comparison. We do not include the data loading cost in these numbers and assume that the data is in the memory for all the three methodologies. Hist Caltech101 Oxford Mean Values 11.94 52.88 9.13 Hash Range [1,107] [1,487] [1,69] Bits Needed 7 9 7 Table 3: The range of the observed hash values, using the proposed scheme, along with the maximum bits needed per hash value. The mean hash values agrees with Theorem 2 We can clearly see tremendous speedup over Ioffe’s scheme. For Hist dataset with mere 768 nonzeros, our scheme is 100 times faster than Ioffe’s scheme and around 5 times faster than FastWDOPH approximation. While on caltech101 and Oxford datasets, which are high dimensional and dense datasets, our scheme can be 1500x to 60000x faster than Ioffe’s scheme, while it is around 5 to 100x times faster than Fast-WDOPH scheme. Dense datasets like Caltech101 and Oxford represent more realistic scenarios. These features are taken from real applications [6] and such level of sparsity and dimensionality are more common in practice. The results are not surprising because Ioffe’s scheme is very slow O(dk). Moreover, the constant are inside bigO is also large, because of complex transformations. Therefore, for datasets with high values of d (non-zeros) this scheme is very slow. Similar phenomena were observed in [13], that decreasing the non-zeros by ignoring non-frequent dimensions can be around 150 times faster. However, ignoring dimension looses accuracy. 4.3 Memory Comparisons Table 3 summarizes the range of the hash values and the maximum number of bits needed to encode these hash values without any bias. We can clearly see that the hash values, even for such high-dimensional datasets, only require 7-9 bits. This is a huge saving compared to existing hashing schemes which requires (32-64) bits [16]. Thus, our method leads to around 5-6 times savings in space. The mean values observed (Table 3) validate the formula in Theorem 2. 5 Discussions Theorem 2 shows that the quantity sx = PD i=1 xi PD i=1 mi determines the runtime. If sx is very very small then, although the running time is constant (independent of d or D), it can still make the algorithm unnecessarily slow. Note that for the algorithm to work we choose Mi to be the largest integer greater than the maximum possible value of co-ordinate i in the given dataset. If this integer gap is big then we unnecessarily increase the running time. Ideally, the best running time is obtained when the maximum value, is itself an integer, or is very close to its ceiling value. If all the values are integers, scaling up does not matter, as it does not change sx, but scaling down can make sx worse. Ideally we should scale, such that, α = arg maxα = PD i=1 αxi PD i=1⌈αmi⌉is maximized, where mi is the maximum value of co-ordinate i. 5.1 Very Sparse Datasets For very sparse datasets, the information is more or less in the sparsity pattern rather than in the magnitude [28]. Binarization of very sparse dataset is a common practice and densified one permutation hashing [26, 27] provably solves the problem in O(d + k). Nevertheless, for applications when the data is extremely sparse, and the magnitude of component seems crucial, binary approximations followed by densified one permutation hashing (Fast-DOPH) should be the preferred method. Ioeffe’s scheme is preferable, dues to its exactness nature, when number the number of non-zeros is of the order of k. 6 Acknowledgements This work is supported by Rice Faculty Initiative Award 2016-17. We would like to thank anonymous reviewers, Don Macmillen, and Ryan Moulton for feedbacks on the presentation of the paper. 8 References [1] R. J. Bayardo, Y. Ma, and R. Srikant. Scaling up all pairs similarity search. In WWW, pages 131–140, 2007. [2] A. Z. Broder. On the resemblance and containment of documents. In the Compression and Complexity of Sequences, pages 21–29, Positano, Italy, 1997. [3] A. Z. Broder. Filtering near-duplicate documents. In FUN, Isola d’Elba, Italy, 1998. [4] A. Z. Broder, S. C. Glassman, M. S. Manasse, and G. Zweig. Syntactic clustering of the web. In WWW, pages 1157 – 1166, Santa Clara, CA, 1997. [5] M. S. Charikar. Similarity estimation techniques from rounding algorithms. In STOC, pages 380–388, Montreal, Quebec, Canada, 2002. [6] N. Dalal and B. Triggs. Histograms of oriented gradients for human detection. In Computer Vision and Pattern Recognition, volume 1, pages 886–893. IEEE, 2005. [7] M. Datar, N. Immorlica, P. Indyk, and V. S. Mirrokn. Locality-sensitive hashing scheme based on p-stable distributions. In SCG, pages 253 – 262, Brooklyn, NY, 2004. [8] C. Dwork and A. Roth. The algorithmic foundations of differential privacy. [9] L. Fei-Fei, R. Fergus, and P. Perona. Learning generative visual models from few training examples: An incremental bayesian approach tested on 101 object categories. Computer Vision and Image Understanding, 106(1):59–70, 2007. [10] S. Gollapudi and R. Panigrahy. Exploiting asymmetry in hierarchical topic extraction. In Proceedings of the 15th ACM international conference on Information and knowledge management, pages 475–482. ACM, 2006. [11] B. Haeupler, M. Manasse, and K. Talwar. Consistent weighted sampling made fast, small, and easy. Technical report, arXiv:1410.4266, 2014. [12] P. Indyk. A small approximately min-wise independent family of hash functions. Journal of Algorithms, 38(1):84–90, 2001. [13] S. Ioffe. Improved consistent sampling, weighted minhash and L1 sketching. In ICDM, pages 246–255, Sydney, AU, 2010. [14] J. Kleinberg and E. Tardos. Approximation algorithms for classification problems with pairwise relationships: Metric labeling and Markov random fields. In FOCS, pages 14–23, New York, 1999. [15] P. Li. 0-bit consistent weighted sampling. In KDD, 2015. [16] P. Li and A. C. König. Theory and applications b-bit minwise hashing. Commun. ACM, 2011. [17] M. Manasse, F. McSherry, and K. Talwar. Consistent weighted sampling. Technical Report MSR-TR-2010-73, Microsoft Research, 2010. [18] M. Mitzenmacher and S. Vadhan. Why simple hash functions work: exploiting the entropy in a data stream. In Proceedings of the nineteenth annual ACM-SIAM symposium on Discrete algorithms, pages 746–755. Society for Industrial and Applied Mathematics, 2008. [19] J. Philbin, O. Chum, M. Isard, J. Sivic, and A. Zisserman. Object retrieval with large vocabularies and fast spatial matching. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2007. [20] M. P˘atra¸scu and M. Thorup. On the k-independence required by linear probing and minwise independence. In ICALP, pages 715–726, 2010. [21] A. Rahimi and B. Recht. Random features for large-scale kernel machines. In Advances in neural information processing systems, pages 1177–1184, 2007. [22] A. Rajaraman and J. Ullman. Mining of Massive Datasets. [23] Z. Rasheed and H. Rangwala. Mc-minh: Metagenome clustering using minwise based hashing. SIAM. [24] P. Sadosky, A. Shrivastava, M. Price, and R. C. Steorts. Blocking methods applied to casualty records from the syrian conflict. arXiv preprint arXiv:1510.07714, 2015. [25] A. Shrivastava. Probabilistic Hashing Techniques For Big Data. PhD thesis, Cornell University, 2015. [26] A. Shrivastava and P. Li. Densifying one permutation hashing via rotation for fast near neighbor search. In ICML, Beijing, China, 2014. [27] A. Shrivastava and P. Li. Improved densification of one permutation hashing. In UAI, Quebec, CA, 2014. [28] A. Shrivastava and P. Li. In defense of minhash over simhash. In Proceedings of the Seventeenth International Conference on Artificial Intelligence and Statistics, pages 886–894, 2014. [29] J. Wang, J. Li, D. Chan, and G. Wiederhold. Semantics-sensitive retrieval for digital picture libraries. D-Lib Magazine, 5(11), 1999. [30] Wikipedia. https://en.wikipedia.org/wiki/Rejection_sampling. 9 | 2016 | 442 |
6,375 | Cooperative Inverse Reinforcement Learning Dylan Hadfield-Menell∗ Anca Dragan Pieter Abbeel Stuart Russell Electrical Engineering and Computer Science University of California at Berkeley Berkeley, CA 94709 Abstract For an autonomous system to be helpful to humans and to pose no unwarranted risks, it needs to align its values with those of the humans in its environment in such a way that its actions contribute to the maximization of value for the humans. We propose a formal definition of the value alignment problem as cooperative inverse reinforcement learning (CIRL). A CIRL problem is a cooperative, partialinformation game with two agents, human and robot; both are rewarded according to the human’s reward function, but the robot does not initially know what this is. In contrast to classical IRL, where the human is assumed to act optimally in isolation, optimal CIRL solutions produce behaviors such as active teaching, active learning, and communicative actions that are more effective in achieving value alignment. We show that computing optimal joint policies in CIRL games can be reduced to solving a POMDP, prove that optimality in isolation is suboptimal in CIRL, and derive an approximate CIRL algorithm. 1 Introduction “If we use, to achieve our purposes, a mechanical agency with whose operation we cannot interfere effectively . . . we had better be quite sure that the purpose put into the machine is the purpose which we really desire.” So wrote Norbert Wiener (1960) in one of the earliest explanations of the problems that arise when a powerful autonomous system operates with an incorrect objective. This value alignment problem is far from trivial. Humans are prone to mis-stating their objectives, which can lead to unexpected implementations. In the myth of King Midas, the main character learns that wishing for ‘everything he touches to turn to gold’ leads to disaster. In a reinforcement learning context, Russell & Norvig (2010) describe a seemingly reasonable, but incorrect, reward function for a vacuum robot: if we reward the action of cleaning up dirt, the optimal policy causes the robot to repeatedly dump and clean up the same dirt. A solution to the value alignment problem has long-term implications for the future of AI and its relationship to humanity (Bostrom, 2014) and short-term utility for the design of usable AI systems. Giving robots the right objectives and enabling them to make the right trade-offs is crucial for self-driving cars, personal assistants, and human–robot interaction more broadly. The field of inverse reinforcement learning or IRL (Russell, 1998; Ng & Russell, 2000; Abbeel & Ng, 2004) is certainly relevant to the value alignment problem. An IRL algorithm infers the reward function of an agent from observations of the agent’s behavior, which is assumed to be optimal (or approximately so). One might imagine that IRL provides a simple solution to the value alignment problem: the robot observes human behavior, learns the human reward function, and behaves according to that function. This simple idea has two flaws. The first flaw is obvious: we don’t want the robot to adopt the human reward function as its own. For example, human behavior (especially in the morning) often conveys a desire for coffee, and the robot can learn this with IRL, but we don’t want the robot to want coffee! This flaw is easily fixed: we need to formulate the value ∗{dhm, anca, pabbeel, russell}@cs.berkeley.edu 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. alignment problem so that the robot always has the fixed objective of optimizing reward for the human, and becomes better able to do so as it learns what the human reward function is. The second flaw is less obvious, and less easy to fix. IRL assumes that observed behavior is optimal in the sense that it accomplishes a given task efficiently. This precludes a variety of useful teaching behaviors. For example, efficiently making a cup of coffee, while the robot is a passive observer, is a inefficient way to teach a robot to get coffee. Instead, the human should perhaps explain the steps in coffee preparation and show the robot where the backup coffee supplies are kept and what do if the coffee pot is left on the heating plate too long, while the robot might ask what the button with the puffy steam symbol is for and try its hand at coffee making with guidance from the human, even if the first results are undrinkable. None of these things fit in with the standard IRL framework. Cooperative inverse reinforcement learning. We propose, therefore, that value alignment should be formulated as a cooperative and interactive reward maximization process. More precisely, we define a cooperative inverse reinforcement learning (CIRL) game as a two-player game of partial information, in which the “human”, H, knows the reward function (represented by a generalized parameter θ), while the “robot”, R, does not; the robot’s payoff is exactly the human’s actual reward. Optimal solutions to this game maximize human reward; we show that solutions may involve active instruction by the human and active learning by the robot. Reduction to POMDP and Sufficient Statistics. As one might expect, the structure of CIRL games is such that they admit more efficient solution algorithms than are possible for general partialinformation games. Let (πH, πR) be a pair of policies for human and robot, each depending, in general, on the complete history of observations and actions. A policy pair yields an expected sum of rewards for each player. CIRL games are cooperative, so there is a well-defined optimal policy pair that maximizes value.2 In Section 3 we reduce the problem of computing an optimal policy pair to the solution of a (single-agent) POMDP. This shows that the robot’s posterior over θ is a sufficient statistic, in the sense that there are optimal policy pairs in which the robot’s behavior depends only on this statistic. Moreover, the complexity of solving the POMDP is exponentially lower than the NEXP-hard bound that (Bernstein et al., 2000) obtained by reducing a CIRL game to a general Dec-POMDP. Apprenticeship Learning and Suboptimality of IRL-Like Solutions. In Section 3.3 we model apprenticeship learning (Abbeel & Ng, 2004) as a two-phase CIRL game. In the first phase, the learning phase, both H and R can take actions and this lets R learn about θ. In the second phase, the deployment phase, R uses what it learned to maximize reward (without supervision from H). We show that classic IRL falls out as the best-response policy for R under the assumption that the human’s policy is “demonstration by expert” (DBE), i.e., acting optimally in isolation as if no robot exists. But we show also that this DBE/IRL policy pair is not, in general, optimal: even if the robot expects expert behavior, demonstrating expert behavior is not the best way to teach that algorithm. We give an algorithm that approximately computes H’s best response when R is running IRL under the assumption that rewards are linear in θ and state features. Section 4 compares this best-response policy with the DBE policy in an example game and provides empirical confirmation that the bestresponse policy, which turns out to “teach” R about the value landscape of the problem, is better than DBE. Thus, designers of apprenticeship learning systems should expect that users will violate the assumption of expert demonstrations in order to better communicate information about the objective. 2 Related Work Our proposed model shares aspects with a variety of existing models. We divide the related work into three categories: inverse reinforcement learning, optimal teaching, and principal–agent models. Inverse Reinforcement Learning. Ng & Russell (2000) define inverse reinforcement learning (IRL) as follows: “Given measurements of an [actor]’s behavior over time. . . . Determine the reward function being optimized.” The key assumption IRL makes is that the observed behavior is optimal in the sense that the observed trajectory maximizes the sum of rewards. We call this the demonstration-by-expert (DBE) assumption. One of our contributions is to prove that this may be suboptimal behavior in a CIRL game, as H may choose to accept less reward on a particular action in order to convey more information to R. In CIRL the DBE assumption prescribes a fixed policy 2A coordination problem of the type described in Boutilier (1999) arises if there are multiple optimal policy pairs; we defer this issue to future work. 2 Ground Truth Expert Demonstration Instructive Demonstration Figure 1: The difference between demonstration-by-expert and instructive demonstration in the mobile robot navigation problem from Section 4. Left: The ground truth reward function. Lighter grid cells indicates areas of higher reward. Middle: The demonstration trajectory generated by the expert policy, superimposed on the maximum a-posteriori reward function the robot infers. The robot successfully learns where the maximum reward is, but little else. Right: An instructive demonstration generated by the algorithm in Section 3.4 superimposed on the maximum a-posteriori reward function that the robot infers. This demonstration highlights both points of high reward and so the robot learns a better estimate of the reward. for H. As a result, many IRL algorithms can be derived as state estimation for a best response to different πH, where the state includes the unobserved reward parametrization θ. Ng & Russell (2000), Abbeel & Ng (2004), and Ratliff et al. (2006) compute constraints that characterize the set of reward functions so that the observed behavior maximizes reward. In general, there will be many reward functions consistent with this constraint. They use a max-margin heuristic to select a single reward function from this set as their estimate. In CIRL, the constraints they compute characterize R’s belief about θ under the DBE assumption. Ramachandran & Amir (2007) and Ziebart et al. (2008) consider the case where πH is “noisily expert,” i.e., πHis a Boltzmann distribution where actions or trajectories are selected in proportion to the exponent of their value. Ramachandran & Amir (2007) adopt a Bayesian approach and place an explicit prior on rewards. Ziebart et al. (2008) places a prior on reward functions indirectly by assuming a uniform prior over trajectories. In our model, these assumptions are variations of DBE and both implement state estimation for a best response to the appropriate fixed H. Natarajan et al. (2010) introduce an extension to IRL where R observes multiple actors that cooperate to maximize a common reward function. This is a different type of cooperation than we consider, as the reward function is common knowledge and R is a passive observer. Waugh et al. (2011) and Kuleshov & Schrijvers (2015) consider the problem of inferring payoffs from observed behavior in a general (i.e., non-cooperative) game given observed behavior. It would be interesting to consider an analogous extension to CIRL, akin to mechanism design, in which R tries to maximize collective utility for a group of Hs that may have competing objectives. Fern et al. (2014) consider a hidden-goal MDP, a special case of a POMDP where the goal is an unobserved part of the state. This can be considered a special case of CIRL, where θ encodes a particular goal state. The frameworks share the idea that R helps H. The key difference between the models lies in the treatment of the human (the agent in their terminology). Fern et al. (2014) model the human as part of the environment. In contrast, we treat H as an actor in a decision problem that both actors collectively solve. This is crucial to modeling the human’s incentive to teach. Optimal Teaching. Because CIRL incentivizes the human to teach, as opposed to maximizing reward in isolation, our work is related to optimal teaching: finding examples that optimally train a learner (Balbach & Zeugmann, 2009; Goldman et al., 1993; Goldman & Kearns, 1995). The key difference is that efficient learning is the objective of optimal teaching, while it emerges as a property of optimal equilibrium behavior in CIRL. Cakmak & Lopes (2012) consider an application of optimal teaching where the goal is to teach the learner the reward function for an MDP. The teacher gets to pick initial states from which an expert executes the reward-maximizing trajectory. The learner uses IRL to infer the reward function, and the teacher picks initial states to minimize the learner’s uncertainty. In CIRL, this approach can be characterized as an approximate algorithm for H that greedily minimizes the entropy of R’s belief. Beyond teaching, several models focus on taking actions that convey some underlying state, not necessarily a reward function. Examples include finding a motion that best communicates an agent’s intention (Dragan & Srinivasa, 2013), or finding a natural language utterance that best communicates 3 a particular grounding (Golland et al., 2010). All of these approaches model the observer’s inference process and compute actions (motion or speech) that maximize the probability an observer infers the correct hypothesis or goal. Our approximate solution to CIRL is analogous to these approaches, in that we compute actions that are informative of the correct reward function. Principal–agent models. Value alignment problems are not intrinsic to artificial agents. Kerr (1975) describes a wide variety of misaligned incentives in the aptly titled “On the folly of rewarding A, while hoping for B.” In economics, this is known as the principal–agent problem: the principal (e.g., the employer) specifies incentives so that an agent (e.g., the employee) maximizes the principal’s profit (Jensen & Meckling, 1976). Principal–agent models study the problem of generating appropriate incentives in a non-cooperative setting with asymmetric information. In this setting, misalignment arises because the agents that economists model are people and intrinsically have their own desires. In AI, misalignment arises entirely from the information asymmetry between the principal and the agent; if we could characterize the correct reward function, we could program it into an artificial agent. Gibbons (1998) provides a useful survey of principal–agent models and their applications. 3 Cooperative Inverse Reinforcement Learning This section formulates CIRL as a two-player Markov game with identical payoffs, reduces the problem of computing an optimal policy pair for a CIRL game to solving a POMDP, and characterizes apprenticeship learning as a subclass of CIRL games. 3.1 CIRL Formulation Definition 1. A cooperative inverse reinforcement learning (CIRL) game M is a two-player Markov game with identical payoffs between a human or principal, H, and a robot or agent, R. The game is described by a tuple, M = ⟨S, {AH, AR}, T(·|·, ·, ·), {Θ, R(·, ·, ·; ·)}, P0(·, ·), γ⟩, with the following definitions: S a set of world states: s ∈S. AH a set of actions for H: aH ∈AH. AR a set of actions for R: aR ∈AR. T(·|·, ·, ·) a conditional distribution on the next world state, given previous state and action for both agents: T(s′|s, aH, aR). Θ a set of possible static reward parameters, only observed by H: θ ∈Θ. R(·, ·, ·; ·) a parameterized reward function that maps world states, joint actions, and reward parameters to real numbers. R : S × AH × AR × Θ →R. P0(·, ·) a distribution over the initial state, represented as tuples: P0(s0, θ) γ a discount factor: γ ∈[0, 1]. We write the reward for a state–parameter pair as R(s, aH, aR; θ) to distinguish the static reward parameters θ from the changing world state s. The game proceeds as follows. First, the initial state, a tuple (s, θ), is sampled from P0. H observes θ, but R does not. This observation model captures the notion that only the human knows the reward function, while both actors know a prior distribution over possible reward functions. At each timestep t, H and R observe the current state st and select their actions aH t , aR t . Both actors receive reward rt = R(st, aH t , aR t ; θ) and observe each other’s action selection. A state for the next timestep is sampled from the transition distribution, st+1 ∼PT (s′|st, aH t , aR t ), and the process repeats. Behavior in a CIRL game is defined by a pair of policies, (πH, πR), that determine action selection for H and R respectively. In general, these policies can be arbitrary functions of their observation histories; πH : AH × AR × S ∗× Θ →AH, πR : AH × AR × S ∗→AR. The optimal joint policy is the policy that maximizes value. The value of a state is the expected sum of discounted rewards under the initial distribution of reward parameters and world states. Remark 1. A key property of CIRL is that the human and the robot get rewards determined by the same reward function. This incentivizes the human to teach and the robot to learn without explicitly encoding these as objectives of the actors. 4 3.2 Structural Results for Computing Optimal Policy Pairs The analogue in CIRL to computing an optimal policy for an MDP is the problem of computing an optimal policy pair. This is a pair of policies that maximizes the expected sum of discounted rewards. This is not the same as ‘solving’ a CIRL game, as a real world implementation of a CIRL agent must account for coordination problems and strategic uncertainty (Boutilier, 1999). The optimal policy pair represents the best H and R can do if they can coordinate perfectly before H observes θ. Computing an optimal joint policy for a cooperative game is the solution to a decentralized-partially observed Markov decision process (Dec-POMDP). Unfortunately, Dec-POMDPs are NEXP-complete (Bernstein et al., 2000) so general Dec-POMDP algorithms have a computational complexity that is doubly exponential. Fortunately, CIRL games have special structure that reduces this complexity. Nayyar et al. (2013) shows that a Dec-POMDP can be reduced to a coordination-POMDP. The actor in this POMDP is a coordinator that observes all common observations and specifies a policy for each actor. These policies map each actor’s private information to an action. The structure of a CIRL game implies that the private information is limited to H’s initial observation of θ. This allows the reduction to a coordination-POMDP to preserve the size of the (hidden) state space, making the problem easier. Theorem 1. Let M be an arbitrary CIRL game with state space S and reward space Θ. There exists a (single-actor) POMDP MC with (hidden) state space SC such that |SC| = |S| · |Θ| and, for any policy pair in M, there is a policy in MC that achieves the same sum of discounted rewards. Theorem proofs can be found in the supplementary material. An immediate consequence of this result is that R’s belief about θ is a sufficient statistic for optimal behavior. Corollary 1. Let M be a CIRL game. There exists an optimal policy pair (πH∗, πR∗) that only depends on the current state and R’s belief. Remark 2. In a general Dec-POMDP, the hidden state for the coordinator-POMDP includes each actor’s history of observations. In CIRL, θ is the only private information so we get an exponential decrease in the complexity of the reduced problem. This allows one to apply general POMDP algorithms to compute optimal joint policies in CIRL. It is important to note that the reduced problem may still be very challenging. POMDPs are difficult in their own right and the reduced problem still has a much larger action space. That being said, this reduction is still useful in that it characterizes optimal joint policy computation for CIRL as significantly easier than Dec-POMDPs. Furthermore, this theorem can be used to justify approximate methods (e.g., iterated best response) that only depend on R’s belief state. 3.3 Apprenticeship Learning as a Subclass of CIRL Games A common paradigm for robot learning from humans is apprenticeship learning. In this paradigm, a human gives demonstrations to a robot of a sample task and the robot is asked to imitate it in a subsequent task. In what follows, we formulate apprenticeship learning as turn-based CIRL with a learning phase and a deployment phase. We characterize IRL as the best response (i.e., the policy that maximizes reward given a fixed policy for the other player) to a demonstration-by-expert policy for H. We also show that this policy is, in general, not part of an optimal joint policy and so IRL is generally a suboptimal approach to apprenticeship learning. Definition 2. (ACIRL) An apprenticeship cooperative inverse reinforcement learning (ACIRL) game is a turn-based CIRL game with two phases: a learning phase where the human and the robot take turns acting, and a deployment phase, where the robot acts independently. Example. Consider an example apprenticeship task where R needs to help H make office supplies. H and R can make paperclips and staples and the unobserved θ describe H’s preference for paperclips vs staples. We model the problem as an ACIRL game in which the learning and deployment phase each consist of an individual action. The world state in this problem is a tuple (ps, qs, t) where ps and qs respectively represent the number of paperclips and staples H owns. t is the round number. An action is a tuple (pa, qa) that produces pa paperclips and qa staples. The human can make 2 items total: AH = {(0, 2), (1, 1), (2, 0)}. The robot has different capabilities. It can make 50 units of each item or it can choose to make 90 of a single item: AR = {(0, 90), (50, 50), (90, 0)}. We let Θ = [0, 1] and define R so that θ indicates the relative preference between paperclips and staples:R(s, (pa, qa); θ) = θpa + (1 −θ)qa. R’s action is ignored when t = 0 and H’s is ignored when t = 1. At t = 2, the game is over, so the game transitions to a sink state, (0, 0, 2). 5 Deployment phase — maximize mean reward estimate. It is simplest to analyze the deployment phase first. R is the only actor in this phase so it get no more observations of its reward. We have shown that R’s belief about θ is a sufficient statistic for the optimal policy. This belief about θ induces a distribution over MDPs. A straightforward extension of a result due to Ramachandran & Amir (2007) shows that R’s optimal deployment policy maximizes reward for the mean reward function. Theorem 2. Let M be an ACIRL game. In the deployment phase, the optimal policy for R maximizes reward in the MDP induced by the mean θ from R’s belief. In our example, suppose that πH selects (0, 2) if θ ∈[0, 1 3), (1, 1) if θ ∈[ 1 3, 2 3] and (2, 0) otherwise. R begins with a uniform prior on θ so observing, e.g., aH = (0, 2) leads to a posterior distribution that is uniform on [0, 1 3). Theorem 2 shows that the optimal action maximizes reward for the mean θ so an optimal R behaves as though θ = 1 6 during the deployment phase. Learning phase — expert demonstrations are not optimal. A wide variety of apprenticeship learning approaches assume that demonstrations are given by an expert. We say that H satisfies the demonstration-by-expert (DBE) assumption in ACIRL if she greedily maximizes immediate reward on her turn. This is an ‘expert’ demonstration because it demonstrates a reward maximizing action but does not account for that action’s impact on R’s belief. We let πE represent the DBE policy. Theorem 2 enables us to characterize the best response for R when πH = πE: use IRL to compute the posterior over θ during the learning phase and then act to maximize reward under the mean θ in the deployment phase. We can also analyze the DBE assumption itself. In particular, we show that πE is not H’s best response when πR is a best response to πE. Theorem 3. There exist ACIRL games where the best-response for H to πR violates the expert demonstrator assumption. In other words, if br(π) is the best response to π, then br(br(πE)) ̸= πE. The supplementary material proves this theorem by computing the optimal equilibrium for our example. In that equilibrium, H selects (1, 1) if θ ∈[ 41 92, 51 92]. In contrast, πE only chooses (1, 1) if θ = 0.5. The change arises because there are situations (e.g., θ = 0.49) where the immediate loss of reward to H is worth the improvement in R’s estimate of θ. Remark 3. We should expect experienced users of apprenticeship learning systems to present demonstrations optimized for fast learning rather than demonstrations that maximize reward. Crucially, the demonstrator is incentivized to deviate from R’s assumptions. This has implications for the design and analysis of apprenticeship systems in robotics. Inaccurate assumptions about user behavior are notorious for exposing bugs in software systems (see, e.g., Leveson & Turner (1993)). 3.4 Generating Instructive Demonstrations Now, we consider the problem of computing H’s best response when R uses IRL as a state estimator. For our toy example, we computed solutions exhaustively, for realistic problems we need a more efficient approach. Section 3.2 shows that this can be reduced to an POMDP where the state is a tuple of world state, reward parameters, and R’s belief. While this is easier than solving a general Dec-POMDP, it is a computational challenge. If we restrict our attention to the case of linear reward functions we can develop an efficient algorithm to compute an approximate best response. Specifically, we consider the case where the reward for a state (s, θ) is defined as a linear combination of state features for some feature function φ : R(s, aH, aR; θ) = φ(s)⊤θ. Standard results from the IRL literature show that policies with the same expected feature counts have the same value (Abbeel & Ng, 2004). Combined with Theorem 2, this implies that the optimal πR under the DBE assumption computes a policy that matches the observed feature counts from the learning phase. This suggests a simple approximation scheme. To compute a demonstration trajectory τ H, first compute the feature counts R would observe in expectation from the true θ and then select actions that maximize similarity to these target features. If φθ are the expected feature counts induced by θ then this scheme amounts to the following decision rule: τ H ←argmax τ φ(τ)⊤θ −η||φθ −φ(τ)||2. (1) This rule selects a trajectory that trades off between the sum of rewards φ(τ)⊤θ and the feature dissimilarity ||φθ −φ(τ)||2. Note that this is generally distinct from the action selected by the demonstration-by-expert policy. The goal is to match the expected sum of features under a distribution of trajectories with the sum of features from a single trajectory. The correct measure of feature 6 Regret KL ||θGT −ˆθ||2 0 3 6 9 12 num-features = 3 br πE Regret KL ||θGT −ˆθ||2 0 4 8 12 16 num-features = 10 br πE 10−3 10−1 101 λ 0 0.25 0.5 0.75 1 Regret Regret for br Figure 2: Left, Middle: Comparison of ‘expert’ demonstration (πE) with ‘instructive’ demonstration (br). Lower numbers are better. Using the best response causes R to infer a better distribution over θ so it does a better job of maximizing reward. Right: The regret of the instructive demonstration policy as a function of how optimal R expects H to be. λ = 0 corresponds to a robot that expects purely random behavior and λ = ∞ corresponds to a robot that expects optimal behavior. Regret is minimized for an intermediate value of λ: if λ is too small, then R learns nothing from its observations; if λ is too large, then R expects many values of θ to lead to the same trajectory so H has no way to differentiate those reward functions. similarity is regret: the difference between the reward R would collect if it knew the true θ and the reward R actually collects using the inferred θ. Computing this similarity is expensive, so we use an ℓ2 norm as a proxy measure of similarity. 4 Experiments 4.1 Cooperative Learning for Mobile Robot Navigation Our experimental domain is a 2D navigation problem on a discrete grid. In the learning phase of the game, H teleoperates a trajectory while R observes. In the deployment phase, R is placed in a random state and given control of the robot. We use a finite horizon H, and let the first H 2 timesteps be the learning phase. There are Nφ state features defined as radial basis functions where the centers are common knowledge. Rewards are linear in these features and θ. The initial world state is in the middle of the map. We use a uniform distribution on [−1, 1]Nφ for the prior on θ. Actions move in one of the four cardinal directions {N, S, E, W} and there is an additional no-op ∅that each actor executes deterministically on the other agent’s turn. Figure 1 shows an example comparison between demonstration-by-expert and the approximate best response policy in Section 3.4. The leftmost image is the ground truth reward function. Next to it are demonstration trajectories produce by these two policies. Each path is superimposed on the maximum a-posteriori reward function the robot infers from the demonstration. We can see that the demonstration-by-expert policy immediately goes to the highest reward and stays there. In contrast, the best response policy moves to both areas of high reward. The robot reward function the robot infers from the best response demonstration is much more representative of the true reward function, when compared with the reward function it infers from demonstration-by-expert. 4.2 Demonstration-by-Expert vs Best Responder Hypothesis. When R plays an IRL algorithm that matches features, H prefers the best response policy from Section 3.4 to πE: the best response policy will significantly outperform the DBE policy. Manipulated Variables. Our experiment consists of 2 factors: H-policy and num-features. We make the assumption that R uses an IRL algorithm to compute its estimate of θ during learning and maximizes reward under this estimate during deployment. We use Maximum-Entropy IRL (Ziebart et al., 2008) to implement R’s policy. H-policy varies H’s strategy πHand has two levels: demonstration-by-expert (πE) and best-responder (br). In the πE level H maximizes reward during the demonstration. In the br level H uses the approximate algorithm from Section 3.4 to compute an approximate best response to πR. The trade-off between reward and communication η is set by cross-validation before the game begins. The num-features factor varies the dimensionality of φacross two levels: 3 features and 10 features. We do this to test whether and how the difference between experts and best-responders is affected by dimensionality. We use a factorial design that leads to 4 distinct conditions. We test each condition against a random sample of N = 500 different reward parameters. We use a within-subjects design with respect to the the H-policy factor so the same reward parameters are tested for πE and br. 7 Dependent Measures. We use the regret with respect to a fully-observed setting where the robot knows the ground truth θ as a measure of performance. We let ˆθ be the robot’s estimate of the reward parameters and let θGT be the ground truth reward parameters. The primary measure is the regret of R’s policy: the difference between the value of the policy that maximizes the inferred reward ˆθ and the value of the policy that maximizes the true reward θGT . We also use two secondary measures. The first is the KL-divergence between the maximum-entropy trajectory distribution induced by ˆθ and the maximum-entropy trajectory distribution induced by θ. Finally, we use the ℓ2-norm between the vector or rewards defined by ˆθ and the vector induced by θGT . Results. There was relatively little correlation between the measures (Cronbach’s α of .47), so we ran a factorial repeated measures ANOVA for each measure. Across all measures, we found a significant effect for H-policy, with br outperforming πE on all measures as we hypothesized (all with F > 962, p < .0001). We did find an interaction effect with num-features for KL-divergence and the ℓ2-norm of the reward vector but post-hoc Tukey HSD showed br to always outperform πE. The interaction effect arises because the gap between the two levels of H-policy is larger with fewer reward parameters; we interpret this as evidence that num-features = 3 is an easier teaching problem for H. Figure 2 (Left, Middle) shows the dependent measures from our experiment. 4.3 Varying R’s Expectations Maximum-Entropy IRL includes a free parameter λ that controls how optimal R expects H to behave. If λ = 0, R will update its belief as if H’s observed behavior is independent of her preferences θ. If λ = ∞, R will update its belief as if H’s behavior is exactly optimal. We ran a followup experiment to determine how varying λ changes the regret of the br policy. Changing λ changes the forward model in R’s belief update: the mapping R hypothesizes between a given reward parameter θ and the observed feature counts φθ. This mapping is many-to-one for extreme values of λ. λ ≈0 means that all values of θ lead to the same expected feature counts because trajectories are chosen uniformly at random. Alternatively, λ >> 0 means that almost all probability mass falls on the optimal trajectory and many values of θ will lead to the same optimal trajectory. This suggests that it is easier for H to differentiate different values of θ if R assumes she is noisily optimal, but only up until a maximum noise level. Figure 2 plots regret as a function of λ and supports this analysis: H has less regret for intermediate values of λ. 5 Conclusion and Future Work In this work, we presented a game-theoretic model for cooperative learning, CIRL. Key to this model is that the robot knows that it is in a shared environment and is attempting to maximize the human’s reward (as opposed to estimating the human’s reward function and adopting it as its own). This leads to cooperative learning behavior and provides a framework in which to design HRI algorithms and analyze the incentives of both actors in a reward learning environment. We reduced the problem of computing an optimal policy pair to solving a POMDP. This is a useful theoretical tool and can be used to design new algorithms, but it is clear that optimal policy pairs are only part of the story. In particular, when it performs a centralized computation, the reduction assumes that we can effectively program both actors to follow a set coordination policy. This is clearly infeasible in reality, although it may nonetheless be helpful in training humans to be better teachers. An important avenue for future research will be to consider the coordination problem: the process by which two independent actors arrive at policies that are mutual best responses. Returning to Wiener’s warning, we believe that the best solution is not to put a specific purpose into the machine at all, but instead to design machines that provably converge to the right purpose as they go along. Acknowledgments This work was supported by the DARPA Simplifying Complexity in Scientific Discovery (SIMPLEX) program, the Berkeley Deep Drive Center, the Center for Human Compatible AI, the Future of Life Institute, and the Defense Sciences Office contract N66001-15-2-4048. Dylan Hadfield-Menell is also supported by a NSF Graduate Research Fellowship. 8 References Abbeel, P and Ng, A. Apprenticeship learning via inverse reinforcement learning. In ICML, 2004. Balbach, F and Zeugmann, T. Recent developments in algorithmic teaching. In Language and Automata Theory and Applications. Springer, 2009. Bernstein, D, Zilberstein, S, and Immerman, N. The complexity of decentralized control of Markov decision processes. In UAI, 2000. Bostrom, N. Superintelligence: Paths, dangers, strategies. Oxford, 2014. Boutilier, Craig. Sequential optimality and coordination in multiagent systems. In IJCAI, volume 99, pp. 478–485, 1999. Cakmak, M and Lopes, M. Algorithmic and human teaching of sequential decision tasks. In AAAI, 2012. Dragan, A and Srinivasa, S. Generating legible motion. In Robotics: Science and Systems, 2013. Fern, A, Natarajan, S, Judah, K, and Tadepalli, P. A decision-theoretic model of assistance. JAIR, 50 (1):71–104, 2014. Gibbons, R. Incentives in organizations. Technical report, National Bureau of Economic Research, 1998. Goldman, S and Kearns, M. On the complexity of teaching. Journal of Computer and System Sciences, 50(1):20–31, 1995. Goldman, S, Rivest, R, and Schapire, R. Learning binary relations and total orders. SIAM Journal on Computing, 22(5):1006–1034, 1993. Golland, D, Liang, P, and Klein, D. A game-theoretic approach to generating spatial descriptions. In EMNLP, pp. 410–419, 2010. Jensen, M and Meckling, W. Theory of the firm: Managerial behavior, agency costs and ownership structure. Journal of Financial Economics, 3(4):305–360, 1976. Kerr, S. On the folly of rewarding A, while hoping for B. Academy of Management Journal, 18(4): 769–783, 1975. Kuleshov, V and Schrijvers, O. Inverse game theory. Web and Internet Economics, 2015. Leveson, N and Turner, C. An investigation of the Therac-25 accidents. IEEE Computer, 26(7): 18–41, 1993. Natarajan, S, Kunapuli, G, Judah, K, Tadepalli, P, and Kersting, Kand Shavlik, J. Multi-agent inverse reinforcement learning. In Int’l Conference on Machine Learning and Applications, 2010. Nayyar, A, Mahajan, A, and Teneketzis, D. Decentralized stochastic control with partial history sharing: A common information approach. IEEE Transactions on Automatic Control, 58(7): 1644–1658, 2013. Ng, A and Russell, S. Algorithms for inverse reinforcement learning. In ICML, 2000. Ramachandran, D and Amir, E. Bayesian inverse reinforcement learning. In IJCAI, 2007. Ratliff, N, Bagnell, J, and Zinkevich, M. Maximum margin planning. In ICML, 2006. Russell, S. and Norvig, P. Artificial Intelligence. Pearson, 2010. Russell, Stuart J. Learning agents for uncertain environments (extended abstract). In COLT, 1998. Waugh, K, Ziebart, B, and Bagnell, J. Computational rationalization: The inverse equilibrium problem. In ICML, 2011. Wiener, N. Some moral and technical consequences of automation. Science, 131, 1960. Ziebart, B, Maas, A, Bagnell, J, and Dey, A. Maximum entropy inverse reinforcement learning. In AAAI, 2008. 9 | 2016 | 443 |
6,376 | Safe and efficient off-policy reinforcement learning R´emi Munos munos@google.com Google DeepMind Thomas Stepleton stepleton@google.com Google DeepMind Anna Harutyunyan anna.harutyunyan@vub.ac.be Vrije Universiteit Brussel Marc G. Bellemare bellemare@google.com Google DeepMind Abstract In this work, we take a fresh look at some old and new algorithms for off-policy, return-based reinforcement learning. Expressing these in a common form, we derive a novel algorithm, Retrace(λ), with three desired properties: (1) it has low variance; (2) it safely uses samples collected from any behaviour policy, whatever its degree of “off-policyness”; and (3) it is efficient as it makes the best use of samples collected from near on-policy behaviour policies. We analyze the contractive nature of the related operator under both off-policy policy evaluation and control settings and derive online sample-based algorithms. We believe this is the first return-based off-policy control algorithm converging a.s. to Q∗without the GLIE assumption (Greedy in the Limit with Infinite Exploration). As a corollary, we prove the convergence of Watkins’ Q(λ), which was an open problem since 1989. We illustrate the benefits of Retrace(λ) on a standard suite of Atari 2600 games. One fundamental trade-off in reinforcement learning lies in the definition of the update target: should one estimate Monte Carlo returns or bootstrap from an existing Q-function? Return-based methods (where return refers to the sum of discounted rewards t γtrt) offer some advantages over value bootstrap methods: they are better behaved when combined with function approximation, and quickly propagate the fruits of exploration (Sutton, 1996). On the other hand, value bootstrap methods are more readily applied to off-policy data, a common use case. In this paper we show that learning from returns need not be at cross-purposes with off-policy learning. We start from the recent work of Harutyunyan et al. (2016), who show that naive off-policy policy evaluation, without correcting for the “off-policyness” of a trajectory, still converges to the desired Qπ value function provided the behavior µ and target π policies are not too far apart (the maximum allowed distance depends on the λ parameter). Their Qπ(λ) algorithm learns from trajectories generated by µ simply by summing discounted off-policy corrected rewards at each time step. Unfortunately, the assumption that µ and π are close is restrictive, as well as difficult to uphold in the control case, where the target policy is greedy with respect to the current Q-function. In that sense this algorithm is not safe: it does not handle the case of arbitrary “off-policyness”. Alternatively, the Tree-backup (TB(λ)) algorithm (Precup et al., 2000) tolerates arbitrary target/behavior discrepancies by scaling information (here called traces) from future temporal differences by the product of target policy probabilities. TB(λ) is not efficient in the “near on-policy” case (similar µ and π), though, as traces may be cut prematurely, blocking learning from full returns. In this work, we express several off-policy, return-based algorithms in a common form. From this we derive an improved algorithm, Retrace(λ), which is both safe and efficient, enjoying convergence guarantees for off-policy policy evaluation and – more importantly – for the control setting. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Retrace(λ) can learn from full returns retrieved from past policy data, as in the context of experience replay (Lin, 1993), which has returned to favour with advances in deep reinforcement learning (Mnih et al., 2015; Schaul et al., 2016). Off-policy learning is also desirable for exploration, since it allows the agent to deviate from the target policy currently under evaluation. To the best of our knowledge, this is the first online return-based off-policy control algorithm which does not require the GLIE (Greedy in the Limit with Infinite Exploration) assumption (Singh et al., 2000). In addition, we provide as a corollary the first proof of convergence of Watkins’ Q(λ) (see, e.g., Watkins, 1989; Sutton and Barto, 1998). Finally, we illustrate the significance of Retrace(λ) in a deep learning setting by applying it to the suite of Atari 2600 games provided by the Arcade Learning Environment (Bellemare et al., 2013). 1 Notation We consider an agent interacting with a Markov Decision Process (X, A, γ, P, r). X is a finite state space, A the action space, γ ∈[0, 1) the discount factor, P the transition function mapping stateaction pairs (x, a) ∈X × A to distributions over X, and r : X × A →[−RMAX, RMAX] is the reward function. For notational simplicity we will consider a finite action space, but the case of infinite – possibly continuous – action space can be handled by the Retrace(λ) algorithm as well. A policy π is a mapping from X to a distribution over A. A Q-function Q maps each state-action pair (x, a) to a value in R; in particular, the reward r is a Q-function. For a policy π we define the operator P π: (P πQ)(x, a) := x∈X a∈A P(x | x, a)π(a | x)Q(x, a). The value function for a policy π, Qπ, describes the expected discounted sum of rewards associated with following π from a given state-action pair. Using operator notation, we write this as Qπ := t≥0 γt(P π)tr. (1) The Bellman operator T π for a policy π is defined as T πQ := r + γP πQ and its fixed point is Qπ, i.e. T πQπ = Qπ = (I −γP π)−1r. The Bellman optimality operator introduces a maximization over the set of policies: T Q := r + γ max π P πQ. (2) Its fixed point is Q∗, the unique optimal value function (Puterman, 1994). It is this quantity that we will seek to obtain when we talk about the “control setting”. Return-based Operators: The λ-return extension (Sutton, 1988) of the Bellman operators considers exponentially weighted sums of n-steps returns: T π λ Q := (1 −λ) n≥0 λn (T π)n+1Q = Q + (I −λγP π)−1(T πQ −Q), where T πQ−Q is the Bellman residual of Q for policy π. Examination of the above shows that Qπ is also the fixed point of T π λ . At one extreme (λ = 0) we have the Bellman operator T π λ=0Q = T πQ, while at the other (λ = 1) we have the policy evaluation operator T π λ=1Q = Qπ which can be estimated using Monte Carlo methods (Sutton and Barto, 1998). Intermediate values of λ trade off estimation bias with sample variance (Kearns and Singh, 2000). We seek to evaluate a target policy π using trajectories drawn from a behaviour policy µ. If π = µ, we are on-policy; otherwise, we are off-policy. We will consider trajectories of the form: x0 = x, a0 = a, r0, x1, a1, r1, x2, a2, r2, . . . with at ∼µ(·|xt), rt = r(xt, at) and xt+1 ∼P(·|xt, at). We denote by Ft this sequence up to time t, and write Eµ the expectation with respect to both µ and the MDP transition probabilities. Throughout, we write · for supremum norm. 2 2 Off-Policy Algorithms We are interested in two related off-policy learning problems. In the policy evaluation setting, we are given a fixed policy π whose value Qπ we wish to estimate from sample trajectories drawn from a behaviour policy µ. In the control setting, we consider a sequence of policies that depend on our own sequence of Q-functions (such as ε-greedy policies), and seek to approximate Q∗. The general operator that we consider for comparing several return-based off-policy algorithms is: RQ(x, a) := Q(x, a) + Eµ t≥0 γt t s=1 cs rt + γEπQ(xt+1, ·) −Q(xt, at) , (3) for some non-negative coefficients (cs), where we write EπQ(x, ·) := a π(a|x)Q(x, a) and define (t s=1 cs) = 1 when t = 0. By extension of the idea of eligibility traces (Sutton and Barto, 1998), we informally call the coefficients (cs) the traces of the operator. Importance sampling (IS): cs = π(as|xs) µ(as|xs). Importance sampling is the simplest way to correct for the discrepancy between µ and π when learning from off-policy returns (Precup et al., 2000, 2001; Geist and Scherrer, 2014). The off-policy correction uses the product of the likelihood ratios between π and µ. Notice that RQ defined in (3) with this choice of (cs) yields Qπ for any Q. For Q = 0 we recover the basic IS estimate t≥0 γt t s=1 cs rt, thus (3) can be seen as a variance reduction technique (with a baseline Q). It is well known that IS estimates can suffer from large – even possibly infinite – variance (mainly due to the variance of the product π(a1|x1) µ(a1|x1) · · · π(at|xt) µ(at|xt)), which has motivated further variance reduction techniques such as in (Mahmood and Sutton, 2015; Mahmood et al., 2015; Hallak et al., 2015). Off-policy Qπ(λ) and Q∗(λ): cs = λ. A recent alternative proposed by Harutyunyan et al. (2016) introduces an off-policy correction based on a Q-baseline (instead of correcting the probability of the sample path like in IS). This approach, called Qπ(λ) and Q∗(λ) for policy evaluation and control, respectively, corresponds to the choice cs = λ. It offers the advantage of avoiding the blow-up of the variance of the product of ratios encountered with IS. Interestingly, this operator contracts around Qπ provided that µ and π are sufficiently close to each other. Defining ε := maxx π(·|x) −µ(·|x)1 the level of “off-policyness”, the authors prove that the operator defined by (3) with cs = λ is a contraction mapping around Qπ for λ < 1−γ γε , and around Q∗for the worst case of λ < 1−γ 2γ . Unfortunately, Qπ(λ) requires knowledge of ε, and the condition for Q∗(λ) is very conservative. Neither Qπ(λ), nor Q∗(λ) are safe as they do not guarantee convergence for arbitrary π and µ. Tree-backup, TB(λ): cs = λπ(as|xs). The TB(λ) algorithm of Precup et al. (2000) corrects for the target/behaviour discrepancy by multiplying each term of the sum by the product of target policy probabilities. The corresponding operator defines a contraction mapping for any policies π and µ, which makes it a safe algorithm. However, this algorithm is not efficient in the near on-policy case (where µ and π are similar) as it unnecessarily cuts the traces, preventing it to make use of full returns: indeed we need not discount stochastic on-policy transitions (as shown by Harutyunyan et al.’s results about Qπ). Retrace(λ): cs = λ min 1, π(as|xs) µ(as|xs) . Our contribution is an algorithm – Retrace(λ) – that takes the best of the three previous algorithms. Retrace(λ) uses an importance sampling ratio truncated at 1. Compared to IS, it does not suffer from the variance explosion of the product of IS ratios. Now, similarly to Qπ(λ) and unlike TB(λ), it does not cut the traces in the on-policy case, making it possible to benefit from the full returns. In the off-policy case, the traces are safely cut, similarly to TB(λ). In particular, min 1, π(as|xs) µ(as|xs) ≥π(as|xs): Retrace(λ) does not cut the traces as much as TB(λ). In the subsequent sections, we will show the following: • For any traces 0 ≤cs ≤π(as|xs)/µ(as|xs) (thus including the Retrace(λ) operator), the return-based operator (3) is a γ-contraction around Qπ, for arbitrary policies µ and π • In the control case (where π is replaced by a sequence of increasingly greedy policies) the online Retrace(λ) algorithm converges a.s. to Q∗, without requiring the GLIE assumption. • As a corollary, Watkins’s Q(λ) converges a.s. to Q∗. 3 Definition Estimation Guaranteed Use full returns of cs variance convergence† (near on-policy) Importance sampling π(as|xs) µ(as|xs) High for any π, µ yes Qπ(λ) λ Low for π close to µ yes TB(λ) λπ(as|xs) Low for any π, µ no Retrace(λ) λ min 1, π(as|xs) µ(as|xs) Low for any π, µ yes Table 1: Properties of several algorithms defined in terms of the general operator given in (3). †Guaranteed convergence of the expected operator R. 3 Analysis of Retrace(λ) We will in turn analyze both off-policy policy evaluation and control settings. We will show that R is a contraction mapping in both settings (under a mild additional assumption for the control case). 3.1 Policy Evaluation Consider a fixed target policy π. For ease of exposition we consider a fixed behaviour policy µ, noting that our result extends to the setting of sequences of behaviour policies (µk : k ∈N). Our first result states the γ-contraction of the operator (3) defined by any set of non-negative coefficients cs = cs(as, Fs) (in order to emphasize that cs can be a function of the whole history Fs) under the assumption that 0 ≤cs ≤π(as|xs) µ(as|xs). Theorem 1. The operator R defined by (3) has a unique fixed point Qπ. Furthermore, if for each as ∈A and each history Fs we have cs = cs(as, Fs) ∈ 0, π(as|xs) µ(as|xs) , then for any Q-function Q RQ −Qπ ≤γQ −Qπ. The following lemma will be useful in proving Theorem 1 (proof in the appendix). Lemma 1. The difference between RQ and its fixed point Qπ is RQ(x, a) −Qπ(x, a) = Eµ t≥1 γt t−1 i=1 ci Eπ[(Q −Qπ)(xt, ·)] −ct(Q −Qπ)(xt, at) . Proof (Theorem 1). The fact that Qπ is the fixed point of the operator R is obvious from (3) since Ext+1∼P (·|xt,at) rt + γEπQπ(xx+1, ·) −Qπ(xt, at) = (T πQπ −Qπ)(xt, at) = 0, since Qπ is the fixed point of T π. Now, from Lemma 1, and defining ΔQ := Q −Qπ, we have RQ(x, a) −Qπ(x, a) = t≥1 γt E x1:t a1:t t−1 i=1 ci EπΔQ(xt, ·) −ctΔQ(xt, at) = t≥1 γt E x1:t a1:t−1 t−1 i=1 ci EπΔQ(xt, ·) −Eat[ct(at, Ft)ΔQ(xt, at)|Ft] = t≥1 γt E x1:t a1:t−1 t−1 i=1 ci b π(b|xt) −µ(b|xt)ct(b, Ft) ΔQ(xt, b) . Now since π(a|xt) −µ(a|xt)ct(b, Ft) ≥ 0, we have that RQ(x, a) −Qπ(x, a) = y,b wy,bΔQ(y, b), i.e. a linear combination of ΔQ(y, b) weighted by non-negative coefficients: wy,b := t≥1 γt E x1:t a1:t−1 t−1 i=1 ci π(b|xt) −µ(b|xt)ct(b, Ft) I{xt = y} . 4 The sum of those coefficients is: y,b wy,b = t≥1 γt E x1:t a1:t−1 t−1 i=1 ci b π(b|xt) −µ(b|xt)ct(b, Ft) = t≥1 γt E x1:t a1:t−1 t−1 i=1 ci Eat[1 −ct(at, Ft)|Ft] = t≥1 γt E x1:t a1:t t−1 i=1 ci (1 −ct) = Eµ t≥1 γt t−1 i=1 ci − t≥1 γt t i=1 ci = γC −(C −1), where C := Eµ t≥0 γt t i=1 ci . Since C ≥1, we have that y,b wy,b ≤γ. Thus RQ(x, a) −Qπ(x, a) is a sub-convex combination of ΔQ(y, b) weighted by non-negative coefficients wy,b which sum to (at most) γ, thus R is a γ-contraction mapping around Qπ. Remark 1. Notice that the coefficient C in the proof of Theorem 1 depends on (x, a). If we write η(x, a) := 1 −(1 −γ)Eµ t≥0 γt(t s=1 cs) , then we have shown that |RQ(x, a) −Qπ(x, a)| ≤η(x, a)Q −Qπ. Thus η(x, a) ∈[0, γ] is a (x, a)-specific contraction coefficient, which is γ when c1 = 0 (the trace is cut immediately) and can be close to zero when learning from full returns (Eµ[ct] ≈1 for all t). 3.2 Control In the control setting, the single target policy π is replaced by a sequence of policies (πk) which depend on (Qk). While most prior work has focused on strictly greedy policies, here we consider the larger class of increasingly greedy sequences. We now make this notion precise. Definition 1. We say that a sequence of policies (πk : k ∈N) is increasingly greedy w.r.t. a sequence (Qk : k ∈N) of Q-functions if the following property holds for all k: P πk+1Qk+1 ≥P πkQk+1. Intuitively, this means that each πk+1 is at least as greedy as the previous policy πk for Qk+1. Many natural sequences of policies are increasingly greedy, including εk-greedy policies (with nonincreasing εk) and softmax policies (with non-increasing temperature). See proofs in the appendix. We will assume that cs = cs(as, Fs) = c(as, xs) is Markovian, in the sense that it depends on xs, as (as well as the policies π and µ) only but not on the full past history. This allows us to define the (sub)-probability transition operator (P cµQ)(x, a) := x a p(x|x, a)µ(a|x)c(a, x)Q(x, a). Finally, an additional requirement to the convergence in the control case, we assume that Q0 satisfies T π0Q0 ≥Q0 (this can be achieved by a pessimistic initialization Q0 = −RMAX/(1 −γ)). Theorem 2. Consider an arbitrary sequence of behaviour policies (µk) (which may depend on (Qk)) and a sequence of target policies (πk) that are increasingly greedy w.r.t. the sequence (Qk): Qk+1 = RkQk, where the return operator Rk is defined by (3) for πk and µk and a Markovian cs = c(as, xs) ∈ [0, πk(as|xs) µk(as|xs)]. Assume the target policies πk are εk-away from the greedy policies w.r.t. Qk, in the sense that T πkQk ≥T Qk −εkQke, where e is the vector with 1-components. Further suppose that T π0Q0 ≥Q0. Then for any k ≥0, Qk+1 −Q∗ ≤γQk −Q∗ + εkQk. In consequence, if εk →0 then Qk →Q∗. Sketch of Proof (The full proof is in the appendix). Using P cµk, the Retrace(λ) operator rewrites RkQ = Q + t≥0 γt(P cµk)t(T πkQ −Q) = Q + (I −γP cµk)−1(T πkQ −Q). 5 We now lower- and upper-bound the term Qk+1 −Q∗. Upper bound on Qk+1 −Q∗. We prove that Qk+1 −Q∗≤Ak(Qk −Q∗) with Ak := γ(I − γP cµk)−1 P πk −P cµk . Since ct ∈[0, π(at|xt) µ(at|xt)] we deduce that Ak has non-negative elements, whose sum over each row, is at most γ. Thus Qk+1 −Q∗≤γQk −Q∗e. (4) Lower bound on Qk+1 −Q∗. Using the fact that T πkQk ≥T π∗Qk −εkQke we have Qk+1 −Q∗ ≥ Qk+1 −T πkQk + γP π∗(Qk −Q∗) −γεkQke = γP cµk(I −γP cµk)−1(T πkQk −Qk) + γP π∗(Qk −Q∗) −εkQke. (5) Lower bound on T πkQk −Qk. Since the sequence (πk) is increasingly greedy w.r.t. (Qk), we have T πk+1Qk+1 −Qk+1 ≥ T πkQk+1 −Qk+1 = r + (γP πk −I)RkQk = Bk(T πkQk −Qk), (6) where Bk := γ[P πk −P cµk](I−γP cµk)−1. Since P πk −P cµk and (I−γP cµk)−1 are non-negative matrices, so is Bk. Thus T πkQk −Qk ≥Bk−1Bk−2 . . . B0(T π0Q0 −Q0) ≥0, since we assumed T π0Q0 −Q0 ≥0. Thus, (5) implies that Qk+1 −Q∗≥γP π∗(Qk −Q∗) −εkQke. Combining the above with (4) we deduce Qk+1 −Q∗ ≤γQk −Q∗ + εkQk. When εk →0, we further deduce that Qk are bounded, thus Qk →Q∗. 3.3 Online algorithms So far we have analyzed the contraction properties of the expected R operators. We now describe online algorithms which can learn from sample trajectories. We analyze the algorithms in the every visit form (Sutton and Barto, 1998), which is the more practical generalization of the first-visit form. In this section, we will only consider the Retrace(λ) algorithm defined with the coefficient c = λ min(1, π/µ). For that c, let us rewrite the operator P cµ as λP π∧µ, where P π∧µQ(x, a) := y b min(π(b|y), µ(b|y))Q(y, b), and write the Retrace operator RQ = Q + (I −λγP π∧µ)−1(T πQ −Q). We focus on the control case, noting that a similar (and simpler) result can be derived for policy evaluation. Theorem 3. Consider a sequence of sample trajectories, with the kth trajectory x0, a0, r0, x1, a1, r1, . . . generated by following µk: at ∼µk(·|xt). For each (x, a) along this trajectory, with s being the time of first occurrence of (x, a), update Qk+1(x, a) ←Qk(x, a) + αk t≥s δπk t t j=s γt−j t i=j+1 ci I{xj, aj = x, a}, (7) where δπk t := rt + γEπkQk(xt+1, ·) −Qk(xt, at), αk = αk(xs, as). We consider the Retrace(λ) algorithm where ci = λ min 1, π(ai|xi) µ(ai|xi) . Assume that (πk) are increasingly greedy w.r.t. (Qk) and are each εk-away from the greedy policies (πQk), i.e. maxx πk(·|x)−πQk(·|x)1 ≤εk, with εk → 0. Assume that P πk and P πk∧µk asymptotically commute: limk P πkP πk∧µk −P πk∧µkP πk = 0. Assume further that (1) all states and actions are visited infinitely often: t≥0 P{xt, at = x, a} ≥ D > 0, (2) the sample trajectories are finite in terms of the second moment of their lengths Tk: EµkT 2 k < ∞, (3) the stepsizes obey the usual Robbins-Munro conditions. Then Qk →Q∗a.s. The proof extends similar convergence proofs of TD(λ) by Bertsekas and Tsitsiklis (1996) and of optimistic policy iteration by Tsitsiklis (2003), and is provided in the appendix. Notice that compared to Theorem 2 we do not assume that T π0Q0 −Q0 ≥0 here. However, we make the additional (rather technical) assumption that P πk and P πk∧µk commute at the limit. This is satisfied for example when the probability assigned by the behavior policy µk(·|x) to the greedy action πQk(x) is independent of x. Examples include ε-greedy policies, or more generally mixtures between the greedy policy πQk and an arbitrary distribution µ (see Lemma 5 in the appendix for the proof): µk(a|x) = ε µ(a|x) 1 −µ(πQk(x)|x)I{a = πQk(x)} + (1 −ε)I{a = πQk(x)}. (8) Notice that the mixture coefficient ε needs not go to 0. 6 4 Discussion of the results 4.1 Choice of the trace coefficients cs Theorems 1 and 2 ensure convergence to Qπ and Q∗for any trace coefficient cs ∈[0, π(as|xs) µ(as|xs)]. However, to make the best choice of cs, we need to consider the speed of convergence, which depends on both (1) the variance of the online estimate, which indicates how many online updates are required in a single iteration of R, and (2) the contraction coefficient of R. Variance: The variance of the estimate strongly depends on the variance of the product trace (c1 . . . ct), which is not an easy quantity to control in general, as the (cs) are usually not independent. However, assuming independence and stationarity of (cs), we have that V t γtc1 . . . ct is at least t γ2tV(c)t, which is finite only if V(c) < 1/γ2. Thus, an important requirement for a numerically stable algorithm is for V(c) to be as small as possible, and certainly no more than 1/γ2. This rules out importance sampling (for which c = π(a|x) µ(a|x), and V(c|x) = a µ(a|x) π(a|x) µ(a|x) −1 2, which may be larger than 1/γ2 for some π and µ), and is the reason we choose c ≤1. Contraction speed: The contraction coefficient η ∈[0, γ] of R (see Remark 1) depends on how much the traces have been cut, and should be as small as possible (since it takes log(1/ε)/ log(1/η) iterations of R to obtain an ε-approximation). It is smallest when the traces are not cut at all (i.e. if cs = 1 for all s, R is the policy evaluation operator which produces Qπ in a single iteration). Indeed, when the traces are cut, we do not benefit from learning from full returns (in the extreme, c1 = 0 and R reduces to the (one step) Bellman operator with η = γ). A reasonable trade-off between low variance (when cs are small) and high contraction speed (when cs are large) is given by Retrace(λ), for which we provide the convergence of the online algorithm. If we relax the assumption that the trace is Markovian (in which case only the result for policy evaluation has been proven so far) we could trade off a low trace at some time for a possibly largerthan-1 trace at another time, as long as their product is less than 1. A possible choice could be cs = λ min 1 c1 . . . cs−1 , π(as|xs) µ(as|xs) . (9) 4.2 Other topics of discussion No GLIE assumption. The crucial point of Theorem 2 is that convergence to Q∗occurs for arbitrary behaviour policies. Thus the online result in Theorem 3 does not require the behaviour policies to become greedy in the limit with infinite exploration (i.e. GLIE assumption, Singh et al., 2000). We believe Theorem 3 provides the first convergence result to Q∗for a λ-return (with λ > 0) algorithm that does not require this (hard to satisfy) assumption. Proof of Watkins’ Q(λ). As a corollary of Theorem 3 when selecting our target policies πk to be greedy w.r.t. Qk (i.e. εk = 0), we deduce that Watkins’ Q(λ) (e.g., Watkins, 1989; Sutton and Barto, 1998) converges a.s. to Q∗(under the assumption that µk commutes asymptotically with the greedy policies, which is satisfied for e.g. µk defined by (8)). We believe this is the first such proof. Increasingly greedy policies The assumption that the sequence of target policies (πk) is increasingly greedy w.r.t. the sequence of (Qk) is more general that just considering greedy policies w.r.t. (Qk) (which is Watkins’s Q(λ)), and leads to more efficient algorithms. Indeed, using nongreedy target policies πk may speed up convergence as the traces are not cut as frequently. Of course, in order to converge to Q∗, we eventually need the target policies (and not the behaviour policies, as mentioned above) to become greedy in the limit (i.e. εk →0 as defined in Theorem 2). Comparison to Qπ(λ). Unlike Retrace(λ), Qπ(λ) does not need to know the behaviour policy µ. However, it fails to converge when µ is far from π. Retrace(λ) uses its knowledge of µ (for the chosen actions) to cut the traces and safely handle arbitrary policies π and µ. Comparison to TB(λ). Similarly to Qπ(λ), TB(λ) does not need the knowledge of the behaviour policy µ. But as a consequence, TB(λ) is not able to benefit from possible near on-policy situations, cutting traces unnecessarily when π and µ are close. 7 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0
!" #
0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0
!"
Figure 1: Inter-algorithm score distribution for λ-return (λ = 1) variants and Q-Learning (λ = 0). Estimating the behavior policy. In the case µ is unknown, it is reasonable to build an estimate
µ from observed samples and use
µ instead of µ in the definition of the trace coefficients cs. This may actually even lead to a better estimate, as analyzed by Li et al. (2015). Continuous action space. Let us mention that Theorems 1 and 2 extend to the case of (measurable) continuous or infinite action spaces. The trace coefficients will make use of the densities min(1, dπ/dµ) instead of the probabilities min(1, π/µ). This is not possible with TB(λ). Open questions include: (1) Removing the technical assumption that P πk and P πk∧µk asymptotically commute, (2) Relaxing the Markov assumption in the control case in order to allow trace coefficients cs of the form (9). 5 Experimental Results To validate our theoretical results, we employ Retrace(λ) in an experience replay (Lin, 1993) setting, where sample transitions are stored within a large but bounded replay memory and subsequently replayed as if they were new experience. Naturally, older data in the memory is usually drawn from a policy which differs from the current policy, offering an excellent point of comparison for the algorithms presented in Section 2. Our agent adapts the DQN architecture of Mnih et al. (2015) to replay short sequences from the memory (details in the appendix) instead of single transitions. The Q-function target update for a sample sequence xt, at, rt, · · · , xt+k is ΔQ(xt, at) = t+k−1 s=t γs−t s i=t+1 ci r(xs, as) + γEπQ(xs+1, ·) −Q(xs, as) . We compare our algorithms’ performance on 60 different Atari 2600 games in the Arcade Learning Environment (Bellemare et al., 2013) using Bellemare et al.’s inter-algorithm score distribution. Inter-algorithm scores are normalized so that 0 and 1 respectively correspond to the worst and best score for a particular game, within the set of algorithms under comparison. If g ∈{1, . . . , 60} is a game and zg,a the inter-algorithm score on g for algorithm a, then the score distribution function is f(x) := |{g : zg,a ≥x}|/60. Roughly, a strictly higher curve corresponds to a better algorithm. Across values of λ, λ = 1 performs best, save for Q∗(λ) where λ = 0.5 obtains slightly superior performance. However, is highly sensitive to the choice of λ (see Figure 1, left, and Table 2 in the appendix). Both Retrace(λ) and TB(λ) achieve dramatically higher performance than Q-Learning early on and maintain their advantage throughout. Compared to TB(λ), Retrace(λ) offers a narrower but still marked advantage, being the best performer on 30 games; TB(λ) claims 15 of the remainder. Per-game details are given in the appendix. Conclusion. Retrace(λ) can be seen as an algorithm that automatically adjusts – efficiently and safely – the length of the return to the degree of ”off-policyness” of any available data. Acknowledgments. The authors thank Daan Wierstra, Nicolas Heess, Hado van Hasselt, Ziyu Wang, David Silver, Audrunas Gr¯uslys, Georg Ostrovski, Hubert Soyer, and others at Google DeepMind for their very useful feedback on this work. 8 References Bellemare, M. G., Naddaf, Y., Veness, J., and Bowling, M. (2013). The Arcade Learning Environment: An evaluation platform for general agents. Journal of Artificial Intelligence Research, 47:253–279. Bertsekas, D. P. and Tsitsiklis, J. N. (1996). Neuro-Dynamic Programming. Athena Scientific. Geist, M. and Scherrer, B. (2014). Off-policy learning with eligibility traces: A survey. The Journal of Machine Learning Research, 15(1):289–333. Hallak, A., Tamar, A., Munos, R., and Mannor, S. (2015). Generalized emphatic temporal difference learning: Bias-variance analysis. arXiv:1509.05172. Harutyunyan, A., Bellemare, M. G., Stepleton, T., and Munos, R. (2016). Q(λ) with off-policy corrections. Kearns, M. J. and Singh, S. P. (2000). Bias-variance error bounds for temporal difference updates. In Conference on Computational Learning Theory, pages 142–147. Li, L., Munos, R., and Szepesvari, C. (2015). Toward minimax off-policy value estimation. In Proceedings of the 18th International Conference on Artificial Intelligence and Statistics (AISTATS). Lin, L. (1993). Scaling up reinforcement learning for robot control. In Machine Learning: Proceedings of the Tenth International Conference, pages 182–189. Mahmood, A. R. and Sutton, R. S. (2015). Off-policy learning based on weighted importance sampling with linear computational complexity. In Conference on Uncertainty in Artificial Intelligence. Mahmood, A. R., Yu, H., White, M., and Sutton, R. S. (2015). Emphatic temporal-difference learning. arXiv:1507.01569. Mnih, V., Badia, A. P., Mirza, M., Graves, A., Lillicrap, T. P., Harley, T., Silver, D., and Kavukcuoglu, K. (2016). Asynchronous methods for deep reinforcement learning. In Proceedings of the International Conference on Machine Learning. Mnih, V., Kavukcuoglu, K., Silver, D., Rusu, A. A., Veness, J., Bellemare, M. G., Graves, A., Riedmiller, M., Fidjeland, A. K., Ostrovski, G., et al. (2015). Human-level control through deep reinforcement learning. Nature, 518(7540):529–533. Precup, D., Sutton, R. S., and Dasgupta, S. (2001). Off-policy temporal-difference learning with function approximation. In International Conference on Machine Laerning, pages 417–424. Precup, D., Sutton, R. S., and Singh, S. (2000). Eligibility traces for off-policy policy evaluation. In Proceedings of the Seventeenth International Conference on Machine Learning. Puterman, M. L. (1994). Markov Decision Processes: Discrete Stochastic Dynamic Programming. John Wiley & Sons, Inc., New York, NY, USA. Schaul, T., Quan, J., Antonoglou, I., and Silver, D. (2016). Prioritized experience replay. In International Conference on Learning Representations. Singh, S., Jaakkola, T., Littman, M. L., and Szepesv´ari, C. (2000). Convergence results for singlestep on-policy reinforcement-learning algorithms. Machine Learning, 38(3):287–308. Sutton, R. and Barto, A. (1998). Reinforcement learning: An introduction. Cambridge Univ Press. Sutton, R. S. (1988). Learning to predict by the methods of temporal differences. Machine learning, 3(1):9–44. Sutton, R. S. (1996). Generalization in reinforcement learning: Successful examples using sparse coarse coding. In Advances in Neural Information Processing Systems 8. Tsitsiklis, J. N. (2003). On the convergence of optimistic policy iteration. Journal of Machine Learning Research, 3:59–72. Watkins, C. J. C. H. (1989). Learning from Delayed Rewards. PhD thesis, King’s College, Cambridge, UK. 9 | 2016 | 444 |
6,377 | LightRNN: Memory and Computation-Efficient Recurrent Neural Networks Xiang Li1 Tao Qin2 Jian Yang1 Tie-Yan Liu2 1Nanjing University of Science and Technology 2Microsoft Research Asia 1implusdream@gmail.com 1csjyang@njust.edu.cn 2{taoqin, tie-yan.liu}@microsoft.com Abstract Recurrent neural networks (RNNs) have achieved state-of-the-art performances in many natural language processing tasks, such as language modeling and machine translation. However, when the vocabulary is large, the RNN model will become very big (e.g., possibly beyond the memory capacity of a GPU device) and its training will become very inefficient. In this work, we propose a novel technique to tackle this challenge. The key idea is to use 2-Component (2C) shared embedding for word representations. We allocate every word in the vocabulary into a table, each row of which is associated with a vector, and each column associated with another vector. Depending on its position in the table, a word is jointly represented by two components: a row vector and a column vector. Since the words in the same row share the row vector and the words in the same column share the column vector, we only need 2 p |V | vectors to represent a vocabulary of |V | unique words, which are far less than the |V | vectors required by existing approaches. Based on the 2-Component shared embedding, we design a new RNN algorithm and evaluate it using the language modeling task on several benchmark datasets. The results show that our algorithm significantly reduces the model size and speeds up the training process, without sacrifice of accuracy (it achieves similar, if not better, perplexity as compared to state-of-the-art language models). Remarkably, on the One-Billion-Word benchmark Dataset, our algorithm achieves comparable perplexity to previous language models, whilst reducing the model size by a factor of 40-100, and speeding up the training process by a factor of 2. We name our proposed algorithm LightRNN to reflect its very small model size and very high training speed. 1 Introduction Recently recurrent neural networks (RNNs) have been used in many natural language processing (NLP) tasks, such as language modeling [14], machine translation [23], sentiment analysis [24], and question answering [26]. A popular RNN architecture is long short-term memory (LSTM) [8, 11, 22], which can model long-term dependence and resolve the gradient-vanishing problem by using memory cells and gating functions. With these elements, LSTM RNNs have achieved state-of-the-art performance in several NLP tasks, although almost learning from scratch. While RNNs are becoming increasingly popular, they have a known limitation: when applied to textual corpora with large vocabularies, the size of the model will become very big. For instance, when using RNNs for language modeling, a word is first mapped from a one-hot vector (whose dimension is equal to the size of the vocabulary) to an embedding vector by an input-embedding matrix. Then, to predict the probability of the next word, the top hidden layer is projected by an output-embedding matrix onto a probability distribution over all the words in the vocabulary. When 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. the vocabulary contains tens of millions of unique words, which is very common in Web corpora, the two embedding matrices will contain tens of billions of elements, making the RNN model too big to fit into the memory of GPU devices. Take the ClueWeb dataset [19] as an example, whose vocabulary contains over 10M words. If the embedding vectors are of 1024 dimensions and each dimension is represented by a 32-bit floating point, the size of the input-embedding matrix will be around 40GB. Further considering the output-embedding matrix and those weights between hidden layers, the RNN model will be larger than 80GB, which is far beyond the capability of the best GPU devices on the market [2]. Even if the memory constraint is not a problem, the computational complexity for training such a big model will also be too high to afford. In RNN language models, the most time-consuming operation is to calculate a probability distribution over all the words in the vocabulary, which requires the multiplication of the output-embedding matrix and the hidden state at each position of a sequence. According to simple calculations, we can get that it will take tens of years for the best single GPU today to finish the training of a language model on the ClueWeb dataset. Furthermore, in addition to the challenges during the training phase, even if we can successfully train such a big model, it is almost impossible to host it in mobile devices for efficient inferences. To address the above challenges, in this work, we propose to use 2-Component (2C) shared embedding for word representations in RNNs. We allocate all the words in the vocabulary into a table, each row of which is associated with a vector, and each column associated with another vector. Then we use two components to represent a word depending on its position in the table: the corresponding row vector and column vector. Since the words in the same row share the row vector and the words in the same column share the column vector, we only need 2 p |V | vectors to represent a vocabulary with |V | unique words, and thus greatly reduce the model size as compared with the vanilla approach that needs |V | unique vectors. In the meanwhile, due to the reduced model size, the training of the RNN model can also significantly speed up. We therefore call our proposed new algorithm (LightRNN), to reflect its very small model size and very high training speed. A central technical challenge of our approach is how to appropriately allocate the words into the table. To this end, we propose a bootstrap framework: (1) We first randomly initialize the word allocation and then train the LightRNN model. (2) We fix the trained embedding vectors (corresponding to the row and column vectors in the table), and refine the allocation to minimize the training loss, which is a minimum weight perfect matching problem in graph theory and can be effectively solved. (3) We repeat the second step until certain stopping criterion is met. We evaluate LightRNN using the language modeling task on several benchmark datasets. The experimental results show that LightRNN achieves comparable (if not better) accuracy to state-of-theart language models in terms of perplexity, while reducing the model size by a factor of up to 100 and speeding up the training process by a factor of 2. Please note that it is desirable to have a highly compact model (without accuracy drop). First, it makes it possible to put the RNN model into a GPU or even a mobile device. Second, if the training data is large and one needs to perform distributed data-parallel training, the communication cost for aggregating the models from local workers will be low. In this way, our approach makes previously expensive RNN algorithms very economical and scalable, and therefore has its profound impact on deep learning for NLP tasks. 2 Related work In the literature of deep learning, there have been several works that try to resolve the problem caused by the large vocabulary of the text corpus. Some works focus on reducing the computational complexity of the softmax operation on the outputembedding matrix. In [16, 17], a binary tree is used to represent a hierarchical clustering of words in the vocabulary. Each leaf node of the tree is associated with a word, and every word has a unique path from the root to the leaf where it is in. In this way, when calculating the probability of the next word, one can replace the original |V |-way normalization with a sequence of log |V | binary normalizations. In [9, 15], the words in the vocabulary are organized into a tree with two layers: the root node has roughly p |V | intermediate nodes, each of which also has roughly p |V | leaf nodes. Each intermediate node represents a cluster of words, and each leaf node represents a word in the cluster. To calculate the probability of the next word, one first calculates the probability of the cluster of the word and then the conditional probability of the word given its cluster. Besides, methods based 2 on sampling-based approximations intend to select randomly or heuristically a small subset of the output layer and estimate the gradient only from those samples, such as importance sampling [3] and BlackOut [12]. Although these methods can speed up the training process by means of efficient softmax, they do not reduce the size of the model. Some other works focus on reducing the model size. Techniques [6, 21] like differentiated softmax and recurrent projection are employed to reduce the size of the output-embedding matrix. However, they only slightly compress the model, and the number of parameters is still in the same order of the vocabulary size. Character-level convolutional filters are used to shrink the size of the inputembedding matrix in [13]. However, it still suffers from the gigantic output-embedding matrix. Besides, these methods have not addressed the challenge of computational complexity caused by the time-consuming softmax operations. As can be seen from the above introductions, no existing work has simultaneously achieved the significant reduction of both model size and computational complexity. This is exactly the problem that we will address in this paper. 3 LightRNN In this section, we introduce our proposed LightRNN algorithm. 3.1 RNN Model with 2-Component Shared Embedding A key technical innovation in the LightRNN algorithm is its 2-Component shared embedding for word representations. As shown in Figure 1, we allocate all the words in the vocabulary into a table. The i-th row of the table is associated with an embedding vector xr i and the j-th column of the table is associated with an embedding vector xc j. Then a word in the i-th row and the j-th column is represented by two components: xr i and xc j. By sharing the embedding vector among words in the same row (and also in the same column), for a vocabulary with |V | words, we only need 2 p |V | unique vectors for the input word embedding. It is the same case for the output word embedding. Figure 1: An example of the word table Figure 2: LightRNN (left) vs. Conventional RNN (right). With the 2-Component shared embedding, we can construct the LightRNN model by doubling the basic units of a vanilla RNN model, as shown in Figure 2. Let n and m denote the dimension of a row/column input vector and that of a hidden state vector respectively. To compute the probability distribution of wt, we need to use the column vector xc t−1 ∈Rn, the row vector xr t ∈Rn, and the hidden state vector hr t−1 ∈Rm. The column and row vectors are from input-embedding matrices Xc, Xr ∈Rn×√ |V | respectively. Next two hidden state vectors hc t−1, hr t ∈Rm are produced by applying the following recursive 3 operations: hc t−1 = f (Wxc t−1 + Uhr t−1 + b) hr t = f (Wxr t + Uhc t−1 + b). (1) In the above function, W ∈Rm×n, U ∈Rm×m, b ∈Rm are parameters of affine transformations, and f is a nonlinear activation function (e.g., the sigmoid function). The probability P(wt) of a word w at position t is determined by its row probability Pr(wt) and column probability Pc(wt): Pr(wt) = exp(hc t−1 · yr r(w)) P i∈Sr exp(hc t−1 · yr i ) Pc(wt) = exp(hr t · yc c(w)) P i∈Sc exp(hr t · yc i ), (2) P(wt) = Pr(wt) · Pc(wt), (3) where r(w) is the row index of word w, c(w) is its column index, yr i ∈Rm is the i-th vector of Y r ∈Rm×√ |V |, yc i ∈Rm is the i-th vector of Y c ∈Rm×√ |V |, and Sr and Sc denote the set of rows and columns of the word table respectively. Note that we do not see the t-th word before predicting it. In Figure 2, given the input column vector xc t−1 of the (t −1)-th word, we first infer the row probability Pr(wt) of the t-th word, and then choose the index of the row with the largest probability in Pr(wt) to look up the next input row vector xr t. Similarly, we can then infer the column probability Pc(wt) of the t-th word. We can see that by using Eqn.(3), we effectively reduce the computation of the probability of the next word from a |V |-way normalization (in standard RNN models) to two p |V |-way normalizations. To better understand the reduction of the model size, we compare the key components in a vanilla RNN model and in our proposed LightRNN model by considering an example with embedding dimension n = 1024, hidden unit dimension m = 1024 and vocabulary size |V | = 10M. Suppose we use 32-bit floating point representation for each dimension. The total size of the two embedding matrices X, Y is (m × |V | + n × |V |) × 4 = 80GB for the vanilla RNN model and that of the four embedding matrices Xr, Xc, Y r, Y c in LightRNN is 2×(m× p |V |+n× p |V |)×4 ≈50MB. It is clear that LightRNN shrinks the model size by a significant factor so that it can be easily fit into the memory of a GPU device or a mobile device. The cell of hidden state h can be implemented by a LSTM [22] or a gated recurrent unit (GRU) [7], and our idea works with any kind of recurrent unit. Please note that in LightRNN, the input and output use different embedding matrices but they share the same word-allocation table. 3.2 Bootstrap for Word Allocation The LightRNN algorithm described in the previous subsection assumes that there exists a word allocation table. It remains as a problem how to appropriately generate this table, i.e., how to allocate the words into appropriate columns and rows. In this subsection, we will discuss on this issue. Specifically, we propose a bootstrap procedure to iteratively refine word allocation based on the learned word embedding in the LightRNN model: (1) For cold start, randomly allocate the words into the table. (2) Train the input/output embedding vectors in LightRNN based on the given allocation until convergence. Exit if a stopping criterion (e.g., training time, or perplexity for language modeling) is met, otherwise go to the next step. (3) Fixing the embedding vectors learned in the previous step, refine the allocation in the table, to minimize the loss function over all the words. Go to Step (2). As can be seen above, the refinement of the word allocation table according to the learned embedding vectors is a key step in the bootstrap procedure. We will provide more details about it, by taking language modeling as an example. The target in language modeling is to minimize the negative log-likelihood of the next word in a sequence, which is equivalent to optimizing the cross-entropy between the target probability distribution and the prediction given by the LightRNN model. Given a context with T words, the 4 overall negative log-likelihood can be expressed as follows: NLL = T X t=1 −log P(wt) = T X t=1 −log Pr(wt) −log Pc(wt). (4) NLL can be expanded with respect to words: NLL = P|V | w=1 NLLw, where NLLw is the negative log-likelihood for a specific word w. For ease of deduction, we rewrite NLLw as l(w, r(w), c(w)), where (r(w), c(w)) is the position of word w in the word allocation table. In addition, we use lr(w, r(w)) and lc(w, c(w)) to represent the row component and column component of l(w, r(w), c(w)) (which we call row loss and column loss of word w for ease of reference). The relationship between these quantities is NLLw = X t∈Sw −log P(wt) = l(w, r(w), c(w)) = X t∈Sw −log Pr(wt) + X t∈Sw −log Pc(wt) = lr(w, r(w)) + lc(w, c(w)), (5) where Sw is the set of all the positions for the word w in the corpus. Now we consider adjusting the allocation table to minimize the loss function NLL. For word w, suppose we plan to move it from the original cell (r(w), c(w)) to another cell (i, j) in the table. Then we can calculate the row loss lr(w, i) if it is moved to row i while its column and the allocation of all the other words remain unchanged. We can also calculate the column loss lc(w, j) in a similar way. Next we define the total loss of this move as l(w, i, j) which is equal to lr(w, i) + lc(w, j) according to Eqn.(5). The total cost of calculating all l(w, i, j) is O(|V |2), by assuming l(w, i, j) = lr(w, i) + lc(w, j), since we only need to calculate the loss of each word allocated in every row and column separately. In fact, all lr(w, i) and lc(w, j) have already been calculated during the forward part of LightRNN training: to predict the next word we need to compute the scores (i.e., in Eqn.(2), hc t−1 · yr i and hr t · yc i for all i) of all the words in the vocabulary for normalization and lr(w, i) is the sum of −log( exp(hc t−1·yr i ) P k(exp(hc t−1·yr k))) over all the appearances of word w in the training data. After we calculate l(w, i, j) for all possible w, i, j, we can write the reallocation problem as the following optimization problem: min a X (w,i,j) l(w, i, j)a(w, i, j) subject to X (i,j) a(w, i, j) = 1 ∀w ∈V, X w a(w, i, j) = 1 ∀i ∈Sr, j ∈Sc, (6) a(w, i, j) ∈{0, 1}, ∀w ∈V, i ∈Sr, j ∈Sc, where a(w, i, j) = 1 means allocating word w to position (i, j) of the table, and Sr and Sc denote the row set and column set of the table respectively. By defining a weighted bipartite graph G = (V, E) with V = (V, Sr × Sc), in which the weight of the edge in E connecting a node w ∈V and node (i, j) ∈Sr × Sc is l(w, i, j), we will see that the above optimization problem is equivalent to a standard minimum weight perfect matching problem [18] on graph G. This problem has been well studied in the literature, and one of the best practical algorithms for the problem is the minimum cost maximum flow (MCMF) algorithm [1], whose basic idea is shown in Figure 3. In Figure 3(a), we assign each edge connecting a word node w and a position node (i, j) with flow capacity 1 and cost l(w, i, j). The remaining edges starting from source (src) or ending at destination (dst) are all with flow capacity 1 and cost 0. The thick solid lines in Figure 3(a) give an example of the optimal weighted matching solution, while Figure 3(b) illustrates how the allocation gets updated correspondingly. Since the computational complexity of MCMF is O(|V |3), which is still costly for a large vocabulary, we alternatively leverage a linear time (with respect to |E|) 1 2-approximation algorithm [20] in our experiments whose computational complexity is O(|V |2). When the number of tokens in the dataset is far larger than the size of the vocabulary (which is the common case), this complexity can be ignored as compared with the overall complexity of LightRNN training (which is around O(|V |KT), where K is the number of epochs in the training process and T is the total number of tokens in the training data). 5 (a) (b) Figure 3: The MCMF algorithm for minimum weight perfect matching 4 Experiments To test LightRNN, we conducted a set of experiments on the language modeling task. 4.1 Settings We use perplexity (PPL) as the measure to evaluate the performance of an algorithm for language modeling (the lower, the better), defined as PPL = exp( NLL T ), where T is the number of tokens in the test set. We used all the linguistic corpora from 2013 ACL Workshop Morphological Language Datasets (ACLW) [4] and the One-Billion-Word Benchmark Dataset (BillionW) [5] in our experiments. The detailed information of these public datasets is listed in Table 1. Table 1: Statistics of the datasets Dataset #Token Vocabulary Size ACLW-Spanish 56M 152K ACLW-French 57M 137K ACLW-English 20M 60K ACLW-Czech 17M 206K ACLW-German 51M 339K ACLW-Russian 25M 497K BillionW 799M 793K For the ACLW datasets, we kept all the training/validation/test sets exactly the same as those in [4, 13] by using their processed data 1. For the BillionW dataset, since the data2 are unprocessed, we processed the data according to the standard procedure as listed in [5]: We discarded all words with count below 3 and padded the sentence boundary markers <S>,<\S>. Words outside the vocabulary were mapped to the <UNK> token. Meanwhile, the partition of training/validation/test sets on BillionW was the same with public settings in [5] for fair comparisons. We trained LSTM-based LightRNN using stochastic gradient descent with truncated backpropagation through time [10, 25]. The initial learning rate was 1.0 and then decreased by a ratio of 2 if the perplexity did not improve on the validation set after a certain number of mini batches. We clipped the gradients of the parameters such that their norms were bounded by 5.0. We further performed dropout with probability 0.5 [28]. All the training processes were conducted on one single GPU K20 with 5GB memory. 4.2 Results and Discussions For the ACLW datasets, we mainly compared LightRNN with two state-of-the-art LSTM RNN algorithms in [13]: one utilizes hierarchical softmax for word prediction (denoted as HSM), and the other one utilizes hierarchical softmax as well as character-level convolutional filters for input embedding (denoted as C-HSM). We explored several choices of dimensions of shared embedding for LightRNN: 200, 600, and 1000. Note that 200 is exactly the word embedding size of HSM and C-HSM models used in [13]. Since our algorithm significantly reduces the model size, it allows us to use larger dimensions of embedding vectors while still keeping our model size very small. Therefore, we also tried 600 and 1000 in LightRNN, and the results are showed in Table 2. We can see that with larger embedding sizes, LightRNN achieves bet1https://www.dropbox.com/s/m83wwnlz3dw5zhk/large.zip?dl=0 2http://tiny.cc/1billionLM 6 Table 3: Runtime comparisons in order to achieve the HSMs’ baseline PPL ACLW Method Runtime(hours) Reallocation/Training C-HSM[13] 168 – LightRNN 82 0.19% BillionW Method Runtime(hours) Reallocation/Training HSM[6] 168 – LightRNN 70 2.36% Table 4: Results on BillionW dataset Method PPL #param KN[5] 68 2G HSM[6] 85 1.6G B-RNN[12] 68 4.1G LightRNN 66 41M KN + HSM[6] 56 – KN + B-RNN[12] 47 – KN + LightRNN 43 – ter accuracy in terms of perplexity. With 1000-dimensional embedding, it achieves the best result while the total model size is still quite small. Thus, we set 1000 as the shared embedding size while comparing with baselines on all the ACLW datasets in the following experiments. Table 2: Test PPL of LightRNN on the ACLWFrench dataset w.r.t. embedding sizes Embedding size PPL #param 200 340 0.9M 600 208 7M 1000 176 17M Table 5 shows the perplexity and model sizes in all the ACLW datasets. As can be seen, LightRNN significantly reduces the model size, while at the same time outperforms the baselines in terms of perplexity. Furthermore, while the model sizes of the baseline methods increase linearly with respect to the vocabulary size, the model size of LightRNN almost keeps constant on the ACLW datasets. For the BillionW dataset, we mainly compared with BlackOut for RNN [12] (B-RNN) which achieves the state-of-the-art result by interpolating with KN (Kneser-Ney) 5-gram. Since the best single model reported in the paper is a 1-layer RNN with 2048-dimenional word embedding, we also used this embedding size for LightRNN. In addition, we compared with the HSM result reported in [6], which used 1024 dimensions for word embedding, but still has 40x more parameters than our model. For further comparisons, we also ensembled LightRNN with the KN 5-gram model. We utilized the KenLM Language Model Toolkit 3 to get the probability distribution from the KN model with the same vocabulary setting. Figure 4: Perplexity curve on ACLW-French. The results on BillionW are shown in Table 4. It is easy to see that LightRNN achieves the lowest perplexity whilst significantly reducing the model size. For example, it reduces the model size by a factor of 40 as compared to HSM and by a factor of 100 as compared to B-RNN. Furthermore, through ensemble with the KN 5-gram model, LightRNN achieves a perplexity of 43. In our experiments, the overall training of LightRNN consisted of several rounds of word table refinement. In each round, the training stopped until the perplexity on the validation set converged. Figure 4 shows how the perplexity gets improved with respect to the table refinement on one of the ACLW datasets. Based on our observations, 3-4 rounds of refinements usually give satisfactory results. Table 3 shows the training time of our algorithm in order to achieve the same perplexity as some baselines on the two datasets. As can be seen, LightRNN saves half of the runtime to achieve the same perplexity as C-HSM and HSM. This table also shows the time cost of word table refinement in the whole training process. Obviously, the word reallocation part accounts for very little fraction of the total training time. 3http://kheafield.com/code/kenlm/ 7 Table 5: PPL results in test set for various linguistic datasets on ACLW datasets. Italic results are the previous state-of-the-art. #P denotes the number of Parameters. PPL on ACLW test Method Spanish/#P French/#P English/#P Czech/#P German/#P Russian/#P KN[4] 219/– 243/– 291/– 862/– 463/– 390/– HSM[13] 186/61M 202/56M 236/25M 701/83M 347/137M 353/200M C-HSM[13] 169/48M 190/44M 216/20M 578/64M 305/104M 313/152M LightRNN 157/18M 176/17M 191/17M 558/18M 281/18M 288/19M Figure 5 shows a set of rows in the word allocation table on the BillionW dataset after several rounds of bootstrap. Surprisingly, our approach could automatically discover the semantic and syntactic relationship of words in natural languages. For example, the place names are allocated together in row 832; the expressions about the concept of time are allocated together in row 889; and URLs are allocated together in row 887. This automatically discovered semantic/syntactic relationship may explain why LightRNN, with such a small number of parameters, sometimes outperforms those baselines that assume all the words are independent of each other (i.e., embedding each word as an independent vector). Figure 5: Case study of word allocation table 5 Conclusion and future work In this work, we have proposed a novel algorithm, LightRNN, for natural language processing tasks. Through the 2-Component shared embedding for word representations, LightRNN achieves high efficiency in terms of both model size and running time, especially for text corpora with large vocabularies. There are many directions to explore in the future. First, we plan to apply LightRNN on even larger corpora, such as the ClueWeb dataset, for which conventional RNN models cannot be fit into a modern GPU. Second, we will apply LightRNN to other NLP tasks such as machine translation and question answering. Third, we will explore k-Component shared embedding (k > 2) and study the role of k in the tradeoff between efficiency and effectiveness. Fourth, we are cleaning our codes and will release them soon through CNTK [27]. Acknowledgments The authors would like to thank the anonymous reviewers for their critical and constructive comments and suggestions. This work was partially supported by the National Science Fund of China under Grant Nos. 91420201, 61472187, 61502235, 61233011 and 61373063, the Key Project of Chinese Ministry of Education under Grant No. 313030, the 973 Program No. 2014CB349303, and Program for Changjiang Scholars and Innovative Research Team in University. We also would like to thank Professor Xiaolin Hu from Department of Computer Science and Technology, Tsinghua National Laboratory for Information Science and Technology (TNList) for giving a lot of wonderful advices. 8 References [1] Ravindra K Ahuja, Thomas L Magnanti, and James B Orlin. Network flows. Technical report, DTIC Document, 1988. [2] Jeremy Appleyard, Tomas Kocisky, and Phil Blunsom. Optimizing performance of recurrent neural networks on gpus. arXiv preprint arXiv:1604.01946, 2016. [3] Yoshua Bengio, Jean-Sébastien Senécal, et al. Quick training of probabilistic neural nets by importance sampling. In AISTATS, 2003. [4] Jan A Botha and Phil Blunsom. Compositional morphology for word representations and language modelling. arXiv preprint arXiv:1405.4273, 2014. [5] Ciprian Chelba, Tomas Mikolov, Mike Schuster, Qi Ge, Thorsten Brants, Phillipp Koehn, and Tony Robinson. One billion word benchmark for measuring progress in statistical language modeling. arXiv preprint arXiv:1312.3005, 2013. [6] Welin Chen, David Grangier, and Michael Auli. Strategies for training large vocabulary neural language models. arXiv preprint arXiv:1512.04906, 2015. [7] Junyoung Chung, Caglar Gulcehre, KyungHyun Cho, and Yoshua Bengio. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv preprint arXiv:1412.3555, 2014. [8] Felix A Gers, Jürgen Schmidhuber, and Fred Cummins. Learning to forget: Continual prediction with lstm. Neural computation, 12(10):2451–2471, 2000. [9] Joshua Goodman. Classes for fast maximum entropy training. In Acoustics, Speech, and Signal Processing, 2001. Proceedings.(ICASSP’01). 2001 IEEE International Conference on, volume 1, pages 561–564. IEEE, 2001. [10] Alex Graves. Generating sequences with recurrent neural networks. arXiv preprint arXiv:1308.0850, 2013. [11] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8):1735–1780, 1997. [12] Shihao Ji, SVN Vishwanathan, Nadathur Satish, Michael J Anderson, and Pradeep Dubey. Blackout: Speeding up recurrent neural network language models with very large vocabularies. arXiv preprint arXiv:1511.06909, 2015. [13] Yoon Kim, Yacine Jernite, David Sontag, and Alexander M Rush. Character-aware neural language models. arXiv preprint arXiv:1508.06615, 2015. [14] Tomas Mikolov, Martin Karafiát, Lukas Burget, Jan Cernock`y, and Sanjeev Khudanpur. Recurrent neural network based language model. In INTERSPEECH, volume 2, page 3, 2010. [15] Tomáš Mikolov, Stefan Kombrink, Lukáš Burget, Jan Honza ˇCernock`y, and Sanjeev Khudanpur. Extensions of recurrent neural network language model. In Acoustics, Speech and Signal Processing (ICASSP), 2011 IEEE International Conference on, pages 5528–5531. IEEE, 2011. [16] Andriy Mnih and Geoffrey E Hinton. A scalable hierarchical distributed language model. In Advances in neural information processing systems, pages 1081–1088, 2009. [17] Frederic Morin and Yoshua Bengio. Hierarchical probabilistic neural network language model. In Aistats, volume 5, pages 246–252. Citeseer, 2005. [18] Christos H Papadimitriou and Kenneth Steiglitz. Combinatorial optimization: algorithms and complexity. Courier Corporation, 1982. [19] Jan Pomikálek, Milos Jakubícek, and Pavel Rychl`y. Building a 70 billion word corpus of english from clueweb. In LREC, pages 502–506, 2012. [20] Robert Preis. Linear time 1/2-approximation algorithm for maximum weighted matching in general graphs. In STACS 99, pages 259–269. Springer, 1999. [21] Ha¸sim Sak, Andrew Senior, and Françoise Beaufays. Long short-term memory based recurrent neural network architectures for large vocabulary speech recognition. arXiv preprint arXiv:1402.1128, 2014. [22] Martin Sundermeyer, Ralf Schlüter, and Hermann Ney. Lstm neural networks for language modeling. In INTERSPEECH, pages 194–197, 2012. [23] Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In Advances in neural information processing systems, pages 3104–3112, 2014. [24] Duyu Tang, Bing Qin, and Ting Liu. Document modeling with gated recurrent neural network for sentiment classification. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pages 1422–1432, 2015. [25] Paul J Werbos. Backpropagation through time: what it does and how to do it. Proceedings of the IEEE, 78(10):1550–1560, 1990. [26] Jason Weston, Sumit Chopra, and Antoine Bordes. Memory networks. arXiv preprint arXiv:1410.3916, 2014. [27] Dong Yu, Adam Eversole, Mike Seltzer, Kaisheng Yao, Zhiheng Huang, Brian Guenter, Oleksii Kuchaiev, Yu Zhang, Frank Seide, Huaming Wang, et al. An introduction to computational networks and the computational network toolkit. Technical report, Technical report, Tech. Rep. MSR, Microsoft Research, 2014, 2014. research. microsoft. com/apps/pubs, 2014. [28] Wojciech Zaremba, Ilya Sutskever, and Oriol Vinyals. Recurrent neural network regularization. arXiv preprint arXiv:1409.2329, 2014. 9 | 2016 | 445 |
6,378 | Deep Learning Games Dale Schuurmans∗ Google daes@ualberta.ca Martin Zinkevich Google martinz@google.com Abstract We investigate a reduction of supervised learning to game playing that reveals new connections and learning methods. For convex one-layer problems, we demonstrate an equivalence between global minimizers of the training problem and Nash equilibria in a simple game. We then show how the game can be extended to general acyclic neural networks with differentiable convex gates, establishing a bijection between the Nash equilibria and critical (or KKT) points of the deep learning problem. Based on these connections we investigate alternative learning methods, and find that regret matching can achieve competitive training performance while producing sparser models than current deep learning strategies. 1 Introduction In this paper, we investigate a new approach to reducing supervised learning to game playing. Unlike well known reductions [8, 29, 30], we avoid duality as a necessary component in the reduction, which allows a more flexible perspective that can be extended to deep models. An interesting finding is that the no-regret strategies used to solve large-scale games [35] provide effective stochastic training methods for supervised learning problems. In particular, regret matching [12], a step-size free algorithm, appears capable of efficient stochastic optimization performance in practice. A central contribution of this paper is to demonstrate how supervised learning of a directed acyclic neural network with differentiable convex gates can be expressed as a simultaneous move game with simple player actions and utilities. For variations of the learning problem (i.e. whether regularization is considered) we establish connections between the critical points (or KKT points) and Nash equilibria in the corresponding game. As expected, deep learning games are not simple, since even approximately training deep models is hard in the worst case [13]. Nevertheless, the reduction reveals new possibilities for training deep models that have not been previously considered. In particular, we discover that regret matching with simple initialization can offer competitive training performance compared to state-of-the-art deep learning heuristics while providing sparser solutions. Recently, we have become aware of unpublished work [2] that also proposes a reduction of supervised deep learning to game playing. Although the reduction presented in this paper was developed independently, we acknowledge that others have also begun to consider the connection between deep learning and game theory. We compare these two specific reductions in Appendix J, and outline the distinct advantages of the approach developed in this paper. 2 One-Layer Learning Games We start by considering the simpler one-layer case, which allows us to introduce the key concepts that will then be extended to deep models. Consider the standard supervised learning problem where one is given a set of paired data {(xt, yt)}T t=1, such that (xt, yt) ∈X ×Y, and wishes to learn a ∗Work performed at Google Brain while on a sabbatical leave from the University of Alberta. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. predictor h:X →Y. For simplicity, we assume X = Rm and Y = Rn. A standard generalized linear model can be expressed as h(x) = φ(θx) for some output transfer function φ : Rn →Rn and matrix θ ∈Rn×m denoting the trainable parameters of the model. Despite the presence of the transfer function φ, such models are typically trained by minimizing an objective that is convex in z = θx. OLP (One-layer Learning Problem) Given a loss function ℓ: Rn × Rn →R that is convex in the first argument, let ℓt(z) = ℓ(z, yt) and Lt(θ) = ℓt(θxt). The training problem is to minimize L(θ) = T −1 PT t=1 Lt(θ) with respect to the parameters θ. We first identify a simple game whose Nash equilibria correspond to global minima of the one-layer learning problem. This basic relationship establishes a connection between supervised learning and game playing that we will exploit below. Although this reduction is not a significant contribution by itself, the one-layer case allows us to introduce some key concepts that we will deploy later when considering deep neural networks. A one-shot simultaneous move game is defined by specifying: a set of players, a set of actions for each player, and a set of utility functions that specify the value to each player given a joint action selection [36, Page 9] (also see Appendix E). Corresponding to the OLP specified above, we propose the following game. OLG (One-layer Learning Game) There are two players, a protagonist p and an antagonist a. The protagonist chooses a parameter matrix θ ∈Rm×n. The antagonist chooses a set of T vectors and scalars {at, bt}T t=1, at ∈Rn, bt ∈R, such that a⊤ t z + bt ≤ℓt(z) for all z ∈Rn; that is, the antagonist chooses an affine minorant of the local loss for each training example. Both players make their action choice without knowledge of the other player’s choice. Given a joint action selection (θ, {at, bt}) we define the utility of the antagonist as U a = T −1 PT t=1 a⊤ t θxt + bt, and the utility of the protagonist as U p = −U a. This is a two-person zero-sum game with continuous actions. A Nash equilibrium is defined by a joint assignment of actions such that no player has any incentive to deviate. That is, if σp = θ denotes the action choice for the protagonist and σa = {at, bt} the choice for the antagonist, then the joint action σ = (σp, σa) is a Nash equilibrium if U p(˜σp, σa) ≤ U p(σp, σa) for all ˜σp, and U a(σp, ˜σa) ≤U a(σp, σa) for all ˜σa. Using this characterization one can then determine a bijection between the Nash equilibria of the OLG and the global minimizers of the OLP. Theorem 1 (1) If (θ∗, {at, bt}) is a Nash equilibrium of the OLG, then θ∗must be a global minimum of the OLP. (2) If θ∗is a global minimizer of the OLP, then there exists an antagonist strategy {at, bt} such that (θ∗, {at, bt}) is a Nash equilibrium of the OLG. (All proofs are given in the appendix.) Thus far, we have ignored the fact that it is important to control model complexity to improve generalization, not merely minimize the loss. Although model complexity is normally controlled by regularizing θ, we will find it more convenient to equivalently introduce a constraint θ ∈Θ for some convex set Θ (which we assume satisfies an appropriate constraint qualification; see Appendix C). The learning problem and corresponding game can then be modified accordingly while still preserving the bijection between their solution concepts. OCP (One-layer Constrained Learning Problem) Add optimization constraint θ ∈Θ to the OLP. OCG (One-layer Constrained Learning Game) Add protagonist action constraint θ ∈Θ to OLG. Theorem 2 (1) If (θ∗, {at, bt}) is a Nash equilibrium of the OCG, then θ∗must be a constrained global minimum of the OCP. (2) If θ∗is a constrained global minimizer of the OCP, then there exists an antagonist strategy {at, bt} such that (θ∗, {at, bt}) is a Nash equilibrium of the OCG. 2.1 Learning Algorithms The tight connection between convex learning and two-person zero-sum games raises the question of whether techniques for finding Nash equilibria might offer alternative training approaches. Surprisingly, the answer appears to be yes. There has been substantial progress in on-line algorithms for finding Nash equilibria, both in theory [5, 24, 34] and practice [35]. In the two-person zero-sum case, large games are solved by pitting two regret-minimizing learning algorithms against each other, exploiting the fact that when both achieve a regret rate of ǫ/2, their respective average strategies form an ǫ-Nash equilibrium [38]. For the game as described above, where the protagonist action is θ ∈Θ and the antagonist action is denoted σa, 2 we imagine playing in rounds, where on round k the joint action is denoted by σ(k) = (θ(k), σ(k) a ). Since the utility function for each player U i for i ∈{p, a}, is affine in their own action choice for any fixed action chosen by the other player, each faces an online convex optimization problem [37] (note that maximizing U i is equivalent to minimizing −U i; see also Appendix G). The total regret of a player, say the protagonist, is defined with respect to their utility function after K rounds as Rp(σ(1) . . . σ(K)) = maxθ∈Θ PK k=1 U p(θ, σ(k) a ) −U p(θ(k), σ(k) a ). (Nature can also be introduced to choose a random training example on each round, which simply requires the definition of regret to be expressed in terms of expectations over nature’s choices.) To accommodate regularization in the learning problem, we impose parameter constraints Θ. A particularly interesting case occurs when one defines Θ = {θ : ∥θ∥1 ≤β}, since the L1 ball constraint is equivalent to imposing L1 regularization. There are two distinct advantages to L1 regularization in this context. First, as is well known, L1 encourages sparsity in the solution. Second, and much less appreciated, is the fact that any polytope constraint allows one to reduce the constrained online convex optimization problem to learning from expert advice over a finite number of experts [37]: Given a polytope Θ, define the convex hull basis H(Θ) to be a matrix whose columns are the vertices in Θ. An expert can then be assigned to each vertex in H(Θ), and an algorithm for learning from expert advice can then be applied by mapping its strategy on round k, ρ(k) (a probability distribution over the experts), back to an action choice in the original problem via θ(k) = H(Θ)ρ(k), while the utility vector on round k, u(k), can be passed back to the experts via H(Θ)⊤u(k) [37]. Since this reduction allows any method for learning from expert advice to be applied to L1 constrained online convex optimization, we investigated whether alternative algorithms for supervised training might be uncovered. We considered two algorithms for learning from expert advice: the normalized exponentiated weight algorithm (EWA) [22, 32] (Algorithm 3); and regret matching (RM), a simpler method from the economics and game theory literature [12] (Algorithm 2). For supervised learning, these algorithms operate by using a stochastic sample of the gradient to perform their updates (outer loop Algorithm 1). EWA possesses superior regret bounds that demonstrate only a logarithmic dependence on the number of actions; however RM is simpler, hyperparameter-free, and still possesses reasonable regret bounds [9, 10]. Although exponentiated gradient methods have been applied to supervised learning [18, 32], we not aware of any previous attempt to apply regret matching to supervised training. We compared these to projected stochastic gradient descent (PSGD), which is the obvious modification of stochastic gradient descent (SGD) that retains a similar regret bound [7, 28] (Algorithm 4). 2.2 Evaluation To investigate the utility of these methods for supervised learning, we conducted experiments on synthetic data and on the MNIST data set [20]. Note that PSGD and EWA have a step size parameter, η(k), that greatly affects their performance. The best regret bounds are achieved for step sizes of the form ηk−1/2 and η log(m)k−1/2 respectively [28]; we also tuned η to generate the best empirical results. Since the underlying optimization problems are convex, these experiments merely focus on the speed of convergence to a global minimum of the constrained training problem. The first set of experiments considered synthetic problems. The data dimension was set to m = 10, and T = 100 training points were drawn from a standard multivariate Gaussian. For univariate prediction, a random hyperplane was chosen to label the data (hence the data was linearly separable, but not with a large margin). The logistic training loss achieved by the running average of the protagonist strategy ¯θ over the entire training set is plotted in Figure 1a. For multivariate prediction, a 4×10 target matrix, θ∗, was randomly generated to label training data by arg max(θ∗xt). The training softmax loss achieved by the running average of the protagonist strategy ¯θ over the entire training set is shown in Figure 1b. The third experiment was conducted on MNIST, which is an n = 10 class problem over m = 784 dimensional inputs with T = 60, 000 training examples, evidently not linearly separable. For this experiment, we used mini-batches of size 100. The training loss of the running average protagonist strategy ¯θ (single run) is shown in Figure 1c. The apparent effectiveness of RM in these experiments is a surprising outcome. Even after tuning η for both PSGD and EWA, they do not surpass the performance of RM, which is hyperparameter free. We did not anticipate this observation; the effectiveness of RM for supervised learning appears not to have been previously noticed. (We do not expect RM to be competitive in high dimensional sparse problems, since its regret bound has a square root and not a logarithmic dependence on n [9].) 3 (a) Logistic loss, synthetic data. (b) Softmax loss, synthetic data. (c) Softmax loss, MNIST data. Figure 1: Training loss achieved by different no-regret algorithms. Subfigures (a) and (b) are averaged over 100 repeats, log scale x-axis. Subfigure (c) is averaged over 10 repeats (psgd theory off scale). 3 Deep Learning Games A key contribution of this paper is to show how the problem of training a feedforward neural network with differentiable convex gates can be reduced to a game. A practical consequence of this reduction is that it suggests new approaches to training deep models that are inspired by methods that have recently proved successful for solving massive-scale games. Feedforward Neural Network A feedforward neural network is defined by a directed acyclic graph with additional objects attached to the vertices and edges. The network architecture is specified by N = (V, E, I, O, F), where V is a set of vertices, E ⊆V ×V is a set of edges, I = {i1 . . . im} ⊂V is a set of input vertices, O = {o1 . . . on} ⊂V is a set of output vertices, and F = {fv : v ∈V } is a set of activation functions, where fv : R →R. The trainable parameters are given by θ : E →R. In the graph defined by G = (V, E), a path (v1, ..., vk) consists of a sequence of vertices such that (vj, vj+1) ∈E for all j. A cycle is a path where the first and last vertex are equal. We assume that G contains no cycles, the input vertices have no incoming edges (i.e. (u, i) ̸∈E for all i ∈I, u ∈V ), and the output vertices have no outgoing edges (i.e. (o, v) ̸∈E for all o ∈O, v ∈V ). A directed acyclic graph generates a partial order ≤on the vertices where u ≤v if and only if there is a path from u to v. For all v ∈V , define Ev = {(u, u′) ∈E : u′ = v}. The network is related to the training data by assuming |I| = m, the number of input vertices corresponds to the number of input features, and |O| = n, the number of output vertices corresponds to the number of output dimensions. It is a good idea (but not required) to have two additional bias inputs, whose corresponding input features are always set to 0 and 1, respectively, and have edges to all non-input nodes in the graph. Usually, the activation functions on input and output nodes are the identity, i.e. fv(x) = x for v ∈I ∪O. Given a training input xt ∈Rm, the computation of the network N is expressed by a circuit value function ct that assigns values to each vertex based on the partial order over vertices: ct(ik, θ) = fik(xtk) for ik ∈I; ct(v, θ) = fv P u:(u,v)∈E ct(u, θ)θ(u, v) for v ∈V −I. (1) Let ct(o, θ) denote the vector of values at the output vertices, i.e. (ct(o, θ))k = ct(ok, θ). Since each fv is assumed differentiable, the output ct(o, θ) must also be differentiable with respect to θ. When we wish to impose constraints on θ we assume the constraints factor over vertices, and are applied across the incoming edges to each vertex. That is, for each v ∈V −I the parameters θ restricted to Ev are required to be in a set Θv ⊆REv, and Θ = Q v∈V −I Θv. (We additionally assume each Θv satisfies constraint qualifications—see Appendix C—and can also alter the factorization requirement to allow more complex network architectures—see Appendix H). If Θ = RE, we consider the network to be unconstrained. If Θ is bounded, we consider the network to be bounded. DLP (Deep Learning Problem) Given a loss function ℓ(z, y) that is convex in the first argument satisfying 0 ≤ℓ(z, y) < ∞for all z ∈Rn, define ℓt(z) = ℓ(z, yt) and Lt(θ) = ℓt(ct(o, θ)). The training problem is to find a θ ∈Θ that minimizes L(θ) = T −1 PT t=1 Lt(θ). DLG (Deep Learning Game) We define a one-shot simultaneous move game [36, page 9] with infinite action sets (Appendix E); we need to specify the players, action sets, and utility functions. 4 Players: The players consist of a protagonist p for each v ∈V −I, an antagonist a, and a set of self-interested zannis sv, one for each vertex v ∈V .2 Actions: The protagonist for vertex v chooses a parameter function θv ∈Θv. The antagonist chooses a set of T vectors and scalars {at, bt}T t=1, at ∈Rn, bt ∈R, such that a⊤ t z + bt ≤ℓt(z) for all z ∈Rn; that is, the antagonist chooses an affine minorant of the local loss for each training example. Each zanni sv chooses a set of 2T scalars (qvt, dvt), qvt ∈R, dvt ∈R, such that qvtz + dvt ≤fv(z) for all z ∈R; that is, the zanni chooses an affine minorant of its local activation function fv for each training example. All players make their action choice without knowledge of the other player’s choice. Utilities: For a joint action σ = (θ, {at, bt}, {qvt, dvt}), the zannis’ utilities are defined recursively following the parial order on vertices. First, for each i ∈I the utility for zanni si on training example t is U s it(σ) = dit + qitxit, and for each v ∈V −I the utility for zanni sv on example t is U s vt(σ) = dvt + qvt P u:(u,v)∈E U s tu(σ)θ(u, v). The total utility for each zanni sv is given by U s v(σ) = PT t=1 U s vt(σ) for v ∈V . The utility for the antagonist a is then given by U a = T −1 PT t=1 U a t where U a t (σ) = bt + Pn k=1 aktU s okt(σ). The utility for all protagonists are the same, U p(σ) = −U a(σ). (This representation also allows for an equivalent game where nature selects an example t, tells the antagonist and the zannis, and then everyone plays their actions simultaneously.) The next lemma shows how the zannis and the antagonist can be expected to act. Lemma 3 Given a fixed protagonist action θ, there exists a unique joint action for all agents σ = (θ, {at, bt}, {qvt, dvt}) where the zannis and the antagonist are playing best responses to σ. Moreover, U p(σ) = −L(θ), ∇θU p(σ) = −∇L(θ), and given some protagonist at v ∈V −I, if we hold all other agents’ strategies fixed, U p(σ) is an affine function of the strategy of the protagonist at v. We define σ as the joint action expansion for θ. There is more detail in the appendix about the joint action expansion. However, the key point is that if the current cost and partial derivatives can be calculated for each parameter, one can construct the affine function for each agent. We will return to this in Section 3.1. A KKT point is a point that satisfies the KKT conditions [15, 19]: roughly, that either it is a critical point (where the gradient is zero), or it is a point on the boundary of Θ where the gradient is pointing out of Θ “perpendicularly” (see Appendix C). We can now state the main theorem of the paper, showing a one to one relationship between KKT points and Nash equilibria. Theorem 4 (DLG Nash Equilibrium) The joint action σ =(θ, {at, bt}, {qvt, dvt}) is a Nash equilibrium of the DLG iff it is the joint action expansion for θ and θ is a KKT point of the DLP. Corollary 5 If the network is unbounded, the joint action σ = (θ, {at, bt}, {qvt, dvt}) is a Nash equilibrium of the DLG iff it is the joint action expansion for θ and θ is a critical point of the DLP. Finally we note that sometimes we need to add constraints between edges incident on different nodes. For example, in a convolutional neural network, one will have edges e = {u, v} and e′ = {u′, v′} such that there is a constraint θe = θe′ (see Appendix H). In game theory, if two agents act simultaneously it is difficult to have one agent’s viable actions depend on another agent’s action. Therefore, if parameters are constrained in this manner, it is better to have one agent control both. The appendix (beginning with Appendix B) extends our model and theory to handle such parameter tying, which allows us to handle both convolutional networks and non-convex activation functions (Appendix I). Our theory does not apply to non-smooth activation functions, however (e.g. ReLU gates), but these can be approximated arbitrarily closely by differentiable activations. 3.1 Learning Algorithms Characterizing the deep learning problem as a game motivates the consideration of equilibrium finding methods as potential training algorithms. Given the previous reduction to expert algorithms, we will consider the use of the L1 ball constraint Θv = {θv : ∥θv∥1 ≤β} at each vertex v. For deep learning, we have investigated a simple approach by training independent protagonist agents at each vertex against a best response antagonist and best response zannis [14]. In this case, it is possible 2 Nomenclature explanation: Protagonists nominally strive toward a common goal, but their actions can interfere with one another. Zannis are traditionally considered servants, but their motivations are not perfectly aligned with the protagonists. The antagonist is diametrically opposed to the protagonists. 5 Algorithm 1 Main Loop On round k, observe some xt (or mini batch) Antagonist and zannis choose best responses which ensures ∇U p v (θv) = −∇L(θ(k) v ) g(k) v ←∇U p v (θv) Apply update to r(k) v , ρ(k) v and θ(k) v ∀v ∈V Algorithm 2 Regret Matching (RM) r(k+1) v ←r(k) v + H(Θv)⊤g(k) v − ρ(k) v ⊤H(Θv)⊤g(k) v ρ(k+1) v ← r(k+1) v +/ 1⊤ r(k+1) v + θ(k+1) v ←H(Θv)ρ(k+1) v Algorithm 3 Exp. Weighted Average (EWA) r(k+1) v ←r(k) v + η(k)H(Θv)⊤g(k) v ρ(k+1) v ←exp(r(k+1) v )/(1⊤exp(r(k+1) v )) θ(k+1) v ←H(Θv)ρ(k+1) v Algorithm 4 Projected SGD r(k+1) v ←r(k) v + η(k)H(Θv)⊤g(k) v ρ(k+1) v ←L2_project_to_simplex(r(k+1) v ) θ(k+1) v ←H(Θv)ρ(k+1) v to devise interesting and novel learning strategies based on the algorithms for learning from expert advice. Since the optimization problem is no longer convex in a local protagonist action θv, we do not expect convergence to a joint, globally optimal strategy among protagonists. Nevertheless, one can develop a generic approach for using the game to generate a learning algorithm. Algorithm Outline On each round, nature chooses a random training example (or mini-batch). For each v ∈V , each protagonist v selects her actions θv ∈Θv deterministically. The antagonist and zannis then select their actions, which are best responses to the θv and to each other.3 The protagonist utilities U p v are then calculated. Given the zanni and antagonist choices, U p v is affine in the protagonist’s action, and also by Lemma 3 for all e ∈Ev, we have ∂Lt ∂we = −∂U p v (θv) ∂we . Each protagonist v ∈V then observes their utility and uses this to update their strategy. See Algorithm 1 for the general loop, and Algorithms 2, 3 and 4 for specific updates. Given the characterization developed previously, we know that a Nash equilibrium will correspond to a critical point in the training problem (which is almost certain to be a local minimum rather than a saddle point [21]). It is interesting to note that the usual process of backpropagating the sampled (sub)gradients corresponds to computing the best response actions for the zannis and the antagonist, which then yields the resulting affine utility for the protagonists. 3.2 Experimental Evaluation We conducted a set of experiments to investigate the plausibility of applying expert algorithms at each vertex in a feedforward neural network. For comparison, we considered current methods for training deep models, including SGD [3], SGD with momentum [33], RMSprop, Adagrad [6], and Adam [17]. Since none of these impose constraints, they technically solve an easier optimization problem, but they are also un-regularized and therefore might exhibit weaker generalization. We tuned the step size parameter for each comparison method on each problem. For the expert algorithms, RM, EWA and PSGD, we found that EWA and PSGD were not competitive, even after tuning their step sizes. For RM, we initially found that it learned too quickly, with the top layers of the model becoming sparse; however, we discovered that RM works remarkably well simply by initializing the cumulative regret vectors r(0) v with random values drawn from a Gaussian with large standard deviation σ. As a sanity check, we first conducted experiments on synthetic combinatorial problems: “parity”, defined by y = x1 ⊕· · · ⊕xm and “folded parity”, defined by y = (x1 ∧x2) ⊕· · · ⊕(xm−1 ∧xm) [27]. Parity cannot be approximated by a single-layer model but is representable with a single hidden layer of linear threshold gates [11], while folded parity is known to be not representable by a (small weights) linear threshold circuit with only a single hidden layer; at least two hidden layers are required [27]. For parity we trained a m-4m-1 architecture, and for folded parity we trained a m-4m-4m-1 architecture, both fully connected, m = 8. Here we chose the L1 constraint bound to be β = 10 and the initialization scale as σ = 100. For the nonlinear activation functions we used a smooth 3 Conceptually, each zanni has a copy of the algorithm of each protagonist and an algorithm for selecting a joint action for all antagonists and zannis, and thus do not technically depend upon θv. In practice, these multiple copies are unnecessary, and one merely calculates θv ∈Θv first. 6 (a) Learning Parity with logistic loss. (b) MNIST, full layers, train loss. (c) MNIST, full layers, test error. (d) Folded Parity, logistic loss. (e) MNIST, convolutional, train loss. (f) MNIST, convolutional, test error. Figure 2: Experimental results. (a) Parity, m-4m-1 architecture, 100 repeats. (d) Folded parity, m-4m-4m-1 architecture, 100 repeats. (b) and (c): MNIST, 784-1024-1024-10 architecture, 10 repeats. (e) and (f): MNIST, 28×28-c(5×5, 64)-c(5×5, 64)-c(5×5, 64)-10 architecture, 10 repeats. approximation of the standard ReLU gate fv(x) = τ log(1 + ex/τ) with τ = 0.5. The results shown in Figure 2a and Figure 2d confirm that RM performs competitively, even when producing models with sparsity, top to bottom, of 18% and 13% for parity, and 27%, 19% and 21% for folded parity. We next conducted a few experiments on MNIST data. The first experiment used a fully connected 784-1024-1024-10 architecture, where RM was run with β = 30 and initialization scales (σ1, σ2, σ3) = (50, 200, 50). The second experiment was run with a convolutional architecture 28×28-c(5×5, 64)-c(5×5, 64)-c(5×5, 64)-10 (convolution windows 5×5 with depth 64), where RM was run with (β1, β2, β3, β4) = (30, 30, 30, 10) and initialization scales σ = 500. The mini-batch size was 100, and the x-axis in the plots give results after each “update” batch of 600 mini-batches (i.e. one epoch over the training data). The training loss and test loss are shown in Figures 2b, 2c, 2e and 2f, showing the evolution of the training loss and test misclassification errors. We dropped all but SGD, Adam, RMSprop and RM here, since these seemed to dominate the other methods in our experiments. It is surprising that RM can demonstrate convergence rates that are competitive with tuned RMSprop, and even outperforms methods like SGD and Adam that are routinely used in practice. An even more interesting finding is that the solutions found by RM were sparse while achieving lower test misclassification errors than standard deep learning methods. In particular, in the fully connected case, the final solution produced by RM zeroed out 32%, 26% and 63% of the parameter matrices (from the input to the output layer) respectively. For the convolutional case, RM zeroed out 29%, 27%, 28% and 43% of the parameter matrices respectively. Regarding run times, we observed that our Tensorflow implementation of RM was only 7% slower than RMSProp on the convolutional architecture, but 85% slower in the fully connected case. 4 Related Work There are several works that consider using regret minimization to solve offline optimization problems. Once stochastic gradient descent was connected to regret minimization in [4], a series of papers followed [26, 25, 31]. Two popular approaches are currently Adagrad [6] and traditional stochastic gradient descent. The theme of simplifying the loss is very common: it appears in batch gradient and incremental gradient approaches [23] as the majorization-minimization family of algorithms. In the 7 regret minimization literature, the idea of simplifying the class of losses by choosing a minimizer from a particular family of functions first appeared in [37], and has since been further developed. By contrast, the history of using games for optimization has a much shorter history. It has been shown that a game between people can be used to solve optimal coloring [16]. There is also a history of using regret minimization in games: of interest is [38] that decomposes a single agent into multiple agents, providing some inspiration for this paper. In the context of deep networks, a paper of interest connects brain processes to prediction markets [1]. However, the closest work appears to be the recent manuscript [2] that also poses the optimization of a deep network as a game. Although the games described there are similar, unlike [2], we focus on differentiable activation functions, and define agents with different information and motivations. Importantly, [2] does not characterize all the Nash equilibria in the game proposed. We discuss these issues in more detail in Appendix J. 5 Conclusion We have investigated a reduction of deep learning to game playing that allowed a bijection between KKT points and Nash equilibria. One of the novel algorithms considered for supervised learning, regret matching, appears to provide a competitive alternative that has the additional benefit of achieving sparsity without unduly sacrificing speed or accuracy. It will be interesting to investigate alternative training heuristics for deep games, and whether similar successes can be achieved on larger deep models or recurrent models. References [1] D. Balduzzi. Cortical prediction markets. In Proceedings of the 2014 International Conference on Autonomous Agents and Multi-agent Systems, pages 1265–1272, 2014. [2] D. Balduzzi. Deep online convex optimization using gated games. http://arxiv.org/abs/1604.01952, 2016. [3] L. Bottou. Stochastic gradient descent tricks. In Neural Networks: Tricks of the Trade - Second Edition, pages 421–436. 2012. [4] N. Cesa-Bianchi, A. Conconi, and C. Gentile. On the generalization ability of on-line learning algorithms. IEEE Transactions on Information Theory, 50(9):2050–2057, September 2004. [5] N. Cesa-Bianchi and G. Lugosi. Prediction, learning, and games. Cambridge University Press, 2006. [6] J. Duchi, E. Hazan, and Y. Singer. Adaptive subgradient methods for online learning and stochastic optimization. Journal of Machine Learning Research, 12:2121–2159, 2011. [7] J. Duchi, S. Shalev-Shwartz, Y. Singer, and T. Chandra. Efficient projections onto the l1-ball for learning in high dimensions. In Inter. Conf. on Machine Learning, pages 272–279, 2008. [8] Y. Freund and R. Schapire. Adaptive game playing using multiplicative weights. Games and Economic Behavior, 29(1-2):79–103, 1999. [9] G. Gordon. No-Regret algorithms for structured prediction problems. Technical Report CMU-CALD-05112, Carnegie Mellon University, 2005. [10] G. Gordon. No-regret algorithms for online convex programs. In NIPS 19, 2006. [11] A. Hajnal. Threshold circuits of bounded depth. JCSS, 46(2):129–154, 1993. [12] S. Hart and A. Mas-Colell. A simple adaptive procedure leading to correlated equilibrium. Econometrica, 68(5):1127–1150, 2000. [13] K. Hoeffgen, H. Simon, and K. Van Horn. Robust trainability of single neurons. JCSS, 52(2):114–125, 1995. [14] M. Johanson, N. Bard, N. Burch, and M. Bowling. Finding optimal abstract strategies in extensive form games. In AAAI Conference on Artificial Intelligence, pages 1371–1379, 2012. [15] W. Karush. Minima of functions of several variables with inequalities as side constraints. Master’s thesis, Univ. of Chicago, Chicago, Illinois, 1939. 8 [16] M. Kearns, S. Suri, and N. Montfort. An experimental study of the coloring problem on human subject networks. Science, 313:824–827, 2006. [17] D. Kingma and J. Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. [18] J. Kivinen and M. Warmuth. Exponentiated gradient versus gradient descent for linear predictors. Information and Computation, 132(1):1–63, 1997. [19] H. Kuhn and A. Tucker. Nonlinear programming. In Proceedings of 2nd Berkeley Symposium, pages 481–492. University of California Press, 1951. [20] 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. [21] J. Lee, M. Simchowitz, M. Jordan, and B. Recht. Gradient Descent Only Converges to Minimizers. In 29th Annual Conference on Learning Theory, volume 49, 2016. [22] N. Littlestone and M. Warmuth. The weighted majority algorithm. Inf. Comput., 108(2):212–261, 1994. [23] J. Mairal. Incremental majorization-minimization optimization with application to large-scale machine learning. SIAM Journal on Optimization, 25(2):829–855, 2015. [24] A. Rakhlin and K. Sridharan. Optimization, learning, and games with predictable sequences. In Advances in Neural Information Processing Systems 26, pages 3066–3074, 2013. [25] N. Ratliff, D. Bagnell, and M. Zinkevich. Subgradient methods for structured prediction. In Eleventh International Conference on Artificial Intelligence and Statistics (AISTATS-07), 2007. [26] N. Ratliff, J. A. Bagnell, and M. Zinkevich. Maximum margin planning. In Twenty Second International Conference on Machine Learning (ICML-06), 2006. [27] A. Razborov. On small depth threshold circuits. In Algorithm Theory (SWAT 92), 1992. [28] S. Shalev-Shwartz. Online learning and online convex optimization. Foundations and Trends in Machine Learning, 4(2):107–194, 2012. [29] S. Shalev-Shwartz and Y. Singer. Convex repeated games and Fenchel duality. In NIPS 19, 2006. [30] S. Shalev-Shwartz and Y. Singer. A primal-dual perspective of online learning algorithms. Machine Learning, 69(2-3):115–142, 2007. [31] 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. [32] N. Srinivasan, V. Ravichandran, K. Chan, J. Vidhya, S. Ramakirishnan, and S. Krishnan. Exponentiated backpropagation algorithm for multilayer feedforward neural networks. In ICONIP, volume 1, 2002. [33] I. Sutskever, J. Martens, G. Dahl, and G. Hinton. On the importance of initialization and momentum in deep learning. In Proceedings ICML, pages 1139–1147, 2013. [34] V. Syrgkanis, A. Agarwal, H. Luo, and R. Schapire. Fast convergence of regularized learning in games. In Advances in Neural Information Processing Systems 28, pages 2971–2979, 2015. [35] O. Tammelin, N. Burch, M. Johanson, and M. Bowling. Solving heads-up limit Texas hold’em. In International Joint Conference on Artificial Intelligence, IJCAI, pages 645–652, 2015. [36] V. Vazirani, N. Nisan, T. Roughgarden, and É Tardos. Algorithmic Game Theory. Cambridge Press, 2007. [37] M. Zinkevich. Online convex programming and generalized infinitesimal gradient ascent. In Twentieth International Conference on Machine Learning, 2003. [38] M. Zinkevich, M. Bowling, M. Johanson, and C. Piccione. Regret minimization in games with incomplete information. In NIPS, 2007. 9 | 2016 | 446 |
6,379 | Strategic Attentive Writer for Learning Macro-Actions Alexander (Sasha) Vezhnevets, Volodymyr Mnih, John Agapiou, Simon Osindero, Alex Graves, Oriol Vinyals, Koray Kavukcuoglu Google DeepMind {vezhnick,vmnih,jagapiou,osindero,gravesa,vinyals,korayk}@google.com Abstract We present a novel deep recurrent neural network architecture that learns to build implicit plans in an end-to-end manner purely by interacting with an environment in reinforcement learning setting. The network builds an internal plan, which is continuously updated upon observation of the next input from the environment. It can also partition this internal representation into contiguous sub-sequences by learning for how long the plan can be committed to – i.e. followed without replaning. Combining these properties, the proposed model, dubbed STRategic Attentive Writer (STRAW) can learn high-level, temporally abstracted macro-actions of varying lengths that are solely learnt from data without any prior information. These macro-actions enable both structured exploration and economic computation. We experimentally demonstrate that STRAW delivers strong improvements on several ATARI games by employing temporally extended planning strategies (e.g. Ms. Pacman and Frostbite). It is at the same time a general algorithm that can be applied on any sequence data. To that end, we also show that when trained on text prediction task, STRAW naturally predicts frequent n-grams (instead of macro-actions), demonstrating the generality of the approach. 1 Introduction Using reinforcement learning to train neural network controllers has recently led to rapid progress on a number of challenging control tasks [15, 17, 26]. Much of the success of these methods has been attributed to the ability of neural networks to learn useful abstractions or representations of the stream of observations, allowing the agents to generalize between similar states. Notably, these agents do not exploit another type of structure – the one present in the space of controls or policies. Indeed, not all sequences of low-level controls lead to interesting high-level behaviour and an agent that can automatically discover useful macro-actions should be capable of more efficient exploration and learning. The discovery of such temporal abstractions has been a long-standing problem in both reinforcement learning and sequence prediction in general, yet no truly scalable and successful architectures exist. We propose a new deep recurrent neural network architecture, dubbed STRategic Attentive Writer (STRAW), that is capable of learning macro-actions in a reinforcement learning setting. Unlike the vast majority of reinforcement learning approaches [15, 17, 26], which output a single action after each observation, STRAW maintains a multi-step action plan. STRAW periodically updates the plan based on observations and commits to the plan between the replanning decision points. The replanning decisions as well as the commonly occurring sequences of actions, i.e. macro-actions, are learned from rewards. To encourage exploration with macro-actions we introduce a noisy communication channel between a feature extractor (e.g. convolutional neural network) and the planning modules, taking inspiration from recent developments in variational auto-encoders [11, 13, 24]. Injecting noise at this level of the network generates randomness in plans updates that cover multiple time steps and thereby creates the desired effect. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Our proposed architecture is a step towards more natural decision making, wherein one observation can generate a whole sequence of outputs if it is informative enough. This provides several important benefits. First and foremost, it facilitates structured exploration in reinforcement learning – as the network learns meaningful action patterns it can use them to make longer exploratory steps in the state space [4]. Second, since the model does not need to process observations while it is committed to its action plan, it learns to allocate computation to key moments thereby freeing up resources when the plan is being followed. Additionally, the acquisition of macro-actions can aid transfer and generalization to other related problems in the same domain (assuming that other problems from the domain share similar structure in terms of action-effects). We evaluate STRAW on a subset of Atari games that require longer term planning and show that it leads to substantial improvements in scores. We also demonstrate the generality of the STRAW architecture by training it on a text prediction task and show that it learns to use frequent n-grams as the macro-actions on this task. The following section reviews the related work. Section 3 defines the STRAW model formally. Section 4 describes the training procedure for both supervised and reinforcement learning cases. Section 5 presents the experimental evaluation of STRAW on 8 ATARI games, 2D maze navigation and next character prediction tasks. Section 6 concludes. 2 Related Work Learning temporally extended actions and temporal abstraction in general are long standing problems in reinforcement learning [5, 6, 7, 8, 12, 20, 21, 22, 23, 25, 27, 28, 30]. The options framework [21, 28] provides a general formulation. An option is a sub-policy with a termination condition, which takes in environment observations and outputs actions until the termination condition is met. An agent picks an option using its policy-over-options and subsequently follows it until termination, at which point the policy-over-options is queried again and the process continues. Notice, that macro-action is a particular, simpler instance of options, where the action sequence (or a distribution over them) is decided at the time the macro-action is initiated. Options are typically learned using subgoals and ’pseudo-rewards’ that are provided explicitly [7, 8, 28]. For a simple, tabular case [30], each state can be used as a subgoal. Given the options, a policy-over-options can be learned using standard techniques by treating options as actions. Recently [14, 29] have demonstrated that combining deep learning with pre-defined subgoals delivers promising results in challenging environments like Minecraft and Atari, however, subgoal discovery remains an unsolved problem. Another recent work by [1] shows a theoretical possibility of learning options jointly with a policy-over-options by extending the policy gradient theorem to options, but the approach was only tested on a toy problem. In contrast, STRAW learns macro-actions and a policy over them in an end-to-end fashion from only the environment’s reward signal and without resorting to explicit pseudo-rewards or hand-crafted subgoals. The macro-actions are represented implicitly inside the model, arising naturally from the interplay between action and commitment plans within the network. Our experiments demonstrate that the model scales to a variety of tasks from next character prediction in text to ATARI games. 3 The model STRAW is a deep recurrent neural network with two modules. The first module translates environment observations into an action-plan – a state variable which represents an explicit stochastic plan of future actions. STRAW generates macro-actions by committing to the action-plan and following it without updating for a number of steps. The second module maintains commitment-plan – a state variable that determines at which step the network terminates a macro-action and updates the action-plan. The action-plan is a matrix where one dimension corresponds to time and the other to the set of possible discrete actions. The elements of this matrix are proportional to the probability of taking the corresponding action at the corresponding time step. Similarly, the commitment plan represents the probabilities of terminating a macro-action at the particular step. For updating both plans we use attentive writing technique [11], which allows the network to focus on parts of a plan where the current observation is informative of desired outputs. This section formally defines the model, we describe the way it is trained later in section 4. The state of the network at time t is comprised of matrices At ∈RA×T and ct ∈R1×T . Matrix At is the action-plan. Each element At a,τ is proportional to the probability of outputting a at time t + τ. Here A is a total number of possible actions and T is a maximum time horizon of the plan. To generate an action at time t, the first column of At (i.e. At •0) is transformed into a distribution 2 * * 0 0 =1 1 Input frame STRAW commitmentplan actionplan ... action space: Conv Net time replan commit commit replan Figure 1: Schematic illustration of STRAW playing a maze navigation game. The input frames indicate maze geometry (black = corridor, blue = wall), red dot corresponds to the position of the agent and green to the goal, which it tries to reach. A frame is first passed through a convolutional network, acting as a feature extractor and then into STRAW. The top two rows depict the plans A and c. Given a gate gt, STRAW either updates the plans (steps 1 and 4) or commits to them. over possible outputs by a SoftMax function. This distribution is then sampled to generate the action at. Thereby the content of At corresponds to the plan of future actions as conceived at time t. The single row matrix ct represents the commitment-plan of the network. Let gt be a binary random variable distributed as follows: gt ∼ct−1 1 . If gt = 1 then at this step the plans will be updated, otherwise gt = 0 means they will be committed to. Macro-actions are defined as a sequence of outputs {at}t2−1 t1 produced by the network between steps where gt is ‘on’: i.e gt1 = gt2 = 1 and gt′ = 0, ∀t1 < t′ < t2. During commitment the plans are rolled over to the next step using the matrix time-shift operator ρ, which shifts a matrix by removing the first column and appending a column filled with zeros to its rear. Applying ρ to At or ct reflects the advancement of time. Figure 1 illustrates the workflow. Notice that during commitment (step 2 and 3) the network doesn’t compute the forward pass, thereby saving computation. Attentive planning. An important assumption that underpins the usage of macro-actions is that one observation reveals enough information to generate a sequence of actions. The complexity of the sequence and its length can vary dramatically, even within one environment. Therefore the network has to focus on the part of the plan where the current observation is informative of desired actions. To achieve this, we apply differentiable attentive reading and writing operations [11], where attention is defined over the temporal dimension. This technique was originally proposed for image generation, here instead it is used to update the plans At and ct. In the image domain, the attention operates over the spatial extent of an image, reading and writing pixel values. Here it operates over the temporal extent of a plan, and is used to read and write action probabilities. The differentiability of the attention model [11] makes it possible to train with standard backpropagation. An array of Gaussian filters is applied to the plan, yielding a ‘patch’ of smoothly varying location and zoom. Let A be the total number of possible actions and K be a parameter that determines the temporal resolution of the patch. A grid of A × K one-dimensional Gaussian filters is positioned on the plan by specifying the coordinates of the grid center and the stride distance between adjacent filters. The stride controls the ‘zoom’ of the patch; that is, the larger the stride, the larger an area of the original plan will be visible in the attention patch, but the lower the effective resolution of the patch will be. The filtering is performed along the temporal dimension only. Let ψ be a vector of attention parameters, i.e.: grid position, stride, and standard deviation of Gaussian filters. We define the attention operations as follows: D = write(p, ψA t ); βt = read(At, ψA t ) (1) The write operation takes in a patch p ∈RA×K and attention parameters ψA t . It produces a matrix D of the same size as At, which contains the patch p scaled and positioned according to ψA t with the rest set to 0. Analogously the read operation takes the full plan At together with attention parameters 3 Figure 2: Schematic illustration of an action-plan update. Given zt, the network produces an actionpatch and attention parameters ψA t . The write operation creates an update to the action-plan by scaling and shifting the action-patch according to ψA t . The update is then added to ρ(At). ψA t and outputs a read patch β ∈RA×K, which is extracted from At according to ψA t . We direct readers to [11] for details. Action-plan update. Let zt be a feature representation (e.g. the output of a deep convolutional network) of an observation xt. Given zt, gt and the previous state At−1 STRAW computes an update to the action-plan using the Algorithm 1. Here f ψ and f A are linear functions and h is two layer perceptron. Figure 2 gives an illustration of an update to At. Algorithm 1 Action-plan update Input: zt, gt, At−1 Output: At, at if gt = 1 then Compute attention parameters ψA t = f ψ(zt) Attentively read the current state of the action-plan βt = read(At−1, ψA t ); Compute intermediate representation ξt = h([βt, zt]) Update At = ρ(At−1) + gt · write(f A(ξt), ψA t ) else // gt = 0 Update At = ρ(At−1) //just advance time end if Sample an action at ∼SoftMax(At 0) Commitment-plan update. Now we introduce a module that partitions the action-plan into macroactions by defining the temporal extent to which the current action-plan At can be followed without re-planning. The commitment-plan ct is updated at the same time as the action-plan, i.e. when gt = 1 or otherwise it is rolled over to the next time step by ρ operator. Unlike the planning module, where At is updated additively, ct is overwritten completely using the following equations: gt ∼ct−1 1 if gt = 0 then ct = ρ(ct−1) else ψc t = f c([ψA t , ξt]) ct = Sigmoid(b + write(e, ψc t)); (2) Here the same attentive writing operation is used, but with only one Gaussian filter for attention over c. The patch e is therefore just a scalar, which we fix to a high value (40 in our experiments). This high value of e is chosen so that the attention parameters ψc t define a time step when re-planning is guaranteed to happen. Vector b is of the same size as dt filled with a shared, learnable bias b, which defines the probability of re-planning earlier than the step implied by ψc t. Notice that gt is used as a multiplicative gate in algorithm 1. This allows for retroactive credit assignment during training, as gradients from write operation at time t + τ directly flow into the commitment module through state ct – we set ∇ct−1 1 ≡∇gt as proposed in [3]. Moreover, when gt = 0 only the computationally cheap operator ρ is invoked. Thereby more commitment significantly saves computation. 3.1 Structured exploration with macro-actions The architecture defined above is capable of generating macro-actions. This section describes how to use macro-actions for structured exploration. We introduce STRAW-explorer (STRAWe), a version of STRAW with a noisy communication channel between the feature extractor (e.g. a convolutional neural network) and STRAW planning modules. Let ζt be the activations of the last layer of the feature extractor. We use ζt to regress the parameters of a Gaussian distribution 4 Q(zt|ζt) = N(µ(ζt), I · σ(ζt)) from which zt is sampled. Here µ is a vector and σ is a scalar. Injecting noise at this level of the network generates randomness on the level of plan updates that cover multiple time steps. This effect is reinforced by commitment, which forces STRAWe to execute the plan and experience the outcome instead of rolling the update back on the next step. In section 5 we demonstrate how this significantly improves score on games like Frostbite and Ms. Pacman. 4 Learning The training loss of the model is defined as follows: L = T X t=1 Lout(At) + gt · αKL(Q(zt|ζt)|P(zt)) + λct 1 , (3) where Lout is a domain specific differentiable loss function defined over the network’s output. For supervised problems, like next character prediction in text, Lout can be defined as negative log likelihood of the correct output. We discuss the reinforcement learning case later in this section. The two extra terms are regularisers. The first is a cost of communication through the noisy channel, which is defined as KL divergence between latent distributions Q(zt|ζt) and some prior P(zt). Since the latent distribution is a Gaussian (sec. 3.1), a natural choice for the prior is a Gaussian with a zero mean and standard deviation of one. The last term penalizes re-planning and encourages commitment. For reinforcement learning we consider the standard setting where an agent is interacting with an environment in discrete time. At each step t, the agent observes the state of the environment xt and selects an action at from a finite set of possible actions. The environment responds with a new state xt+1 and a scalar reward rt. The process continues until the terminal state is reached, after which it restarts. The goal of the agent is to maximize the discounted return Rt = P∞ k=0 αkrt+k+1. The agent’s behaviour is defined by its policy π – mapping from state space into action space. STRAW produces a distribution over possible actions (a stochastic policy) by passing the first column of the action-plan At through a SoftMax function: π(at|xt; θ) = SoftMax(At •0). An action is then produced by sampling the output distribution. We use a recently proposed Asynchronous Advantage Actor-Critic (A3C) method [18], which directly optimizes the policy of an agent. A3C requires a value function estimator V (xt) for variance reduction. This estimator can be produced in a number of ways, for example by a separate neural network. The most natural solution for our architecture is to create value-plan containing the estimates. To keep the architecture simple and efficient, we simply add an auxiliary row to the action plan which corresponds to the value function estimation. It participates in attentive reading and writing during the update, thereby sharing the temporal attention with action-plan. The plan is then split into action part and the estimator before the SoftMax is applied and an action is sampled. The policy gradient update for Lout in L is defined as follows: ∇Lout = ∇θ log π(at|xt; θ)(Rt −V (xt; θ)) + β∇θH(π(at|xt; θ)) (4) Here H(π(at|xt; θ)) is entropy of the policy, which stimulates the exploration of primitive actions. The network contains two random variables – zt and gt, which we have to pass gradients through. For zt we employ the re-parametrization trick [13, 24]. For gt, we set ∇ct−1 1 ≡∇gt as proposed in [3]. 5 Experiments The goal of our experiments was to demonstrate that STRAW learns meaningful and useful macroactions. We use three domains of increasing complexity: supervised next character prediction in text [10], 2D maze navigation and ATARI games [2]. 5.1 Experimental setup Architecture. The read and write patches are A × 10 dimensional, and h is a 2 layer perceptron with 64 hidden units. The time horizon T = 500. For STRAWe (sec. 3.1) the Gaussian distribution for structured exploration is 128-dimensional. Ablative analysis for some of these choices is provided in section 5.5. Feature representation of the state space is particular for each domain. For 2D mazes and ATARI it is a convolutional neural net (CNN) and it is an LSTM [9] for text. We provide more details in the corresponding sections. Baselines. The experiments employ two baselines: a simple feed forward network (FF) and a recurrent LSTM network, both on top of a representation learned by CNN. FF directly regresses the action probabilities and value function estimate from feature representation. The LSTM [9] 5 architecture is a widely used recurrent network and it was demonstrated to perform well on a suite of reinforcement learning problems [18]. It has 128 hidden units and its inputs are the feature representation of an observation and the previous action of the agent. Action probabilities and the value function estimate are regressed from its hidden state. Optimization. We use the A3C method [18] for all reinforcement learning experiments. It was shown to achieve state-of-the-art results on several challenging benchmarks [18]. We cut the trajectory and run backpropagation through time [19] after 40 forward passes of a network or if a terminal signal is received. The optimization process runs 32 asynchronous threads using shared RMSProp. There are 4 hyper-parameters in STRAW and 2 in the LSTM and FF baselines. For each method, we ran 200 experiments, each using randomly sampled hyperparameters. Learning rate and entropy penalty were sampled from a LogUniform(10−4, 10−3) interval. Learning rate is linearly annealed from a sampled value to 0. To explore STRAW behaviour, we sample coding cost α ∼LogUniform(10−7, 10−4) and replanning penalty λ ∼LogUniform(10−6, 10−2). For stability, we clip the advantage Rt−V (xt; θ) (eq. 4) to [−1, 1] for all methods and for STRAW(e) we do not propagate gradients from commitment module into planning module through ψA t and ξt. We define a training epoch as one million observations. STRAW rank N-gram rank Text Maze replanning Transfer in mazes _the _<un the_ <unk _to_ _of_ ing_ _in_ _and ion_ _tha _for _com _it_ __th and_ _'s_ ent_ f_th _pro Score Training epochs a) b) c) d) Commitment Frostbite Ms. Pacman Amidar Breakout Training epochs Figure 3: Detailed analysis. a) re-planning in random maze b) transfer to farther goals c) learned macro-actions for next character prediction d) commitment on ATARI. 5.2 Text STRAW is a general sequence prediction architecture. To demonstrate that it is capable of learning output patterns with complex structure we present a qualitative experiment on next character prediction using Penn Treebank dataset [16]. Actions in this case correspond to emitting characters and macroactions to their sequences. For this experiment we use an LSTM, which receives a one-hot-encoding of 50 characters as input. A STRAW module is connected on top. We omit the noisy Gaussian channel, as this task is fully supervised and does not require exploration. The actions now correspond to emitting characters. The network is trained with stochastic gradient descent using supervised negative log-likelihood loss (sec. 4). At each step we feed a character to the model which updates the LSTM representation, but only update the STRAW plans according to the commitment plan ct. For a trained model we record macro-actions – the sequences of characters produced when STRAW is committed to the plan. If STRAW adequately learns the structure of the data, then its macro-actions should correspond to common n-grams. Figure 3.c plots the 20 most frequent macro-action of length 4 produced by STRAW. On x-axis is the rank of the frequency at which macro-action is used by STRAW, on y-axis is it’s actual frequency rank as a 4-gram. Notice how STRAW correctly learned to predict frequent 4-grams such as ’the’, ’ing’, ’and’ and so on. 5.3 2D mazes To investigate what macro-actions our model learns and whether they are useful for reinforcement learning we conduct an experiment on a random 2D mazes domain. A maze is a grid-world with two types of cells – walls and corridors. One of the corridor cells is marked as a goal. The agent receives a small negative reward of −r every step, and double that if it tries to move through the wall. It receives as small positive reward r when it steps on the goal and the episode terminates. Otherwise episode terminates after 100 steps. Therefore to maximize return an agent has to reach the goal as fast as possible. In every training episode the position of walls, goal and the starting position of the agent are randomized. An agent fully observes the state of the maze. The remainder of this section presents two experiments in this domain. Here we use STRAWe version with structured exploration. 6 For feature representation we use a 2-layer CNN with 3x3 filters and stride of 1, each followed by a rectifier nonlinearity. In our first experiment we train a STRAWe agent on an 11 x 11 random maze environment. We then evaluate a trained agent on a novel maze with fixed geometry and only randomly varying start and goal locations. The aim is to visualize the positions in which STRAWe terminates macro-actions and re-plans. Figure 3.a shows the maze, where red intensity corresponds to the ratio of re-planning events at the cell normalized with the total amount of visits by an agent. Notice how some corners and areas close to junctions are highlighted. This demonstrates that STRAW learns adequate temporal abstractions in this domain. In the next experiment we test whether these temporal abstractions are useful. The second experiment uses a larger 15 x 15 random mazes. If the goal is placed arbitrarily far from an agent’s starting position, then learning becomes extremely hard and neither LSTM nor STRAWe can reliably learn a good policy. We introduce a curriculum where the goal is first positioned very close to the starting location and is moved further away during the progress of training. More precisely, we position the goal using a random walk starting from the same point as an agent. We increase the random walks length by one every two epochs, starting from 2. Although the task gets progressively harder, the temporal abstractions (e.g. follow the corridor, turn the corner) remain the same. If learnt early on, they should make adaptation easy. The Figure 3.b plots episode reward against training steps for STRAW, LSTM and the optimal policy given by Dijkstra algorithm. Notice how both learn a good policy after approximately 200 epochs, when the task is still simple. As the goal moves away LSTM has a strong decline in reward relative to the optimal policy. In contrast, STRAWe effectively uses macro-actions learned early on and stays close to the optimal policy at harder stages. This demonstrates that temporal abstractions learnt by STRAW are useful. Table 1: Comparison of STRAW, STRAWe, LSTM and FF baselines on 8 ATARI games. The score is averaged over 100 runs of top 5 agents for each architecture after 500 epochs of training. Frostbite Ms. Pacman Q-bert Hero Crazy cl. Alien Amidar Breakout STRAWe 8074 6673 23430 36948 142686 3191 1833 363 STRAW 4138 6557 21350 35692 144004 2632 2120 423 LSTM 1409 4135 21591 35642 128351 2917 1382 632 FF 1543 2302 22281 39610 128146 2302 1235 95 5.4 ATARI This section presents results on a subset of ATARI games. All compared methods used the same CNN architecture, input preprocessing, and an action repeat of 4. For feature representation we use a CNN with a convolutional layer with 16 filters of size 8 x 8 with stride 4, followed by a convolutional layer with with 32 filters of size 4 x 4 with stride 2, followed by a fully connected layer with 128 hidden units. All three hidden layers were followed by a rectifier nonlinearity. This is the same architecture as in [17, 18], the only difference is that in pre-processing stage we keep colour channels. We chose games that require some degree of planning and exploration as opposed to purely reactive ones: Ms. Pacman, Frostbite, Alien, Amidar, Hero, Q-bert, Crazy Climber. We also added a reactive Breakout game to the set as a sanity check. Table. 1 shows the average performance of the top 5 agents for each architecture after 500 epochs of training. Due to action repeat, here an epoch corresponds to four million frames (across all threads). STRAW or STRAWe reach the highest score on 6 out of 8 games. They are especially strong on Frostbite, Ms. Pacman and Amidar. On Frostbite STRAWe achieves more than 6× improvement over the LSTM score. Notice how structured exploration (sec. 3.1) improves the performance on 5 out of 8 games; on 2 out of 3 other games (Breakout and Crazy Climber) the difference is smaller than score variance. STRAW and STRAWe do perform worse than an LSTM on breakout, although they still achieves a very good score (human players score below 100). This is likely due to breakout requiring fast reaction and action precision, rather than planning or exploration. FF baseline scores worst on every game apart from Hero, where it is the best. Although the difference is not very large, this is still a surprising result, which might be due to FF having fewer parameters to learn. Figure 4 demonstrates re-planning behaviour on Amidar. In this game, agent explores a maze with a yellow avatar. It has to cover all of the maze territory without colliding with green figures (enemies). 7 Figure 4: Re-planning behaviour in Amidar. The agent controls yellow figure, which scores points by exploring the maze, while avoiding green enemies. At time t the agent has explored the area to the left and below and is planning to head right to score more points. At t + 7 an enemy blocks the way and STRAW retreats to the left by drastically changing the plan At. It then resorts the original plan on step t+14 when the path is clear and heads to the right. Notice, that when the enemy is near (t+7 to t + 12) it plans for smaller macro-actions – ct has a high value (white spot) closer to the origin. Notice how the STRAW agent changes its plan as an enemy comes near and blocks its way. It backs off and then resumes the initial plan when the enemy takes a turn and danger is avoided. Also, notice that when the enemy is near, the agent plans for shorter macro-actions as indicated by commitment-plan ct. Figure 3.d shows the percentage of time the best STRAWe agent is committed to a plan on 4 different games. As training progresses, STRAWe learns to commit more and converges to a stable regime after about 200 epochs. The only exception is breakout, where meticulous control is required and it is beneficial to re-plan often. This shows that STRAWe is capable of adapting to the environment and learns temporal abstractions useful for each particular case. Figure 5: Ablative analysis on Ms. Pacman game. Figures plot episode reward against seen frames for different configurations of STRAW. From left to right: varying action patch size, varying replanning modules on Frostbite and on Ms. Pacman. Notice, that models here are trained for only 100 epochs, unlike models in Table 1 that were trained for 500 epochs. 5.5 Ablative analysis Here we examine different design choices that were made and investigate their impact on final performance. Figure 5 presents the performance curves of different versions of STRAW trained for 100 epochs. From left to right, the first plot shows STRAW performance given different resolution of the action patch on Ms. Pacman game. The greater the resolution, the more complex is the update that STRAW can generate for the action plan. In the second and third plot we investigate different possible choices for the re-planning mechanism on Frostbite and Ms. Pacman games: we compare STRAW with two simple modifications, one re-plans at every step, the other commits to the plan for a random amount of steps between 0 and 4. Re-planning at every step is not only less elegant, but also much more computationally expensive and less data efficient. The results demonstrate that learning when to commit to the plan and when to re-plan is beneficial. 6 Conclusion We have introduced the STRategic Attentive Writer (STRAW) architecture, and demonstrated its ability to implicitly learn useful temporally abstracted macro-actions in an end-to-end manner. Furthermore, STRAW advances the state-of-the-art on several challenging Atari domains that require temporally extended planning and exploration strategies, and also has the ability to learn temporal abstractions in general sequence prediction. As such it opens a fruitful new direction in tackling an important problem area for sequential decision making and AI more broadly. 8 References [1] Pierre-Luc Bacon and Doina Precup. The option-critic architecture. In NIPS Deep RL Workshop, 2015. [2] Marc G Bellemare, Yavar Naddaf, Joel Veness, and Michael Bowling. The arcade learning environment: An evaluation platform for general agents. Journal of Artificial Intelligence Research, 2012. [3] Yoshua Bengio, Nicholas Léonard, and Aaron Courville. Estimating or propagating gradients through stochastic neurons for conditional computation. arXiv preprint arXiv:1308.3432, 2013. [4] Matthew M Botvinick, Yael Niv, and Andrew C Barto. Hierarchically organized behavior and its neural foundations: A reinforcement learning perspective. Cognition, 2009. [5] Craig Boutilier, Ronen I Brafman, and Christopher Geib. Prioritized goal decomposition of markov decision processes: Toward a synthesis of classical and decision theoretic planning. In IJCAI, 1997. [6] Peter Dayan. Improving generalization for temporal difference learning: The successor representation. Neural Computation, 1993. [7] Peter Dayan and Geoffrey E Hinton. Feudal reinforcement learning. In NIPS. Morgan Kaufmann Publishers, 1993. [8] Thomas G Dietterich. Hierarchical reinforcement learning with the maxq value function decomposition. J. Artif. Intell. Res.(JAIR), 2000. [9] Felix A Gers, Jürgen Schmidhuber, and Fred Cummins. Learning to forget: Continual prediction with lstm. Neural computation, 2000. [10] Alex Graves. Generating sequences with recurrent neural networks. arXiv preprint arXiv:1308.0850, 2013. [11] Karol Gregor, Ivo Danihelka, Alex Graves, Danilo Rezende, and Daan Wierstra. Draw: A recurrent neural network for image generation. In ICML, 2015. [12] Leslie Pack Kaelbling. Hierarchical learning in stochastic domains: Preliminary results. In ICML, 2014. [13] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. ICLR, 2014. [14] Tejas D. Kulkarni, Karthik R. Narasimhan, Ardavan Saeedi, and Joshua B. Tenenbaum. Hierarchical deep reinforcement learning: Integrating temporal abstraction and intrinsic motivation. arXiv preprint arXiv:1604.06057, 2016. [15] Sergey Levine, Chelsea Finn, Trevor Darrell, and Pieter Abbeel. End-to-end training of deep visuomotor policies. arXiv preprint arXiv:1504.00702, 2015. [16] Mitchell P Marcus, Mary Ann Marcinkiewicz, and Beatrice Santorini. Building a large annotated corpus of english: The penn treebank. Computational linguistics, 1993. [17] Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A. Rusu, Joel Veness, Marc G. Bellemare, Alex Graves, Martin Riedmiller, Andreas K. Fidjeland, Georg Ostrovski, Stig Petersen, Charles Beattie, Amir Sadik, Ioannis Antonoglou, Helen King, Dharshan Kumaran, Daan Wierstra, Shane Legg, and Demis Hassabis. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 02 2015. [18] Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy P Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. ICML, 2016. [19] Michael C Mozer. A focused back-propagation algorithm for temporal pattern recognition. Complex systems, 1989. [20] Ronald Parr and Stuart Russell. Reinforcement learning with hierarchies of machines. NIPS, 1998. [21] Doina Precup. Temporal abstraction in reinforcement learning. PhD thesis, University of Massachusetts, 2000. [22] Doina Precup, Richard S Sutton, and Satinder P Singh. Planning with closed-loop macro actions. Technical report, 1997. [23] Doina Precup, Richard S Sutton, and Satinder Singh. Theoretical results on reinforcement learning with temporally abstract options. In European Conference on Machine Learning (ECML). Springer, 1998. [24] Danilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic backpropagation and approximate inference in deep generative models. ICML, 2014. [25] Jürgen Schmidhuber. Neural sequence chunkers. Technical report, 1991. [26] John Schulman, Sergey Levine, Philipp Moritz, Michael I Jordan, and Pieter Abbeel. Trust region policy optimization. In ICML, 2015. [27] Richard S Sutton. Td models: Modeling the world at a mixture of time scales. In ICML, 1995. [28] Richard S Sutton, Doina Precup, and Satinder Singh. Between mdps and semi-mdps: A framework for temporal abstraction in reinforcement learning. Artificial intelligence, 1999. [29] Chen Tessler, Shahar Givony, Tom Zahavy, Daniel J Mankowitz, and Shie Mannor. A deep hierarchical approach to lifelong learning in minecraft. arXiv preprint arXiv:1604.07255, 2016. [30] Marco Wiering and Jürgen Schmidhuber. Hq-learning. Adaptive Behavior, 1997. 9 | 2016 | 447 |
6,380 | Clustering with Bregman Divergences: an Asymptotic Analysis Chaoyue Liu, Mikhail Belkin Department of Computer Science & Engineering The Ohio State University liu.2656@osu.edu, mbelkin@cse.ohio-state.edu Abstract Clustering, in particular k-means clustering, is a central topic in data analysis. Clustering with Bregman divergences is a recently proposed generalization of k-means clustering which has already been widely used in applications. In this paper we analyze theoretical properties of Bregman clustering when the number of the clusters k is large. We establish quantization rates and describe the limiting distribution of the centers as k →∞, extending well-known results for k-means clustering. 1 Introduction Clustering and the closely related problem of vector quantization are fundamental problems in machine learning and data mining. The aim is to partition similar points into "clusters" in order to organize or compress the data. In many clustering methods these clusters are represented by their centers or centroids. The set of these centers is often called “the codebook" in the vector quantization literature. In this setting the goal of clustering is to find an optimal codebook, i.e., a set of centers which minimizes a clustering loss function also known as the quantization error. There is vast literature on clustering and vector quantization, see, e.g., [8, 10, 12]. One of the particularly important types of clustering and, arguably, of data analysis methods of any type, is k-means clustering [16] which aims to minimize the loss function based on the squared Euclidean distance. This is typically performed using the Lloyd’s algorithm [15], which is an iterative optimization technique. The Lloyd’s algorithm is simple, easy to implement and is guaranteed to converge in a finite number of steps. There is an extensive literature on various aspects and properties of k-means clustering, including applications and theoretical analysis [2, 13, 23]. An important type of analysis is the asymptotic analysis, which studies the setting when the number of centers is large. This situation (n ≫k ≫0) arises in many applications related to data compression as well as algorithms such as soft k-means features used in computer vision and other applications, where the number of centers k is quite large but significantly less than the number of data points n. This situation also arises in k-means feature-based methods which have seen significant success in computer vision, e.g., [6]. The quantization loss for k-means clustering in the setting k →∞is well-known (see [5, 9, 20]). A less well-known fact shown in [9, 18] is that the discrete set of centers also converges to a measure closely related to the underlying probability distribution. This fact can be used to reinterpret k-means feature based methods in terms of a density dependent kernel [21]. More recently, it has been realized that the properties of square Euclidean distance which make the Lloyd’s algorithm for k-means clustering so simple and efficient are shared by a class of similarity measures based on Bregman divergence. In an influential paper [3] the authors introduced clustering based on Bregman divergences, which generalized k-means clustering to that setting and produced a corresponding generalized version of the Lloyd’s algorithm. That work has lead to a new line of research on clustering including results on multitask Bregman clustering[24], agglomerative 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Bregman clustering[22] and many others. There has also been some theoretical analysis of Bregman clustering including [7] proving the existence of an optimal quantizer and convergence and bounds for quantization loss in the limit of size of data n →∞for fixed k. In this paper we set out to investigate asymptotic properties of Bregman clustering as the number of centers increases. We provide explicit asymptotic rates for the quantization error of Bregman clustering as well as the continuous measure which is the limit of the center distribution. Our results generalize the well-known results for k-means clustering. We believe that these results will be useful for better understanding in Bregman divergence based clustering algorithms and algorithms design. 2 Preliminaries and Existing Work 2.1 k-means clustering and its asymptotic analysis k-means clustering is one of the most popular and well studied clustering problems in data analysis. Suppose we are given a dataset D = {xi}n i=1 ⊂Rd , containing n observations of a Rd-valued random variable X. k-means clustering aims to find a set of points (centroids) α = {aj}k j=1 ⊂Rd, with |α| = k initially fixed, that minimizes the squared Euclidean loss function L(α) = 1 n X j min a∈α ∥xj −a∥2 2. (1) Finding the global minimum of loss function is a NP-hard problem [1, 17]. However, Lloyd’s algorithm [15] is a simple and elegant method to obtain a locally optimal clustering of the data, corresponding to a local minimum of the loss function. A key reason for the practical utility of the Lloyd’s k-means algorithm is the following property of squared Euclidean distance: the arithmetic mean of a set of points is the unique minimizer of the loss for a single center: 1 n n X i=1 xi = arg min s∈Rd 1 n n X i=1 ∥xi −s∥2 2. (2) It turns out that this property holds in far greater generality as we will discuss below. Asymptotic analysis of Euclidean quantization: In an asymptotic quantization problem, we focus on the limiting case of k →∞, where the size of dataset n ≫k. In this paper we will assume n = ∞, i.e., that the probability distribution with density P is given. This setting is in line with the analysis in [9]. Correspondingly, a density measure P is defined as follows: for a set A ⊆Rd, P(A) = R A Pdλd, where λd is the Lebesgue measure on Rd. We also have P = dP dλd . The classical asymptotic results for the Euclidean quantization are provided in a more general setting for an arbitrary power of the distance Eq.(1), Euclidean quantization of order r (1 ≤r < ∞), with loss L(α) = EP min a∈α ∥X −a∥r 2 . (3) Note that the Lloyd’s algorithm is only applicable to the standard case with r = 2. The output of the k-means algorithm include locations of centroids, which then imply the partition and the corresponding loss. For large k we are interested in: (1) the asymptotic quantization error, and (2) the distribution of centroids. Asymptotic quantization error. The asymptotic quantization error for k-means clustering has been analyzed in detail in [5, 14, 20]. S. Graf and H. Luschgy [9] show that as k →∞, the r-th quantization error decreases at a rate of k−r/d. Furthermore, coefficient of the term k−r/d is of the form Qr(P) = Qr([0, 1]d)∥P∥d/(d+r), (4) where Qr([0, 1]d), a constant independent of P, is geometrically interpreted as asymptotic Euclidean quantization error for uniform distribution on d-dimensional unite cube [0, 1]d. Here ∥· ∥d/(d+r) is the Ld/(d+r) norm of function: ∥f∥d/(d+r) = ( R f d/(d+r)dλd)(d+r)/d. 2 Locational distribution of centroids. A less well-known fact is that the locations of the optimal centroid configuration of k-means converges to a limit distribution closely related to the underlying density [9, 18]. Specifically, given a discrete set of centroids αk, to construct the corresponding discrete measure, Pk = 1 k k X j=1 δaj, (5) where δa is Dirac measure centered at a. For a open set A ⊆Rd, Pk(A) is the ratio of number of centroids kA located within A to the total number of centroids k, namely Pk(A) = kA/k. We say that a continuous measure ˜P is the limit distribution of centroids, if {Pk} (weakly) converges to ˜P, specifically ∀A ⊆Rd, lim k→∞Pk(A) = ˜P(A). (6) S. Graf and H. Luschgy [9] gave an explicit expression for this continuous limit distribution of centroids: ˜Pr = ˜Prλd, ˜Pr = N · P d/(d+r), (7) where λd is the Lebesgue measure on Rd, P is the density of the probability distribution and N is the normalization constant to make sure that ˜Pr integrates to 1. 2.2 Bregman divergences and Bregman Clustering In this section we briefly review basics of Bregman divergences and the Bregman clustering algorithm. Bregman divergence, first proposed in 1967 by L.M.Bregman [4], measure dissimilarity between two points in a space. The formal definition is as follows: Definition 1 (Bregman Divergence). Let function φ be strictly convex on a convex set Ω⊆Rd, such that φ is differentiable on relative interior of Ω, we define Bregman divergence Dφ : Ω× Ω→R with respect to φ as: Dφ(p, q) = φ(p) −φ(q) −⟨p −q, ∇φ(q)⟩, (8) where ⟨·, ·⟩is inner product in Rd. Ωis domain of the Bregman divergence. Note that Bregman divergences are not necessarily true metrics. In general, they do satisfy the basic properties of non-negativity and identity of indiscernibles, but may not respect the triangle inequality and symmetry. Examples: Some popular examples of Bregman divergences include: Squared Euclidean distance: DEU(p, q) = ∥p −q∥2 2, (φEU(z) = ∥z∥2) Mahalanobis distance: DMH(p, q) = (p −q)T A(p −q), A ∈Rd×d Kullback-Leibler divergence: KL(p∥q) = X pi ln pi qi − X (pi −qi), (φKL(z) = X zi ln zi −zi, zi > 0) Itakura-Saito divergence: DIS(p∥q) = X pi qi −ln pi qi −1, (φIS(z) = − X ln zi) Norm-like divergence: DNL(p∥q) = X i pα i + (α −1)qα i −αpiqα−1 i . (φNL(z) = X zα i , zi > 0, α ≥2) (9) Domains of Bregman divergences: ΩEU = ΩMH = Rd, and ΩKL = ΩIS = ΩNL = Rd +. Alternative expression: the quadratic form. Suppose that φ ∈C2(Ω), which holds for most popularly used Bregman divergences. Note that φ(q) + ⟨p −q, ∇φ(q)⟩is simply the first two terms in Taylor expansion of φ at q. Thus, Bregman divergences are nothing but the difference between a function and its linear approximation. By Lagrange’s form of the remainder term, there exists ξ with ξi ∈[min(pi, qi), max(pi, qi)] (i.e. ξ is in the smallest d-dimensional axis-parallel cube that contains p and q) such that Dφ(p, q) = 1 2(p −q)T ∇2φ(ξ)(p −q), (10) 3 where ∇2φ(ξ) denotes the Hessian matrix of φ at ξ. This form is more compact and will be convenient for further analysis, but at the expense of introducing an unknown point ξ. We will use this form in later discussions. The mean as the minimizer. As shown in A. Banerjee et al. [3], the property Eq.(2) still holds if squared Euclidean distance is substituted by a general Bregman divergence: 1 n n X i=1 xi = arg min s∈Ω n X i=1 Dφ(xi, s). (11) That allows for the Lloyd’s method to be generalized to arbitrary Bregman clustering problems, where the new loss function is defined as L(α) = 1 n X i min a∈α Dφ(xi, a). (12) This modified version of k-means, called Bregman hard clustering algorithm (see Algorithm 1 in [3]), results a locally optimal quantization as well. 3 Asymptotic Analysis of Bregman Quantization We do not distinguish the terminology of Bregman quantization and Bregman clustering. In this section, we analyze the asymptotics of Bregman quantization allowing a power of Bregman divergences in the loss function. We show expressions for the quantization error and limiting distribution of centers. We start with the following: Definition 2 (k-th quantization error for P of order r). Suppose a variable X takes values on Ω⊆Rd following a density P, where Ωis the d-dimensional domain of Bregman divergence Dφ. The k-th quantization error for P of order r (1/2 ≤r < ∞) associated with Dφ is defined as Vk,r,φ(P) = inf α⊂Rd,|α|=k EP min a∈α Dr φ(X, a) (13) where α ⊂Rd is set of representatives of clusters, corresponding to a certain partition, or quantization of Rd or support of P, and EP [·] means taking expectation value over P. Remark: (a) The set α∗that reaches the infimum is called k-optimal set of centers for P of order r with respect to Dr φ(X, a). (b) In this setting, Bregman quantization of order r corresponds to Euclidean quantization of order 2r, because of Eq.(10). 3.1 Asymptotic Bregman quantization error We are interested in the asymptotic case, where k →∞. First note that quantization error asymptotically approaches zero as every point x in the support support of the distribution can always is arbitrarily closed to a centroid with respect to the Bregman divergence when k is large enough. Intuition on Convergence rate. We start by providing an informal intuition for the convergence rate. Assume P has a compact support with a finite volume. Suppose each cluster is a (Bregman) Voronoi cell with typical size ϵ. Since total volume of the support does not change, volume of one cell should be inversely proportional to the number of clusters, ϵd ∼1 k. On the other hand, because of Eq.(10), Bregman divergence between two points in one cell is the order of square of the cell size, Dφ(X, a) ∼ϵ2, That implies Vk,r,φ(P) ∼k−2r/d asymptotically. (14) We will now focus making this intuition precise and on deriving an expression for the coefficient at the leading term k−2r/d in the quantization error. For now we will keep the assumption that P has compact support, and remove it later on. We only describe the method and display important results in the following. Please see detailed proofs of these results in the Appendix. We first mention a few useful facts: 4 Lemma 1. In the limit of k →∞, each interior point x in the support of P is assigned to an arbitrarily close centroid in the optimal Bregman quantization setting. Lemma 2. If support of P is convex, φ is strictly convex on the support and ∇2φ is uniformly continuous on the support, then (a): limk→∞k 2r d Vk,r,φ(P) exists in (0, ∞), denoted as Qr,φ(P), and (b): Qr,φ(P) = lim k→∞k 2r d inf α(|α|=k) EP min a∈α 1 2(X −a)T ∇2φ(a)(X −a) r . (15) Remark: 1, Since Qr,φ(P) is finite, part (a) of Lemma 2 proves our intuition on convergence rate, Eq.(14). 2, In Eq.(15), it does not matter whether ∇2φ take values at a, x or even any point between x and a, as long as ∇2φ has finite values at that point. Coefficient of Bregman quantization error. We evaluate the coefficient of quantization error Qr,φ(P), based on Eq.(15). What makes this analysis challenging is that unlike is that Euclidean quantization, general Bregman error does not satisfy translational invariance and scaling properties. For example, Lemma 3.2 in [9] does not hold for general Bregman divergence. We follow the following approach: First, dice the the support of P into infinitesimal cubes {Al} with edges parallel to axes, where l is the index for cells. In each cell, we approximate the Hessian by a constant matrix ∇2φ(zl), where zl is a fixed point located in the cell. Therefore, evaluating the Bregman quantization error within each cell reduces to a Euclidean quantization problem, with existing result, Eq.(4). Then summing them up appropriately over the cubes gives total quantization error. We start from Eq.(15), and introduce the following notation: denote sl = P(Al) and conditional density on Al as P(·|Al), αl = α ∩Al as set of centroids that located in Al and kl = |αl| as size of αl, and ratio vl = kl/k. Following the above intuition and noting that P = P P(Al)P(·|Al), Qr,φ(P) is approximated by Qr,φ(P, {vl}) ∼ X l slv−2r/d l Qr,Mh,l (P(·|Al)) , (16) Qr,Mh,l (P(·|Al)) = lim kl→∞k 2r d l inf αl(|αl|=kl) EP (·|Al) min a∈αl 1 2(X −a)T ∇2φ(zl)(X −a) r (17) where Qr,Mh,l (P(·|Al)) is coefficient of asymptotic Mahalanobis quantization error with Mahalanobis matrix ∇2φ(zl), evaluated on Al with density P(·|Al). It can be shown that the approximation error of Qr,φ(P) converges to zero in the limits of k →∞and then size of cell to zero. In each cell Al, P(·|Al) is further approximated by uniform density U(Al) = 1/Vl, and Hessian ∇2φ(zl), as a constant, is absorbed by performing a coordinate transformation. Then Qr,Mh,l (U(Al)) reduces to squared Euclidean quantization error. By applying Eq.(4), we show that Qr,Mh,l (U(Al)) = 1 2r Q2r([0, 1]d)δ2r[det ∇2φ(zl)]r/d (18) where δ is the size of cube, and Q2r([0, 1]d) is again the constant in Eq.(4). Combining Eq.(17) and Eq.(18), Qr,φ(P) is approximated by Qr,φ(P, {vl}) ∼1 2r Q2r([0, 1]d)δ2r X l slv−2r/d l [det ∇2φ(zl)]r/d. (19) Portion of centroids vl within Al is still undecided yet. The following lemma provides an optimal configuration of {vl} that minimizes Qr,φ(P, {vl}): Lemma 3. Let B = {(v1, · · · , vL) ∈(0, ∞)L : PL l=1 vl = 1}, and define v∗ l = sd/(d+2r) l [det ∇2φ(zl)]r/(d+2r) P l sd/(d+2r) l [det ∇2φ(zl)]r/(d+2r) , (20) then for the function F(v1, · · · , vL) = L X l=1 slv−2r/d l [det ∇2φ(zl)]r/d, (21) 5 F(v∗ 1, · · · , v∗ L) = min (v1,··· ,vL)∈B F(v1, · · · , vL) = X l sd/(d+2r) l [det ∇2φ(zl)]r/(d+2r) !(d+2r)/d . (22) Lemma 3 finds the optimal configuration of {vl} in Eq.(19). Recall that quantization error is defined to be infimum over all possible configurations, we have our main result: Theorem 1. Suppose E||X||2r+ϵ < ∞for some ϵ > 0 and ∇2(φ) is uniformly continuous on the support of P, then Qr,φ(P) = 1 2r Q2r([0, 1]d)∥(det ∇2φ)r/dP∥d/(d+2r). (23) Remark: 1, In the Euclidean quantization cases, where φ(z) = ∥z∥2, Eq.(23) reduces to Eq.(4), noting that ∇2φ = 2I. Bregman quantization, which is more general than Euclidean quantization, has result that is quite similar to Eq.(4), differing by a det ∇2φ-related term. 3.2 The Limit Distribution of Centroids Similar to Euclidean clustering, Bregman clustering also outputs k discrete cluster centroids, which can be interpreted as a discrete measure. Below we show that in the limit this discrete measure coincide with a continuous measure defined in terms of the probability density P. Define Pr,φ to be the integrand function in Eq.(23) (with a normalization factor N), Pr,φ = N · (det ∇2φ)r/(d+2r)P d/(d+2r). (24) The following theorem claim that Pr,φ is exactly the continuous distribution we are looking for: Theorem 2. Suppose P is absolutely continuous with respect to Lebesgue measure λd. Let αk be an asymptotically k-optimal set of centers for P of order r based on Dφ. Define measure Pr,φ := Pr,φλd, then 1 k X a∈αk δa →Pr,φ (weakly). (25) Remark: As before Pr,φ is the measure while Pr,φ is the corresponding density function. The proof of the theorem can be found in the appendix. Example 1: Clustering with Squared Euclidean distance (Graf and Luschgy[9]). Squared Euclidean distance is an instance of Bregman divergence, with φ(z) = P z2 i . Graf and Luschgy proved that asymptotic centroid’s distribution is like Pr,EU(z) ∼P d/(d+2r)(z). (26) Example 2: Clustering with Mahalanobis distance. Mahalanobis distance is another instance of Bregman divergence, with φ(z) = zT Az, (A) ∈Rd. Hessian matrix ∇2φ = A. Then the asymptotic centroid’s distribution is same as that of Squared Euclidean distance Pr,Mh(z) ∼P d/(d+2r)(z). (27) Example 3: Clustering with Kullback-Leibler divergence. The convex function used to define Kullback-Leibler divergence is negative Shannon entropy defined on domain Ω⊆Rd +, φKL(z) = X i zi ln zi −zi (28) with component index i. Then Hessian matrix ∇2φKL(z) = diag( 1 z1 , 1 z2 , · · · , 1 zd ). (29) 6 According to Eq. (24), centroid’s density distribution function Pr,KL(z) ∼P d/(d+2r)(z) Y i zi !−r/(d+2r) . (30) Example 4: Clustering with Itakura-Saito divergence. Itakura-Saito divergence uses Burg entropy as φ, φIS(z) = − X i ln zi, z ∈Rd, (31) with component index i. Then Hessian matrix ∇2φIS(z) = diag( 1 z2 1 , 1 z2 2 , · · · , 1 z2 d ). (32) According to Eq. (24), centroid’s density distribution function Pr,IS(z) ∼P d/(d+2r)(z) Y i z2 i !−r/(d+2r) . (33) Example 5: Clustering with Norm-like divergence. Convex function φ(z) = P i zα i ,z ∈Rd +, with power α ≥2. Simple calculation shows that the divergence reduces to Euclidean distance when α = 2. However, the divergence is no longer Euclidean-like, as long as α > 2: DNL(p, q) = X i pα i + (α −1)qα i −αpiqα−1 i . (34) With some calculation, we have Pr,NL(z) ∼P d/(d+2r)(z) Y i zi !(α−2)r/(d+2r) . (35) Remark: It is easy to see that Kullback-Leibler and Itakura-Saito quantization tend to move centroids closer to axes, and Norm-like quantization, when α > 2, does opposite thing, moving centroids far away from axes. 4 Experiments 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 x 1 0 0.2 0.4 0.6 0.8 1 0.6 0.8 1 1.2 1.4 1.6 1.8 x 2/3 x−1/3 0 0.2 0.4 0.6 0.8 1 0.2 0.4 0.6 0.8 1 1.2 1.4 x 4/3 x1/3 0 0.2 0.4 0.6 0.8 1 0 2 4 6 8 10 12 Squared Euclidean 0 0.2 0.4 0.6 0.8 1 0 2 4 6 8 10 12 14 16 18 Kullback-Leibler 0 0.2 0.4 0.6 0.8 1 0 1 2 3 4 5 6 7 8 9 Norm-like (α = 3) Figure 1: First row are predicted distribution functions of centroids by Eq.(36,37,38); second row are experimental histograms of location of centroids, by applying corresponding Bregman hard clustering algorithms. In this section, we verify our results, especially centroid’s location distribution Eq.(24), by using the Bregman hard clustering algorithm. Recall that our results are obtained in a limiting case, where we first take size of dataset n →∞and then number of clusters k →∞. However, size of real data is finite and it is also not practical to apply Bregman clustering algorithms on the asymptotic case. In this section, we simply sample data points from given distribution, with dataset size large enough, compared to k, to avoid early stopping of Bregman clustering. In addition, we only verify r = 1 cases here, since the Bregman clustering algorithm, which utilizes Lloyd’s method, cannot address Bregman quantization problems with r ̸= 1. 7 Case 1 (1-dimensional): Suppose the density P is uniform over [0, 1]. We set number of clusters k = 81, and apply different versions of Bregman hard clustering algorithm on this sample: standard k-means, Kullback-Leibler clustering and norm-like clustering. According to Eq.(27), Eq.(33) and Eq.(35), theoretical prediction of centroids locational distribution functions in this case should be: P1,EU(z) = 1, z ∈[0, 1]; (36) P1,KL(z) ∼ z−1/3, z ∈(0, 1]; (37) P1,NL(z) ∼ z1/3, z ∈[0, 1]; (38) and P(z) = 0 elsewhere. Figure 1 shows, in the first row, the theoretical prediction of distribution of centroids, and in the second row, experimental histograms of centroid locations for different Bregman quantization problems. Case 2 (2-dimensional): The density P = U([0, 1]2). Set k = 81 and apply the same three Bregman clustering algorithms as in case 1. Theoretical predictions of distribution of centroids for this case by Eq.(27), Eq.(33) and Eq.(35) are as follow, also shown in Figure 2: P1,EU(z) = 1, z = (z1, z2) ∈[0, 1]2; (39) P1,KL(z) ∼ (z1z2)−1/4, z = (z1, z2) ∈(0, 1]2; (40) P1,NL(z) ∼ (z1z2)1/4, z = (z1, z2) ∈[0, 1]2; (41) and P(z) = 0 elsewhere. 0 0.2 0.4 0.6 0.8 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.2 0.4 0.6 0.8 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0.0 0.5 1.0 0.0 0.5 1.0 0.0 0.5 1.0 1.5 2.0 Squared Euclidean 0.0 0.5 1.0 0.0 0.5 1.0 0 1 2 3 4 Kullback-Leibler 0.0 0.5 1.0 0.0 0.5 1.0 0.0 0.5 1.0 Norm-like (α = 3) Figure 2: Experimental results and theoretical predictions of centroids distribution for Case 2. In each of the 3-d plots, function is plotted over the cube [0, 1]2, with left most corner corresponding to point (0, 0), and right most corner corresponding to point (1, 1). Figure 2, in the first row, shows a visualization of centroids locations generated by experiments. For comparison, second row of Figure 2 presents 3-d plots of theoretical predictions of distribution of centroids. In each of the 3-d plots, function is plotted over the cube [0, 1]2, with left most corner corresponding to point (0, 0). It is easy to see that squared Euclidean quantization, in this case, results an uniform distribution of centroids, and that KullbackLeibler quantization tends to attract centroids towards axes, and norm-like quantization tends repel centroids away from axes. 5 Conclusion In this paper, we analyzed the asymptotic Bregman quantization problems for general Bregman divergences. We obtained explicit expressions for both leading order of asymptotic quantization error and locational distribution of centroids, both of which extend the classical results for k-means quantization. We showed how our results apply to commonly used Bregman divergences, and gave some experimental verification. We hope these results will provide guidance and insight for further theoretical analysis of Bregman clustering, such as Bregman soft clustering and other related methods [3, 11], as well as for practical algorithm design and applications. Our results can also lead to better understanding of the existing seeding strategies for Bregman clustering [19] and to new seeding methods. Acknowledgement We thank the National Science Foundation for financial support and to Brian Kulis for discussions. 8 References [1] D. Aloise, A. Deshpande, P. Hansen, and P. Popat. NP-hardness of Euclidean sum-of-squares clustering. Machine learning, 75(2):245–248, 2009. [2] K. Alsabti, S. Ranka, and V. Singh. An efficient k-means clustering algorithm. IPPS/SPDP Workshop on High Performance Data Mining, 1998. [3] A. Banerjee, S. Merugu, I. S. Dhillon, and J. Ghosh. Clustering with Bregman divergences. The Journal of Machine Learning Research, 6:1705–1749, 2005. [4] L. M. Bregman. The relaxation method of finding the common point of convex sets and its application to the solution of problems in convex programming. USSR computational mathematics and mathematical physics, 7(3):200–217, 1967. [5] J. A. Bucklew and G. L. Wise. Multidimensional asymptotic quantization theory with r th power distortion measures. Information Theory, IEEE Transactions on, 28(2):239–247, 1982. [6] A. Coates and A. Y. Ng. Learning feature representations with k-means. In Neural Networks: Tricks of the Trade, pages 561–580. Springer, 2012. [7] A. Fischer. Quantization and clustering with Bregman divergences. Journal of Multivariate Analysis, 101(9):2207–2221, 2010. [8] A. Gersho and R. M. Gray. Vector quantization and signal compression, volume 159. Springer Science & Business Media, 2012. [9] S. Graf and H. Luschgy. Foundations of quantization for probability distributions. Springer, 2000. [10] A. K. Jain, M. N. Murty, and P. J. Flynn. Data clustering: a review. ACM computing surveys (CSUR), 31(3):264–323, 1999. [11] K. Jiang, B. Kulis, and M. I. Jordan. Small-variance asymptotics for exponential family Dirichlet process mixture models. In Advances in Neural Information Processing Systems, pages 3158–3166, 2012. [12] L. Kaufman and P. J. Rousseeuw. Finding groups in data: an introduction to cluster analysis, volume 344. John Wiley & Sons, 2009. [13] K. Krishna and M. N. Murty. Genetic k-means algorithm. Systems, Man, and Cybernetics, Part B: Cybernetics, IEEE Transactions on, 29(3):433–439, 1999. [14] T. Linder. On asymptotically optimal companding quantization. Problems of Control and Information Theory, 20(6):475–484, 1991. [15] S. P. Lloyd. Least squares quantization in PCM. Info. Theory, IEEE Transactions on, 28(2):129–137, 1982. [16] J. MacQueen. Some methods for classification and analysis of multivariate observations. In Proceedings of the fifth Berkeley symposium on mathematical statistics and probability, volume 1, pages 281–297. Oakland, CA, USA., 1967. [17] M. Mahajan, P. Nimbhorkar, and K. Varadarajan. The planar k-means problem is NP-hard. In WALCOM: Algorithms and Computation, pages 274–285. Springer, 2009. [18] D. E. McClure. Nonlinear segmented function approximation and analysis of line patterns. Quarterly of Applied Mathematics, 33(1):1–37, 1975. [19] R. Nock, P. Luosto, and J. Kivinen. Mixed Bregman clustering with approximation guarantees. In Joint ECML and KDD, pages 154–169. Springer, 2008. [20] P. Panter and W. Dite. Quantization distortion in pulse-count modulation with nonuniform spacing of levels. Proceedings of the IRE, 39(1):44–48, 1951. [21] Q. Que and M. Belkin. Back to the future: Radial basis function networks revisited. In Proceedings of the 19th International Conference on Artificial Intelligence and Statistics, pages 1375–1383, 2016. [22] M. Telgarsky and S. Dasgupta. Agglomerative Bregman clustering. arXiv preprint arXiv:1206.6446, 2012. [23] K. Wagstaff, C. Cardie, S. Rogers, S. Schrödl, et al. Constrained k-means clustering with background knowledge. In ICML, volume 1, pages 577–584, 2001. [24] J. Zhang and C. Zhang. Multitask Bregman clustering. Neurocomputing, 74(10):1720–1734, 2011. 9 | 2016 | 448 |
6,381 | Swapout: Learning an ensemble of deep architectures Saurabh Singh, Derek Hoiem, David Forsyth Department of Computer Science University of Illinois, Urbana-Champaign {ss1, dhoiem, daf}@illinois.edu Abstract We describe Swapout, a new stochastic training method, that outperforms ResNets of identical network structure yielding impressive results on CIFAR-10 and CIFAR100. Swapout samples from a rich set of architectures including dropout [20], stochastic depth [7] and residual architectures [5, 6] as special cases. When viewed as a regularization method swapout not only inhibits co-adaptation of units in a layer, similar to dropout, but also across network layers. We conjecture that swapout achieves strong regularization by implicitly tying the parameters across layers. When viewed as an ensemble training method, it samples a much richer set of architectures than existing methods such as dropout or stochastic depth. We propose a parameterization that reveals connections to exiting architectures and suggests a much richer set of architectures to be explored. We show that our formulation suggests an efficient training method and validate our conclusions on CIFAR-10 and CIFAR-100 matching state of the art accuracy. Remarkably, our 32 layer wider model performs similar to a 1001 layer ResNet model. 1 Introduction This paper describes swapout, a stochastic training method for general deep networks. Swapout is a generalization of dropout [20] and stochastic depth [7] methods. Dropout zeros the output of individual units at random during training, while stochastic depth skips entire layers at random during training. In comparison, the most general swapout network produces the value of each output unit independently by reporting the sum of a randomly selected subset of current and all previous layer outputs for that unit. As a result, while some units in a layer may act like normal feedforward units, others may produce skip connections and yet others may produce a sum of several earlier outputs. In effect, our method averages over a very large set of architectures that includes all architectures used by dropout and all used by stochastic depth. Our experimental work focuses on a version of swapout which is a natural generalization of the residual network [5, 6]. We show that this results in improvements in accuracy over residual networks with the same number of layers. Improvements in accuracy are often sought by increasing the depth, leading to serious practical difficulties. The number of parameters rises sharply, although recent works such as [19, 22] have addressed this by reducing the filter size [19, 22]. Another issue resulting from increased depth is the difficulty of training longer chains of dependent variables. Such difficulties have been addressed by architectural innovations that introduce shorter paths from input to loss either directly [22, 21, 5] or with additional losses applied to intermediate layers [22, 12]. At the time of writing, the deepest networks that have been successfully trained are residual networks (1001 layers [6]). We show that increasing the depth of our swapout networks increases their accuracy. There is compelling experimental evidence that these very large depths are helpful, though this may be because architectural innovations introduced to make networks trainable reduce the capacity of 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. the layers. The theoretical evidence that a depth of 1000 is required for practical problems is thin. Bengio and Dellaleau argue that circuit efficiency constraints suggest increasing depth is important, because there are functions that require exponentially large shallow networks to compute [1]. Less experimental interest has been displayed in the width of the networks (the number of filters in a convolutional layer). We show that increasing the width of our swapout networks leads to significant improvements in their accuracy; an appropriately wide swapout network is competitive with a deep residual network that is 1.5 orders of magnitude deeper and has more parameters. Contributions: Swapout is a novel stochastic training scheme that can sample from a rich set of architectures including dropout, stochastic depth and residual architectures as special cases. Swapout improves the performance of the residual networks for a model of the same depth. Wider but much shallower swapout networks are competitive with very deep residual networks. 2 Related Work Convolutional neural networks have a long history (see the introduction of [11]). They are now intensively studied as a result of recent successes (e.g. [9]). Increasing the number of layers in a network improves performance [19, 22] if the network can be trained. A variety of significant architectural innovations improve trainability, including: the ReLU [14, 3]; batch normalization [8]; and allowing signals to skip layers. Our method exploits this skipping process. Highway networks use gated skip connections to allow information and gradients to pass unimpeded across several layers [21]. Residual networks use identity skip connections to further improve training [5]; extremely deep residual networks can be trained, and perform well [6]. In contrast to these architectures, our method skips at the unit level (below), and does so randomly. Our method employs randomness at training time. For a review of the history of random methods, see the introduction of [16], which shows that entirely randomly chosen features can produce an SVM that generalizes well. Randomly dropping out unit values (dropout [20]) discourages coadaptation between units. Randomly skipping layers (stochastic depth) [7] during training reliably leads to improvements at test time, likely because doing so regularizes the network. The precise details of the regularization remain uncertain, but it appears that stochastic depth represents a form of tying between layers; when a layer is dropped, other layers are encouraged to be able to replace it. Each method can be seen as training a network that averages over a family of architectures during inference. Dropout averages over architectures with “missing” units and stochastic depth averages over architectures with “missing” layers. Other successful recent randomized methods include dropconnect [23] which generalizes dropout by dropping individual connections instead of units (so dropping several connections together), and stochastic pooling [24] (which regularizes by replacing the deterministic pooling by randomized pooling). In contrast, our method skips layers randomly at a unit level enjoying the benefits of each method. Recent results show that (a) stochastic gradient descent with sufficiently few steps is stable (in the sense that changes to training data do not unreasonably disrupt predictions) and (b) dropout enhances that property, by reducing the value of a Lipschitz constant ([4], Lemma 4.4). We show our method enjoys the same behavior as dropout in this framework. Like dropout, the network trained with swapout depends on random variables. A reasonable strategy at test time with such a network is to evaluate multiple instances (with different samples used for the random variables) and average. Reliable improvements in accuracy are achievable by training distinct models (which have distinct sets of parameters), then averaging predictions [22], thereby forming an explicit ensemble. In contrast, each of the instances of our network in an average would draw from the same set of parameters (we call this an implicit ensemble). Srivastava et al. argue that, at test time, random values in a dropout network should be replaced with expectations, rather than taking an average over multiple instances [20] (though they use explicit ensembles, increasing the computational cost). Considerations include runtime at test; the number of samples required; variance; and experimental accuracy results. For our model, accurate values of these expectations are not available. In Section 4, we show that (a) swapout networks that use estimates of these expectations outperform strong comparable baselines and (b) in turn, these are outperformed by swapout networks that use an implicit ensemble. 2 X + F(X) 0 F(X) X Swapout Y = ⇥1 ⊙X + ⇥2 ⊙F(X) (e) SkipForward Y = ⇥⊙X + (1 −⇥) ⊙F(X) (d) ResNet Y = X + F(X) (c) X (a) F(X) (b) FeedForward Input Output Figure 1: Visualization of architectural differences, showing computations for a block using various architectures. Each circle is a unit in a grid corresponding to spatial layout, and circles are colored to indicate what they report. Given input X (a), all units in a feed forward block emit F(X) (b). All units in a residual network block emit X + F(X) (c). A skipforward network randomly chooses between reporting X and F(X) per unit (d). Finally, swapout randomly chooses between reporting 0 (and so dropping out the unit), X (skipping the unit), F(X) (imitating a feedforward network at the unit) and X + F(X) (imitating a residual network unit). 3 Swapout Notation and terminology: We use capital letters to represent tensors and ⊙to represent elementwise product (broadcasted for scalars). We use boldface 0 and 1 to represent tensors of 0 and 1 respectively. A network block is a set of simple layers in some specific configuration e.g. a convolution followed by a ReLU or a residual network block [5]. Several such potentially different blocks can be connected in the form of a directed acyclic graph to form the full network model. Dropout kills individual units randomly; stochastic depth skips entire blocks of units randomly. Swapout allows individual units to be dropped, or to skip blocks randomly. Implementing swapout is a straightforward generalization of dropout. Let X be the input to some network block that computes F(X). The u’th unit produces F (u)(X) as output. Let Θ be a tensor of i.i.d. Bernoulli random variables. Dropout computes the output Y of that block as Y = Θ ⊙F(X). (1) It is natural to think of dropout as randomly selecting an output from the set F(u) = {0, F (u)(X)} for the u’th unit. Swapout generalizes dropout by expanding the choice of F(u). Now write {Θi} for N distinct tensors of iid Bernoulli random variables indexed by i and with corresponding parameters {θi}. Let {Fi} be corresponding tensors consisting of values already computed somewhere in the network. Note that one of these Fi can be X itself (identity). However, Fi are not restricted to being a function of X and we drop the X to indicate this. Most natural choices for Fi are the outputs of earlier layers. Swapout computes the output of the layer in question by computing Y = N X i=1 Θi ⊙Fi (2) and so, for unit u, we have F(u) = {F (u) 1 , F (u) 2 , . . . , F (u) 1 + F (u) 2 , . . . , P i F (u) i }. We study the simplest case where Y = Θ1 ⊙X + Θ2 ⊙F(X) (3) so that, for unit u, we have F(u) = {0, X(u), F (u)(X), X(u) + F (u)(X)}. Thus, each unit in the layer could be: 1) dropped (choose 0); 2) a feedforward unit (choose F (u)(X)); 3) skipped (choose X(u)); 4) or a residual network unit (choose X(u) + F (u)(X)). 3 Since a swapout network can clearly imitate a residual network, and since residual networks are currently the best-performing networks on various standard benchmarks, we perform exhaustive experimental comparisons with them. If one accepts the view of dropout and stochastic depth as averaging over a set of architectures, then swapout extends the set of architectures used. Appropriate random choices of Θ1 and Θ2 yield: all architectures covered by dropout; all architectures covered by stochastic depth; and block level skip connections. But other choices yield unit level skip and residual connections. Swapout retains important properties of dropout. Swapout discourages co-adaptation by dropping units, but also by on occasion presenting units with inputs that have come from earlier layers. Dropout has been shown to enhance the stability of stochastic gradient descent ([4], lemma 4.4). This applies to swapout in its most general form, too. We extend the notation of that paper, and write L for a Lipschitz constant that applies to the network, ∇f(v) for the gradient of the network f with parameters v, and D∇f(v) for the gradient of the dropped out version of the network. The crucial point in the relevant enabling lemma is that E[||Df(v)||] < E[||∇f(v)||] ≤L (the inequality implies improvements). Now write ∇S [f] (v) for the gradient of a swapout network, and ∇G [f] (v) for the gradient of the swapout network which achieves the largest Lipschitz constant by choice of Θi (this exists, because Θi is discrete). First, a Lipschitz constant applies to this network; second, E[||∇S [f] (v)||] ≤E[||∇G [f] (v)||] ≤L, so swapout makes stability no worse; third, we speculate light conditions on f should provide E[||∇S [f] (v)||] < E[||∇G [f] (v)||] ≤L, improving stability ([4] Section 4). 3.1 Inference in Stochastic Networks A model trained with swapout represents an entire family of networks with tied parameters, where members of the family were sampled randomly during training. There are two options for inference. Either replace random variables with their expected values, as recommended by Srivastava et al. [20] (deterministic inference). Alternatively, sample several members of the family at random, and average their predictions (stochastic inference). Note that such stochastic inference with dropout has been studied in [2]. There is an important difference between swapout and dropout. In a dropout network, one can estimate expectations exactly (as long as the network isn’t trained with batch normalization, below). This is because E[ReLU[Θ ⊙F(X)]] = ReLU[E[Θ ⊙F(X)]] (recall Θ is a tensor of Bernoulli random variables, and thus non-negative). In a swapout network, one usually can not estimate expectations exactly. The problem is that E[ReLU[(Θ1X + Θ2Y )]] is not the same as ReLU[E[(Θ1X + Θ2Y )]] in general. Estimates of expectations that ignore this are successful, as the experiments show, but stochastic inference gives significantly better results. Srivastava et al. argue that deterministic inference is significantly less expensive in computation. We believe that Srivastava et al. may have overestimated how many samples are required for an accurate average, because they use distinct dropout networks in the average (Figure 11 in [20]). Our experience of stochastic inference with swapout has been positive, with the number of samples needed for good behavior small (Figure 2). Furthermore, computational costs of inference are smaller when each instance of the network uses the same parameters A technically more delicate point is that both dropout and swapout networks interact poorly with batch normalization if one uses deterministic inference. The problem is that the estimates collected by batch normalization during training may not reflect test time statistics. To see this consider two random variables X and Y and let Θ1, Θ2 ∼Bernoulli(θ). While E[Θ1X + Θ2Y ] = E[θX + θY ] = θX + θY , it can be shown that Var[Θ1X + Θ2Y ] ≥Var[θX + θY ] with equality holding only for θ = 0 and θ = 1. Thus, the variance estimates collected by Batch Normalization during training do not represent the statistics observed during testing if the expected values of Θ1 and Θ2 are used in a deterministic inference scheme. These errors in scale estimation accumulate as more and more layers are stacked. This may explain why [7] reports that dropout doesn’t lead to any improvement when used in residual networks with batch normalization. 4 3.2 Baseline comparison methods ResNets: We compare with ResNet architectures as described in [5](referred to as v1) and in [6](referred to as v2). Dropout: Standard dropout on the output of residual block using Y = Θ ⊙(X + F(X)). Layer Dropout: We replace equation 3 by Y = X + Θ(1×1)F(X). Here Θ(1×1) is a single Bernoulli random variable shared across all units. SkipForward: Equation 3 introduces two stochastic parameters Θ1 and Θ2. We also explore a simpler architecture, SkipForward, that introduces only one parameter but samples from a smaller set F(u) = {X(u), F (u)(X)} as below. A parallel work refers to this as zoneout [10]. Y = Θ ⊙X + (1 −Θ) ⊙F(X) (4) 4 Experiments We experiment extensively on the CIFAR-10 dataset and demonstrate that a model trained with swapout outperforms a comparable ResNet model. Further, a 32 layer wider model matches the performance of a 1001 layer ResNet on both CIFAR-10 and CIFAR-100 datasets. Model: We experiment with ResNet architectures as described in [5](referred to as v1) and in [6](referred to as v2). However, our implementation (referred to as ResNet Ours) has the following modifications which improve the performance of the original model (Table 1). Between blocks of different feature sizes we subsample using average pooling instead of strided convolutions and use projection shortcuts with learned parameters. For final prediction we follow a scheme similar to Network in Network [13]. We replace average pooling and fully connected layer by a 1 × 1 convolution layer followed by global average pooling to predict the logits that are fed into the softmax. Layers in ResNets are arranged in three groups with all convolutional layers in a group containing equal number of filters. We represent the number of filters in each group as a tuple with the smallest size as (16, 32, 64) (as used in [5]for CIFAR-10). We refer to this as width and experiment with various multiples of this base size represented as W × 1, W × 2 etc. Training: We train using SGD with a batch size of 128, momentum of 0.9 and weight decay of 0.0001. Unless otherwise specified, we train all the models for a total 256 epochs. Starting from an initial learning rate of 0.1, we drop it by a factor of 10 after 192 epochs and then again after 224 epochs. Standard augmentation of left-right flips and random translations of up to four pixels is used. For translation, we pad the images by 4 pixels on all the sides and sample a random 32 × 32 crop. All the images in a mini-batch use the same crop. Note that dropout slows convergence ([20], A.4), and swapout should do so too for similar reasons. Thus using the same training schedule for all the methods should disadvantage swapout. Models trained with Swapout consistently outperform baselines: Table 1 compares Swapout with various 20 layer baselines. Models trained with Swapout consistently outperform all other models of similar architecture. The stochastic training schedule matters: Different layers in a swapout network could be trained with different parameters of their Bernoulli distributions (the stochastic training schedule). Table 2 shows that stochastic training schedules have a significant effect on the performance. We report the performance with deterministic as well as stochastic inference. These schedules differ in how the values of parameters θ1 and θ2 of the random variables in equation 3 are set for different layers. Note that θ1 = θ2 = 0.5 corresponds to the maximum stochasticity. A schedule with less randomness in the early layers (bottom row) performs the best because swapout adds per unit noise and early layers have the largest number of units. Thus, low stochasticity in early layers significantly reduces the randomness in the system. We use this schedule for all the experiments unless otherwise stated. 5 Table 1: In comparison with fair baselines on CIFAR-10, swapout is always more accurate. We refer to the base width of (16, 32, 64) as W × 1 and others are multiples of it (See Table 3 for details on width). We report the width along with the number of parameters in each model. Models trained with swapout consistently outperform all other models of comparable architecture. All stochastic methods were trained using the Linear(1, 0.5) schedule (Table 2) and use stochastic inference. v1 and v2 represent residual block architectures in [5] and [6] respectively. Method Width #Params Error(%) ResNet v1 [5] W × 1 0.27M 8.75 ResNet v1 Ours W × 1 0.27M 8.54 Swapout v1 W × 1 0.27M 8.27 ResNet v2 Ours W × 1 0.27M 8.27 Swapout v2 W × 1 0.27M 7.97 Swapout v1 W × 2 1.09M 6.58 ResNet v2 Ours W × 2 1.09M 6.54 Stochastic Depth v2 Ours W × 2 1.09M 5.99 Dropout v2 W × 2 1.09M 5.87 SkipForward v2 W × 2 1.09M 6.11 Swapout v2 W × 2 1.09M 5.68 Table 2: The choice of stochastic training schedule matters. We evaluate the performance of a 20 layer swapout model (W × 2) trained with different stochasticity schedules on CIFAR-10. These schedules differ in how the parameters θ1 and θ2 of the Bernoulli random variables in equation 3 are set for the different layers. Linear(a, b) refers to linear interpolation from a to b from the first block to the last (see [7]). Others use the same value for all the blocks. We report the performance for both the deterministic and stochastic inference (with 30 samples). Schedule with less randomness in the early layers (bottom row) performs the best. Method Deterministic Error(%) Stochastic Error(%) Swapout (θ1 = θ2 = 0.5) 10.36 6.69 Swapout (θ1 = 0.2, θ2 = 0.8) 10.14 7.63 Swapout (θ1 = 0.8, θ2 = 0.2) 7.58 6.56 Swapout (θ1 = θ2 = Linear(0.5, 1)) 7.34 6.52 Swapout (θ1 = θ2 = Linear(1, 0.5)) 6.43 5.68 Swapout improves over ResNet architecture: From Table 3 it is evident that networks trained with Swapout consistently show better performance than corresponding ResNets, for most choices of width investigated, using just the deterministic inference. This difference indicates that the performance improvement is not just an ensemble effect. Stochastic inference outperforms deterministic inference: Table 3 shows that the stochastic inference scheme outperforms the deterministic scheme in all the experiments. Prediction for each image is done by averaging the results of 30 stochastic forward passes. This difference is not just due to the widely reported effect that an ensemble of networks is better as networks in our ensemble share parameters. Instead, stochastic inference produces more accurate expectations and interacts better with batch normalization. Stochastic inference needs few samples for a good estimate: Figure 2 shows the estimated accuracies as a function of the number of forward passes per image. It is evident that relatively few samples are enough for a good estimate of the mean. Compare Figure-11 of [20], which implies ∼50 samples are required. Increase in width leads to considerable performance improvements: The number of filters in a convolutional layer is its width. Table 3 shows that the performance of a 20 layer model improves considerably as the width is increased both for the baseline ResNet v2 architecture as well as the models trained with Swapout. Swapout is better able to use the available capacity than the 6 Table 3: Wider swapout models work better. We evaluate the effect of increasing the number of filters on CIFAR-10. ResNets [5] contain three groups of layers with all convolutional layers in a group containing equal number of filters. We indicate the number of filters in each group as a tuple below and report the performance with deterministic as well as stochastic inference with 30 samples. For each size, model trained with Swapout outperforms the corresponding ResNet model. Model Width #Params ResNet v2 Swapout Deterministic Stochastic Swapout v2 (20) W × 1 (16, 32, 64) 0.27M 8.27 8.58 7.92 Swapout v2 (20) W × 2 (32, 64, 128) 1.09M 6.54 6.40 5.68 Swapout v2 (20) W × 4 (64, 128, 256) 4.33M 5.62 5.43 5.09 Swapout v2 (32) W × 4 (64, 128, 256) 7.43M 5.23 4.97 4.76 Table 4: Swapout outperforms comparable methods on CIFAR-10. A 32 layer wider model performs competitively against a 1001 layer ResNet. Swapout and dropout use stochastic inference. Method #Params Error(%) DropConnect [23] 9.32 NIN [13] 8.81 FitNet(19) [17] 8.39 DSN [12] 7.97 Highway[21] 7.60 ResNet v1(110) [5] 1.7M 6.41 Stochastic Depth v1(1202) [7] 19.4M 4.91 SwapOut v1(20) W × 2 1.09M 6.58 ResNet v2(1001) [6] 10.2M 4.92 Dropout v2(32) W × 4 7.43M 4.83 SwapOut v2(32) W × 4 7.43M 4.76 corresponding ResNet with similar architecture and number of parameters. Table 4 compares models trained with Swapout with other approaches on CIFAR-10 while Table 5 compares on CIFAR-100. On both datasets our shallower but wider model compares well with 1001 layer ResNet model. Swapout uses parameters efficiently: Persistently over tables 1, 3, and 4, swapout models with fewer parameters outperform other comparable models. For example, Swapout v2(32) W × 4 gets 4.76% with 7.43M parameters in comparison to the ResNet version at 4.91% with 10.2M parameters. Experiments on CIFAR-100 confirm our results: Table 5 shows that Swapout is very effective as it improves the performance of a 20 layer model (ResNet Ours) by more than 2%. Widening the network and reducing the stochasticity leads to further improvements. Further, a wider but relatively shallow model trained with Swapout (22.72%; 7.46M params) is competitive with the best performing, very deep (1001 layer) latest ResNet model (22.71%;10.2M params). 5 Discussion and future work Swapout is a stochastic training method that shows reliable improvements in performance and leads to networks that use parameters efficiently. Relatively shallow swapout networks give comparable performance to extremely deep residual networks. Preliminary experiments on ImageNet [18] using swapout (Linear(1,0.8)) yield 28.7%/9.2% top1/top-5 validation error while the corresponding ResNet-152 yields 22.4%/5.8% validation errors. We noticed that stochasticity is a difficult hyper-parameter for deeper networks and a better setting would likely improve results. We have shown that different stochastic training schedules produce different behaviors, but have not searched for the best schedule in any systematic way. It may be possible to obtain improvements by doing so. We have described an extremely general swapout mechanism. It is straightforward using 7 Table 5: Swapout is strongly competitive with the best methods on CIFAR-100, and uses parameters efficiently in comparison. A 20 layer model (Swapout v2 (20)) trained with Swapout improves upon the corresponding 20 layer ResNet model (ResNet v2 Ours (20)). Further, a 32 layer wider model performs competitively against a 1001 layer ResNet (last row). Swapout uses stochastic inference. Method #Params Error(%) NIN [13] 35.68 DSN [12] 34.57 FitNet [17] 35.04 Highway [21] 32.39 ResNet v1 (110) [5] 1.7M 27.22 Stochastic Depth v1 (110) [7] 1.7M 24.58 ResNet v2 (164) [6] 1.7M 24.33 ResNet v2 (1001) [6] 10.2M 22.71 ResNet v2 Ours (20) W × 2 1.09M 28.08 SwapOut v2 (20)(Linear(1,0.5)) W × 2 1.10M 25.86 SwapOut v2 (56)(Linear(1,0.5)) W × 2 3.43M 24.86 SwapOut v2 (56)(Linear(1,0.8)) W × 2 3.43M 23.46 SwapOut v2 (32)(Linear(1,0.8)) W × 4 7.46M 22.72 0 10 20 30 6 7 8 9 Number of samples → Mean error rate → 0 10 20 30 0.05 0.1 0.15 Number of samples → Standard error → θ1 = θ2 = Linear(1, 0.5) θ1 = θ2 = 0.5 Figure 2: Stochastic inference needs few samples for a good estimate. We plot the mean error rate on the left as a function of the number of samples for two stochastic training schedules. Standard error of the mean is shown as the shaded interval on the left and magnified in the right plot. It is evident that relatively few samples are needed for a reliable estimate of the mean error. The mean and standard error was computed using 30 repetitions for each sample count. Note that stochastic inference quickly overtakes accuracies for deterministic inference in very few samples (2-3)(Table 2). equation 2 to apply swapout to inception networks [22] (by using several different functions of the input and a sufficiently general form of convolution); to recurrent convolutional networks [15] (by choosing Fi to have the form F ◦F ◦F . . .); and to gated networks. All our experiments focus on comparisons to residual networks because these are the current top performers on CIFAR-10 and CIFAR-100. It would be interesting to experiment with other versions of the method. As with dropout and batch normalization, it is difficult to give a crisp explanation of why swapout works. We believe that swapout causes some form of improvement in the optimization process. This is because relatively shallow networks with swapout reliably work as well as or better than quite deep alternatives; and because swapout is notably and reliably more efficient in its use of parameters than comparable deeper networks. Unlike dropout, swapout will often propagate gradients while still forcing units not to co-adapt. Furthermore, our swapout networks involve some form of tying between layers. When a unit sometimes sees layer i and sometimes layer i −j, the gradient signal will be exploited to encourage the two layers to behave similarly. The reason swapout is successful likely involves both of these points. Acknowledgments: This work is supported in part by ONR MURI Awards N00014-10-1-0934 and N0001416-1-2007. We would like to thank NVIDIA for donating some of the GPUs used in this work. 8 References [1] Y. Bengio and O. Delalleau. On the expressive power of deep architectures. In Proceedings of the 22nd International Conference on Algorithmic Learning Theory, 2011. [2] Y. Gal and Z. Ghahramani. Bayesian convolutional neural networks with bernoulli approximate variational inference. 2015. [3] X. Glorot, A. Bordes, and Y. Bengio. Deep sparse rectifier neural networks. In AISTATS, 2011. [4] M. Hardt, B. Recht, and Y. Singer. Train faster, generalize better: Stability of stochastic gradient descent. CoRR, abs/1509.01240, 2015. [5] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. CoRR, abs/1512.03385, 2015. [6] K. He, X. Zhang, S. Ren, and J. Sun. Identity mappings in deep residual networks. CoRR, abs/1603.05027, 2016. [7] G. Huang, Y. Sun, Z. Liu, D. Sedra, and K. Q. Weinberger. Deep networks with stochastic depth. CoRR, abs/1603.09382, 2016. [8] S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. CoRR, abs/1502.03167, 2015. [9] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012. [10] D. Krueger, T. Maharaj, J. Kramár, M. Pezeshki, N. Ballas, N. R. Ke, A. Goyal, Y. Bengio, H. Larochelle, A. Courville, et al. Zoneout: Regularizing rnns by randomly preserving hidden activations. arXiv preprint arXiv:1606.01305, 2016. [11] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 1998. [12] C.-Y. Lee, S. Xie, P. Gallagher, Z. Zhang, and Z. Tu. Deeply-supervised nets. AISTATS, 2015. [13] M. Lin, Q. Chen, and S. Yan. Network in network. CoRR, abs/1312.4400, 2013. [14] V. Nair and G. E. Hinton. Rectified linear units improve restricted boltzmann machines. In ICML, 2010. [15] P. H. Pinheiro and R. Collobert. Recurrent convolutional neural networks for scene parsing. arXiv preprint arXiv:1306.2795, 2013. [16] A. Rahimi and B. Recht. Random features for large-scale kernel machines. In NIPS, 2007. [17] A. Romero, N. Ballas, S. E. Kahou, A. Chassang, C. Gatta, and Y. Bengio. Fitnets: Hints for thin deep nets. ICLR, 2015. [18] 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. International Journal of Computer Vision, 2015. [19] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014. [20] N. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov. Dropout: A simple way to prevent neural networks from overfitting. The Journal of Machine Learning Research, 2014. [21] R. K. Srivastava, K. Greff, and J. Schmidhuber. Training very deep networks. In NIPS, 2015. [22] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. E. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich. Going deeper with convolutions. CoRR, abs/1409.4842, 2014. [23] L. Wan, M. Zeiler, S. Zhang, Y. L. Cun, and R. Fergus. Regularization of neural networks using dropconnect. In ICML, pages 1058–1066, 2013. [24] M. D. Zeiler and R. Fergus. Stochastic pooling for regularization of deep convolutional neural networks. arXiv preprint arXiv:1301.3557, 2013. 9 | 2016 | 449 |
6,382 | Fast and accurate spike sorting of high-channel count probes with KiloSort Marius Pachitariu1, Nick Steinmetz1, Shabnam Kadir1 Matteo Carandini1 and Kenneth Harris1 1 UCL, UK {ucgtmpa, }@ucl.ac.uk Abstract New silicon technology is enabling large-scale electrophysiological recordings in vivo from hundreds to thousands of channels. Interpreting these recordings requires scalable and accurate automated methods for spike sorting, which should minimize the time required for manual curation of the results. Here we introduce KiloSort, a new integrated spike sorting framework that uses template matching both during spike detection and during spike clustering. KiloSort models the electrical voltage as a sum of template waveforms triggered on the spike times, which allows overlapping spikes to be identified and resolved. Unlike previous algorithms that compress the data with PCA, KiloSort operates on the raw data which allows it to construct a more accurate model of the waveforms. Processing times are faster than in previous algorithms thanks to batch-based optimization on GPUs. We compare KiloSort to an established algorithm and show favorable performance, at much reduced processing times. A novel post-clustering merging step based on the continuity of the templates further reduced substantially the number of manual operations required on this data, for the neurons with nearzero error rates, paving the way for fully automated spike sorting of multichannel electrode recordings. 1 Introduction The oldest and most reliable method for recording neural activity involves lowering an electrode into the brain and recording the local electrical activity around the electrode tip. Action potentials of single neurons can then be observed as a stereotypical temporal deflection of the voltage, called a spike waveform. When multiple neurons close to the electrode fire action potentials, their spikes must be identified and assigned to the correct cell, based on the features of the recorded waveforms, a process known as spike sorting [1, 2, 3, 4, 5, 6, 7]. Spike sorting is substantially helped by the ability to simultaneously measure the voltage at multiple closely-space sites in the extracellular medium. In this case, the recorded waveforms can be seen to have characteristic spatial shapes, determined by each cell’s location and physiological characteristics. Together, the spatial and temporal shape of the waveform provides all the information that can be used to assign a given spike to a cell. New high-density electrodes, currently being tested, can record from several hundred closely-spaced recording sites. Fast algorithms are necessary to quickly and accurately spike sort tens of millions of spikes coming from 100 to 1,000 cells, from recordings performed with such next-generation electrodes in awake, behaving animals. Here we present a new algorithm which provides accurate spike sorting results, with run times that scale near-linearly with the number of recording channels. The algorithm takes advantage of the computing capabilities of low-cost commercially available graphics processing units (GPUs) to enable approximately realtime spike sorting from 384-channel probes. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 samples (25kHz) 20 40 60 80 100 120 channels a b c correlation of channel noise 20 40 60 80 100 120 channels 20 40 60 80 100 120 channels Figure 1: Data from high-channel count recordings. a, High-pass filtered and channel-whitened data. Negative peaks are action potentials. b, Example mean waveforms, centered on their peaks. c, Example cross-correlation matrix across channels (before whitening). 1.1 High-density electrophysiology and structured sources of noise Next-generation high-density neural probes allow the spikes of most neurons to be recorded on 5 to 50 channels simultaneously (Fig. 1b). This provides a substantial amount of information per spike, but because other neurons also fire on the same channels, a clustering algorithm is still required to demix the signals and assign spikes to the correct cluster. Although the dense spacing of channels provides a large amount of information for each spike, structured sources of noise can still negatively impact the spike sorting problem. For example, the superimposed waveforms of neurons distant from the electrode (non-sortable units) add up and constitute a continuous random background (Fig. 1a) against which the features of sortable spikes (Fig. 1b) must be distinguished. In behaving animals, another major confound is given by the movement of the electrode relative to the tissue, which creates an apparent inverse movement of the waveform along the channels of the probe. 1.2 Previous work A traditional approach to spike sorting divides the problem into several stages. In the first stage, spikes are detected that have maximum amplitudes above a pre-defined threshold and these spikes are projected into a common low-dimensional space, typically obtained by PCA. In the second stage, the spikes are clustered in this low-dimensional space using a variety of approaches, such as mixtures of Gaussians [8] or peak-density based approaches [9]. Some newer algorithms also include a third stage of template matching in which overlapping spikes are found in the raw data, that may have been missed in the first detection phase. Finally, a manual stage in a GUI is required for awake recordings, to manually perform merge and split operations on the imperfect automated results. Here instead we combine these steps into a single model with a cost function based on the error of reconstructing the entire raw voltage dataset with the templates of a set of candidate neurons. We derive approximate inference and learning algorithms that can be successfully applied to very large channel count data. This approach is related to a previous study [6], but whereas the previous work scales is impractically slow for recordings with large numbers of channels, our further modelling and algorithmic innovations have enabled the approach to be used quickly and accurately on real datasets. We improve the generative model of [] from a spiking process with continuous L1-penalized traces, to a model of spikes as discrete temporal events. The approach of [6] does not scale well to high channel count probes, as it requires the solution of a generic convex optimization problem in high dimensions. 2 2 Model formulation We start with a generative model of the raw electrical voltage. Unlike previous approaches, we do not pre-commit to the times of the spikes, nor do we project the waveforms of the spikes to a lowerdimensional PCA space. Both of these steps discard potentially useful information, as we show below. 2.1 Pre-processing: common average referencing, temporal filtering and spatial whitening To remove low-frequency fluctuations, such as the local field potential, we high-pass filter each channel of the raw data at 300 Hz. To diminish the effect of artifacts shared across all channels, we subtract at each timepoint the median of the signal across all recording sites, an operation known as common average referencing. This step is best performed after high-pass filtering, because the LFP magnitude is variable across channels but can be comparable in size to the artifacts. Finally, we whiten the data in space to remove noise that is correlated across channels (Fig. 1c). The correlated noise is mostly due to far neurons with small spikes [10], which have a large spatial spread over the surface of the probe. Since there are very many such neurons at all recording sites, their noise averages out to have normal statistics with a stereotypical cross-correlation pattern across channels (Fig. 1c). We distinguish the noise covariance from the covariance of the large, sortable spikes, by removing the times of putative spikes (detected with a threshold criterion) from the calculation of the covariance matrix. We use a symmetrical whitening matrix that maintains the spatial structure of the data, known as ZCA, defined as WZCA = Σ−1/2 = ED−1/2ET , where E, D are the singular vectors and singular values of the estimated covariance matrix Σ. To regularize D, we add a small value to its diagonal. For very large channel counts, estimation of the full covariance matrix Σ is noisy, and we therefore compute the columns of the whitening matrix WZCA independently for each channel, based on its nearest 32 channels. 2.2 Modelling mean spike waveforms with SVD When single spike waveforms are recorded across a large number of channels, most channels will have no signal and only noise. To prevent these channels from biasing the spike sorting problem, previous approaches estimate a mask over those channels with sufficient SNR to be included in a given spike. To further reduce noise and lower the dimensionality of the data for computational reasons, the spikes are usually projected into a small number of temporal principal components per channel, typically three. Here we suggest a different method for simultaneous spatial denoising/masking and for lowering the dimensionality of spikes, which is based on the observation that mean spike waveforms are very well explained by an SVD decomposition of their spatiotemporal waveform, with as few as three components (Fig. 2ab). However the spatial and temporal components of the SVD vary substantially from neuron to neuron, hence the same set of temporal basis functions per channel cannot be used to model all neurons (Fig. 2ab), as typically done in standard approaches. We analyzed the ability of the classical and proposed methods for dimensionality reduction, and found that the proposed decomposition can reconstruct waveforms with ∼5 times less residual variance than the classical approach. This allows it to capture small but very distinguishable features of the spikes, which ultimately can help distinguish between neurons with very similar waveforms. 2.3 Integrated template matching framework To define a generative model of the electrical recorded voltage, we take advantage of the approximately linear additivity of electrical potentials from different sources in the extracellular medium. We combine the spike times of all neurons into a Nspikes-dimensional vector s, such that the waveforms start at time samples s+1. We define the cluster identity of spike k as σ(k), taking values into the set {1, 2, 3, ..., N}, where N is the total number of neurons. We define the unit-norm waveform of neuron n as the matrix Kn = UnWn, of size number of channels by number of sample timepoints ts (typically 61). The matrix Kn is defined by its low-dimensional deconstruction into three pairs of spatial and temporal basis functions, Un and Wn, such that the norm of UnWn is 1. The value of 3 raw waveform temporal PC (common) spatiotemporal PC (private) 101 102 103 temporal PC (common) 101 102 103 spatiotemporal PC (private) residual waveform variance a b Figure 2: Spike reconstruction from three private PCs. a, Four example average waveforms (black) with their respective reconstruction with three common temporal PCs/channel (blue) and with reconstruction based on three spatiotemporal PCs (red), private to each spike. The red traces mostly overlap the black traces. b, Summary of residual waveform variance for all neurons in one dataset. the electrical voltage at time t on channel i is defined by V (i, t) = V0(i, t) + N(0, ϵ) V0(i, t) = s(k)≥t−ts X k,s(k)<t xkKσ(k) (i, t −s(k)) xk ∼N µσ(k), λµ2 σ(k) , (1) where xk > 0 is the amplitude of spike k. Spike amplitudes in the data can vary significantly even for spikes from the same neuron, due to factors like burst adaptation and drift. We modelled the mean and variance of the amplitude variability, with the variance of the distribution scaling with the square of the mean. λ and ϵ are hyperparameters that control the relative scaling with respect to each other of the reconstruction error and the prior on the amplitude. In practice we set these constant for all recordings. This model formulation leads to the following cost function, which we minimize with respect to the spike times, cluster assignments, amplitudes and templates L(s, x, K, σ) = ∥V −V0∥2 + ϵ λ X k xk µσk −1 2 (2) 3 Learning and inference in the model To optimize the cost function, we alternate between finding the best spike times s, cluster assignments σ and amplitudes x (template matching) and optimizing the template K parametrization with respect to s, σ, x (template optimization). We initialize the templates using a simple scaled K-means clustering model, which we in turn initialize with prototypical spikes determined from the data. After the final spike times and amplitudes have been extracted, we run a final post-optimization merging algorithm which finds pairs of clusters whose spikes form a single continuous density. These steps are separately described in detail below. 3.1 Stacked initializations with scaled K-means and prototypical spikes The density of spikes can vary substantially across the probe, depending on the location of each recording site in the brain. Initialization of the optimization in a density-dependent way can thus assign more clusters to regions that require more, relieving the main optimization from the localminima prone problem of moving templates from one part of the probe to another. For the initialization, we thus start by detecting spikes using a threshold rule, and as we load more of the recording we keep a running subset of prototypical spikes that are sufficiently different from each other by an L2 norm criterion. We avoid overlapping spikes to be counted as prototypical spikes by enforcing 4 a minimum spatiotemporal peak isolation criterion on the detected spikes. Out of the prototypical spikes thus detected, we consider a fixed number N which had most matches to other spikes in the recording. We then used this initial set of spikes to initialize a scaled K-means algorithm. This algorithm uses the same cost function described in equation 2, with spike times s fixed to those found by a threshold criterion. Unlike standard K-means, each spike is allowed to have variable amplitude [11]. 3.2 Learning the templates via stochastic batch optimization The main optimization re-estimates the spike times s at each iteration. The “online” nature of the optimization helps to accelerate the algorithm and to avoid local minima. For template optimization we use a simple running average update rule Anew n (i, t0) ←(1 −p)jnAold n (i, t0) + (1 −(1 −p)jn) σ(k)=n X k∈batch V (i, s(k) + t0), (3) where An is the running average waveform for cluster n, jn represents the number of spikes from cluster n identified in the current batch, and the running average weighs past samples exponentially with a forgetting constant p. Thus An approximately represents the average of the past p samples assigned to cluster n. Note that different clusters will therefore update their mean waveforms at different rates, depending on their number of spikes per batch. Since firing rates vary over two orders of magnitude in typical recordings (from < 0.5 to 50 spikes/s), the adaptive running average procedure allows clusters with rare spikes to nonetheless average enough of their spikes to generate a smooth average template. Like most clustering algorithms, the model we developed here is prone to non-optimal local minima. We used several techniques to ameliorate this problem. First, we annealed several parameters during learning, to encourage exploration of the parameter space, which stems from the randomness induced by the stochastic batches. We annealed the forgetting constant p from a small value (typically 20) at the beginning of the optimization to a large value at the end (typically several hundred). We also anneal from small to large the ratio ϵ/λ, which controls the relative impact of the reconstruction term and amplitude bias term in equation 2. Therefore, at the beginning of the optimization, spikes assigned to the same cluster are allowed to have more variable amplitudes. Finally, we anneal the threshold for spike detection (see below), to allow a greater mismatch between spikes and the available templates at the beginning of the optimization. As optimization progresses, the templates become more precise, and spikes increase their projections onto their preferred template, thus allowing higher thresholds to separate them from the noise. 3.3 Inferring spike times and amplitudes via template matching The inference step of the proposed model attempts to find the best spike times, cluster assignments and amplitudes, given a set of templates {Kn}n with low rank-decompositions Kn = UnWn and mean amplitudes µn. The templates are obtained from the running average waveform An, after an SVD decomposition to give An ∼µnKn = µnUnWn, with ∥UnWn∥= 1, with Un orthonormal and Wn orthogonal. The primary roles of the low-rank representation are to guarantee fast inferences and to regularize the waveform model. We adopt a parallelized matching pursuit algorithm to iteratively estimate the best fitting templates and subtract them off from the raw data. In standard matching pursuit, the best fitting template is identified over the entire batch, its best reconstruction is subtracted from the raw data, and then the next best fitting template is identified, iteratively until the amount of explained variance falls below a threshold, which constitutes the stopping criterion. To find the best fitting template, we estimate for each time t and each template n, the decrease in the cost function obtained by introducing template n at location t, with the best-fitting amplitude x. This is equivalent to minimizing a standard quadratic function of the form ax2 −2bx + c over the scalar variable x, with a, −2b and c derived as the coefficients of x2, x and 1 from equation 2 a = 1 + ϵ λµ2n ; b = (Kn ⋆V )(t) + ϵ λµn ; c = λµ2 n, (4) 5 where ⋆represents the operation of temporal filtering (convolution with the time-reversed filter). Here the filtering is understood as channel-wise filtering followed by a summation of all filtered traces, which computes the dot product between the template and the voltage snippet starting at each timepoint t. The decrease in cost dC(n, t) that would occur if a spike of neuron n were added at time t, and the best x are given by xbest = b a dC(n, t) = b2 a −c (5) Computing b requires filtering the data V with all the templates Kn, which amounts to a very large number of operations, particularly when the data has many channels. However, our lowrank decomposition allows us to reduce the number of operations by a factor of Nchan/Nrank, where Nchan is the number of channels (typically > 100) and Nrank is the rank of the decomposed template (typically 3). This follows from the observation that V ⋆Kn = V ⋆(UnWn) = X j (Un(:, j)T · V ) ⋆Wn(j, :), (6) where Un(:, j) is understood as the j-th column of matrix Un and similarly Wn(j, :) is the j-th row of Wn. We have thus replaced the matrix convolution V ⋆Kn with a matrix product U T n V and Nrank one-dimensional convolutions. We implemented the matrix products and filtering operations efficiently using consumer GPU hardware. Iterative updates of dC after template subtraction can be obtained quickly using pre-computed cross-template products, as typically done in matching pursuit []. The iterative optimization stops when a pre-defined threshold criterion on dC is larger than all elements of dC. Due to its greedy nature, matching pursuit can have bad performance at reducing the cost function in certain problems. It is, however, appropriate to our problem, because spikes are very rare events, and overlaps are typically small, particularly in high-dimensions over the entire probe. Furthermore, typical datasets contain millions of spikes and only the simple form of matching pursuit can be efficiently employed. We implemented the simple matching pursuit formulation efficiently on consumer GPU hardware. Consider the cost improvement matrix dC(n, t). When the largest element of this matrix is found and the template subtracted, no values of dC need to change except those very close in time to the fitted template (ts samples away). Thus, instead of finding the global maximum of dC, we can find local maxima above the threshold criterion, and impose a minimal distance (ts) between such local maxima. The identified spikes can then be processed in parallel without affecting each other’s representations. We found it unnecessary to iterate the (relatively expensive) parallel matching pursuit algorithm during the optimization of the templates. We obtained similar templates when we aborted the parallel matching pursuit after the first parallel detection step, without detecting any further overlapping spikes. To improve the efficiency of the optimization we therefore only apply the full parallel template matching algorithm on the final pass, thus obtaining the overlapping spikes. 4 Benchmarks First, we timed the algorithm on several large scale datasets. The average run times for 32, 128 and 384 channel recordings were 10, 29 and 140 minutes respectively, on a single GPU-equipped workstation. These were significant improvements over an established framework called KlustaKwik [8], which needed approximately 480 and 10-20 thousand minutes when ran on 32 and 128 channel datasets on a standard CPU cluster (we did not attempt to run KlustaKwik on 384 channel recordings). The significant improvements in speed could have come at the expense of accuracy losses. We compared Kilosort and Klustakwik on 32 and 128 channel recordings, using a technique known as “hybrid ground truth” [8]. To create this data, we first selected all the clusters from a recording that had been previously analysed with KlustaKwik, and curated by a human expert. For each 6 200 400 600 800 sorted GT neurons 0 0.2 0.4 0.6 0.8 false positive rates false positive rates KlustaKwik Kilosort 200 400 600 800 sorted GT neurons 0 0.2 0.4 0.6 0.8 miss rates miss rates KlustaKwik Kilosort 200 400 600 sorted GT neurons 0 0.2 0.4 0.6 0.8 1 total score total score KlustaKwik Kilosort 200 400 600 800 sorted GT neurons 0 0.2 0.4 0.6 0.8 false positive rates false positive rates KlustaKwik Kilosort 200 400 600 800 sorted GT neurons 0 0.2 0.4 0.6 0.8 miss rates miss rates KlustaKwik Kilosort 200 400 600 sorted GT neurons 0 0.2 0.4 0.6 0.8 1 total score total score KlustaKwik Kilosort 200 400 600 800 sorted GT neurons 0 2 4 6 8 number of merges number of merges for best score KlustaKwik Kilosort After best merges a b c d e f g Figure 3: Hybrid ground truth performance of proposed (KiloSort) versus established (KlustaKwik) algorithm. a, Distribution of false positive rates. b, Distribution of misses. c, Total score. def, Same as (abc) after greedy best possible merges. g, Number of merges required to reach best score. cluster, we extracted its raw waveform and denoised it with an SVD decomposition (keeping the top 7 dimensions of variability). We then addded the de-noised waveforms at a different but nearby spatial location on the probe with a constant channel shift, randomly chosen for each neuron. To avoid increasing the spike density at any location on the probe, we also subtracted off the denoised waveform from its original location. Finally, we ran both KiloSort and KlustaKik on 16 instantiations of the hybrid ground truth. We matched ground truth cells with clusters identified by the algorithms to find the maximizer of the score = 1−false positive rate−miss rate, where the false positive rate was normalized by the number of spikes in the test cluster, and the miss rate was normalized by the number of spikes in the ground truth cluster. Values close to 1 indicate well-sorted units. Both KiloSort and KlustaKwik performed well, with KiloSort producing significantly more cells with well-isolated clusters (53% vs 35% units with scores above 0.9). We also estimated the best achievable score following manual sorting of the automated results. To minimize human operator work, algorithms are typically biased towards producing more clusters than can be expected in the recording, because manually merging an over-split cluster is easier, less time-consuming and, less error-prone than splitting an over-merged cluster (the latter requires choosing a carefully defined separation surface). Both KiloSort and KlustaKwik had such a bias, producing between two and four times more clusters than the expected number of neurons. To estimate the best achievable score after operator merges, we took advantage of the ground truth data, and automatically merged together candidate clusters so as to greedily maximize their score. Final best results as well as the required number of matches are shown in Figure 3defg (KiloSort vs KlustaKwik 69% vs 60% units with scores above 0.9). The relative performance improvement of KiloSort is clearly driven by fewer misses (Fig 3e), which are likely due to its ability to detect overlapping spikes. 5 Extension: post-hoc template merging We found that we can further reduce human operator work by performing most of the merges in an automated way. The most common oversplit clusters show remarkable continuity of their spike densities (Fig. 4). In other words, no discrimination boundary can be identified orthogonal to which the oversplit cluster appears bimodal. Instead, these clusters arise as a consequence of the algorithm partitioning clusters with large variance into multiple templates, so as to better explain their total variance. In KiloSort, we can exploit the fact that the decision boundaries between any two clusters 7 a b c d e f g h Figure 4: PC and feature-space projections of two pairs of clusters that should be merged. ae, Mean waveforms of merge candidates. bf, Spike projections into the top PCs of each candidate cluster. cg, Template feature projections for the templates corresponding to the candidate clusters. dh, Discriminant of the feature projections from (cg) (see main text for exact formula). are in fact planes (which we show below). If two clusters belong to the same neuron, their onedimensional projections in the space orthogonal to the decision boundary will show a continuous distribution (Fig. 4cd and 4gh), and the clusters can be merged. We use this idea to sequentially merge any two clusters with continuous distributions in their 2D feature spaces. Note that the best principal components for each cluster’s main channel are much less indicative of a potential merge (Fig 4b and 4f). To see why the decision boundaries in KiloSort are linear, consider two templates Ki and Kj and consider that we have arrived at the instance of template matching where a spike k needs to be assigned to one of these two templates. Their respective cost function improvements are dC(i, t) = a2 i bi , and dC(j, t) = a2 j bj , using the convention from equations 4. The decision of assigning spike k to one or the other of these templates is then equivalent to determining the sign of dC(i, t) −dC(j, t), which is a linear discriminant of the feature projections sign(dC(i, t) −dC(j, t)) = sign(ai/b 1 2 i −aj/b 1 2 j ) (7) where bi and bj do not depend on the data and ai,j are linear functions of the raw voltage, hence the decision boundary between any two templates is linear (Fig. 4). 6 Discussion We have demonstrated here a new framework for spike sorting of high-channel count electrophysiology data, which offers substantial accuracy and speed improvements over previous frameworks, while also reducing the amount of manual work required to isolate single units. KiloSort is currently enabling spike sorting of up to 1,000 neurons recorded simultaneously in awake animals and will help to enable the next generation of large-scale neuroscience. The code is available online at https://github.com/cortex-lab/KiloSort. 8 References [1] Rodrigo Quian Quiroga. Spike sorting. Current Biology, 22(2):R45–R46, 2012. [2] Gaute T Einevoll, Felix Franke, Espen Hagen, Christophe Pouzat, and Kenneth D Harris. Towards reliable spike-train recordings from thousands of neurons with multielectrodes. Current opinion in neurobiology, 22(1):11–17, 2012. [3] Daniel N Hill, Samar B Mehta, and David Kleinfeld. Quality metrics to accompany spike sorting of extracellular signals. The Journal of Neuroscience, 31(24):8699–8705, 2011. [4] Kenneth D Harris, Darrell A Henze, Jozsef Csicsvari, Hajime Hirase, and Gy¨orgy Buzs´aki. Accuracy of tetrode spike separation as determined by simultaneous intracellular and extracellular measurements. Journal of neurophysiology, 84(1):401–414, 2000. [5] Jonathan W Pillow, Jonathon Shlens, EJ Chichilnisky, and Eero P Simoncelli. A model-based spike sorting algorithm for removing correlation artifacts in multi-neuron recordings. PloS one, 8(5):e62123, 2013. [6] Chaitanya Ekanadham, Daniel Tranchina, and Eero P Simoncelli. A unified framework and method for automatic neural spike identification. Journal of neuroscience methods, 222:47–55, 2014. [7] Felix Franke, Robert Pr¨opper, Henrik Alle, Philipp Meier, J¨org RP Geiger, Klaus Obermayer, and Matthias HJ Munk. Spike sorting of synchronous spikes from local neuron ensembles. Journal of neurophysiology, 114(4):2535–2549, 2015. [8] C Rossant, SN Kadir, DFM Goodman, J Schulman, MLD Hunter, AB Saleem, A Grosmark, M Belluscio, GH Denfield, AS Ecker, AS Tolias, S Solomon, G Buzsaki, M Carandini, and KD Harris. Spike sorting for large, dense electrode arrays. Nature Neuroscience, 19:634–641, 2016. [9] Alex Rodriguez and Alessandro Laio. Clustering by fast search and find of density peaks. Science, 344(6191):1492–1496, 2014. [10] Joana P Neto, Gonc¸alo Lopes, Jo˜ao Fraz˜ao, Joana Nogueira, Pedro Lacerda, Pedro Bai˜ao, Arno Aarts, Alexandru Andrei, Silke Musa, Elvira Fortunato, et al. Validating silicon polytrodes with paired juxtacellular recordings: method and dataset. bioRxiv, page 037937, 2016. [11] Adam Coates, Andrew Y Ng, and Honglak Lee. An analysis of single-layer networks in unsupervised feature learning. In International conference on artificial intelligence and statistics, pages 215–223, 2011. 9 | 2016 | 45 |
6,383 | Stochastic Online AUC Maximization Yiming Ying†, Longyin Wen‡, Siwei Lyu‡ †Department of Mathematics and Statistics SUNY at Albany, Albany, NY, 12222, USA ‡Department of Computer Science SUNY at Albany, Albany, NY, 12222, USA Abstract Area under ROC (AUC) is a metric which is widely used for measuring the classification performance for imbalanced data. It is of theoretical and practical interest to develop online learning algorithms that maximizes AUC for large-scale data. A specific challenge in developing online AUC maximization algorithm is that the learning objective function is usually defined over a pair of training examples of opposite classes, and existing methods achieves on-line processing with higher space and time complexity. In this work, we propose a new stochastic online algorithm for AUC maximization. In particular, we show that AUC optimization can be equivalently formulated as a convex-concave saddle point problem. From this saddle representation, a stochastic online algorithm (SOLAM) is proposed which has time and space complexity of one datum. We establish theoretical convergence of SOLAM with high probability and demonstrate its effectiveness on standard benchmark datasets. 1 Introduction Area Under the ROC Curve (AUC) [8] is a widely used metric for measuring classification performance. Unlike misclassification error that reflects a classifier’s ability to classify a single randomly chosen example, AUC concerns the overall performance of a functional family of classifiers and quantifies their ability of correctly ranking any positive instance with regards to a randomly chosen negative instance. Most algorithms optimizing AUC for classification [5, 9, 12, 17] are for batch learning, where we assume all training data are available. On the other hand, online learning algorithms [1, 2, 3, 16, 19, 22], have been proven to be very efficient to deal with large-scale datasets. However, most studies of online learning focus on the misclassification error or its surrogate loss, in which the objective function depends on a sum of losses over individual examples. It is thus desirable to develop online learning algorithms to optimize the AUC metric. The main challenge for an online AUC algorithm is that the objective function of AUC maximization depends on a sum of pairwise losses between instances from different classes which is quadratic in the number of training examples. As such, directly deploying the existing online algorithms will require to store all training data received, making it not feasible for large-scale data analysis. Several recent works [6, 11, 18, 20, 21] have studied a type of online AUC maximization method that updates the classifier upon the arrival of each new training example. However, this type of algorithms need to access all previous examples at iteration t, and has O(td) space and per-iteration complexity where d is the dimension of the data. The scaling of per-iteration space and time complexity is an undesirable property for online applications that have to use fixed resources. This problem is partially alleviated by the use of buffers of a fixed size s in [11, 21], which reduces the per-iteration space and time complexity to O(sd). Although this change makes the per-iteration space and time complexity independent of the number of iterations, in practice, to reduce variance in learning performance, the 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. size of the buffer needs to be set sufficiently large. The work of [6] proposes an alternative method that requires to update and store the first-order (mean) and second-order (covariance) statistics of the training data, and the space and per-iteration complexity becomes O(d2). Although this eliminates the needs to access all previous training examples, the per-iteration is now quadratic in data dimension, which makes this method inefficient for high-dimensional data. To this end, the authors of [6] further proposed to approximate the covariance matrices with low-rank random Gaussian matrices. However, the approximation method is not a general solution to the original problem and its convergence was only established under the assumption that the effective numerical rank for the set of covariance matrices is small (i.e., they can be well approximated by low-rank matrices). In this work, we present a new stochastic online AUC maximization (SOLAM) method associated for the ℓ2 loss function. In contrast to existing online AUC maximization methods, e.g. [6, 21], SOLAM does not need to store previously received training examples or the covariance matrices, while, at the same time, enjoys a comparable convergence rate, up to a logarithmic term, as in [6, 21]. To our best knowledge, this is the first online learning algorithm for AUC optimization with linear space and per-iteration time complexities of O(d), which are the same as the online gradient descent algorithm [1, 2, 16, 22] for classification. The key step of SOLAM is to reformulate the original problem as a stochastic saddle point problem [14]. This connection is the foundation of the SOLAM algorithm and its convergence analysis. When evaluating on several standard benchmark datasets, SOLAM achieves performances that are on par with state-of-the-art online AUC optimization methods with significant improvement in running time. The main contribution of our work can be summarized as follows: • We provide a new formulation of the AUC optimization problem as stochastic Saddle Point Problem (SPP). This formulation facilitates the development of online algorithms for AUC optimization. • Our algorithm SOLAM achieves a per-iteration space and time complexity that is linear in data dimensionality. • Our theoretical analysis provides guarantee of convergence, with high probability, of the proposed algorithm. 2 Method Let the input space X ⊆Rd and the output space Y = {−1, +1}. We assume the training data, z = {(xi, yi), i = 1, . . . , n} as i.i.d. sample drawn from an unknown distribution ρ on Z = X × Y. The ROC curve is the plot of the true positive rate versus the false positive rate. The area under the ROC curve (AUC) for any scoring function f : X →R is equivalent to the probability of a positive sample ranks higher than a negative sample (e.g. [4, 8]). It is defined as AUC(f) = Pr(f(x) ≥f(x′)|y = +1, y′ = −1), (1) where (x, y) and (x′, y′) are independent drawn from ρ. The target of AUC maximization is to find the optimal decision function f: arg max f AUC(f) = arg min f Pr(f(x) < f(x′)|y = 1, y′ = −1) = arg min f E h I[f(x′)−f(x)>0] y = 1, y′ = −1 i , (2) where I(·) is the indicator function that takes value 1 if the argument is true and 0 otherwise. Let p = Pr(y = 1). For any random variable ξ(z), recall that its conditional expectation is defined by E[ξ(z)|y = 1] = 1 p RR ξ(z)Iy=1dρ(z). Since I(·) is not continuous, it is often replaced by its convex surrogates. Two common choices are the ℓ2 loss (1 −(f(x) −f(x′)))2 or the hinge loss 1 −(f(x) −f(x′)) +. In this work, we use the ℓ2, as it has been shown to be statistically consistent with AUC while the hinge loss is not [6, 7]. We also restrict our interests to the family of linear functions, i.e., f(x) = w⊤x. In summary, the AUC maximization can be formulated by argmin∥w∥≤R E h (1 −w⊤(x −x′))2|y = 1, y′ = −1 i = argmin∥w∥≤R 1 p(1−p) RR Z×Z(1 −w⊤(x −x′))2I[y=1]I[y′=−1]dρ(z)dρ(z′). (3) 2 When ρ is a uniform distribution over training data z, we obtain the empirical minimization (ERM) problem for AUC optimization studied in [6, 21]1 argmin ∥w∥≤R 1 n+n− n X i=1 n X j=1 (1 −w⊤(xi −xj))2I[yi=1∧yj=−1], (4) where n+ and n−denote the numbers of instances in the positive and negative classes, respectively. 2.1 Equivalent Representation as a (Stochastic) Saddle Point Problem (SPP) The main result of this work is the equivalence of problem (3) to a stochastic Saddle Point Problem (SPP) (e.g., [14]). A stochastic SPP is generally in the form of min u∈Ω1 max α∈Ω2 f(u, α) := E[F(u, α, ξ)] , (5) where Ω1 ⊆Rd and Ω2 ⊆Rm are nonempty closed convex sets, ξ is a random vector with non-empty measurable set Ξ ⊆Rp, and F : Ω1 × Ω2 × Ξ →R. Here E[F(u, α, ξ)] = R Ξ F(u, α, ξ)d Pr(ξ), and function f(u, α) is convex in u ∈Ω1 and concave in α ∈Ω2. In general, u and α are referred to as the primal variable and the dual variable, respectively. The following theorem shows that (3) is equivalent to a stochastic SPP (5). First, define F : Rd × R3 × Z →R, for any w ∈Rd, a, b, α ∈R and z = (x, y) ∈Z, by F(w, a, b, α; z) = (1 −p)(w⊤x −a)2I[y=1] + p(w⊤x −b)2I[y=−1] + 2(1 + α)(pw⊤xI[y=−1] −(1 −p)w⊤xI[y=1]) −p(1 −p)α2. (6) Theorem 1. The AUC optimization (3) is equivalent to min ∥w∥≤R (a,b)∈R2 max α∈R n f(w, a, b, α) := Z Z F(w, a, b, α; z)dρ(z) o . (7) Proof. It suffices to prove the claim that the objective function of (3) equals to 1 + min(a,b)∈R2 maxα∈R R Z F(w, a, b, α; z)dρ(z). To this end, note that z = (x, y) and z = (x′, y′) are samples independently drawn from ρ. Therefore, the objective function of (3) can be rewritten as E (1 −w⊤(x −x′))2|y = 1, y′ = −1 = 1 + E[(w⊤x)2|y = 1] + E[(w⊤x′)2|y′ = −1] −2E[w⊤x|y = 1] + 2E[w⊤x′|y′ = −1] −2 E[w⊤x|y = 1] E[w⊤x′|y′ = −1] = 1 + E[(w⊤x)2|y = 1] − E[w⊤x|y = 1] 2 + E[(w⊤x′)2|y′ = −1] − E[w⊤x′|y′ = −1] 2 −2E[w⊤x|y = 1] + 2E[w⊤x′|y′ = −1] + E[w⊤x|y = 1] −E[w⊤x′|y′ = −1] 2. (8) Note that E[(w⊤x)2|y = 1] − E[w⊤x|y = 1] 2 = 1 p R Z(w⊤x)2I[y=1]dρ(z) − 1 p R Z w⊤xI[y=1]dρ(z) 2 = mina∈R 1 p R Z(w⊤x−a)2I[y=1]dρ(z) = mina∈R E[(w⊤x−a)2|y = 1], where the minimization is achieved by a = E[w⊤x|y = 1]. (9) Likewise, min b E[(w⊤x′ −b)2|y′ = −1] = E[(w⊤x′)2|y′ = −1] − E[w⊤x′|y′ = −1] 2 where the minimization is obtained by letting b = E[w⊤x′|y′ = −1]. (10) Moreover, observe that E[w⊤x|y = 1] −E[w⊤x′|y′ = −1] 2 = maxα 2α(E[w⊤x′|y′ = −1] − E[w⊤x|y = 1]) −α2 , where the maximization is achieved with α = E[w⊤x′|y′ = −1] −E[w⊤x|y = 1]. (11) 1The work [6, 21] studied the regularized ERM problem, i.e. minw∈Rd 1 n+n− Pn i=1 Pn j=1(1 −w⊤(xi − xj))2I[yi=1]I[yj=−1] + λ 2 ∥w∥2, which is equivalent to (3) with Ωbeing a bounded ball in Rd. 3 Putting all these equalities into (8) implies that E h (1 −w⊤(x −x′))2|y = 1, y′ = −1 i = 1 + min (a,b)∈R2 max α∈R R Z F(w, a, b; z)dρ(z) p(1 −p) . This proves the claim and hence the theorem. In addition, we can prove the following result. Proposition 1. Function f(w, a, b, α) is convex in (w, a, b) ∈Rd+2 and concave in α ∈R. The proof of this proposition can be found in the Supplementary Materials. 2.2 Stochastic Online Algorithm for AUC Maximization The optimal solution to an SPP problem is called a saddle point. Stochastic first-order methods are widely used to get such an optimal saddle point. The main idea of such algorithms (e.g. [13, 14] is to use an unbiased stochastic estimator of the true gradient to perform, at each iteration, gradient descent in the primal variable and gradient ascent in the dual variable. Using the stochastic SPP formulation (7) for AUC optimization, we can develop stochastic online learning algorithms which only need to pass the data once. For notational simplicity, let vector v = (w⊤, a, b)⊤∈Rd+2, and for any w ∈Rd, a, b, α ∈R and z = (x, y) ∈Z, we denote f(w, a, b, α) as f(v, α), and F(w, a, b, α, z) as F(v, α, z). The gradient of the objective function in the stochastic SPP problem (7) is given by a (d + 3)-dimensional column vector g(v, α) = (∂vf(v, α), −∂αf(v, α)) and its unbiased stochastic estimator is given, for any z ∈Z, by G(v, α, z) = (∂uF(v, α, z), −∂αF(v, α, z)). One could directly deploy the stochastic first-order method in [14] to the stochastic SPP formulation (7) for AUC optimization. However, from the definition of F in (6), this would require the knowledge of the unknown probability p = Pr(y = 1) a priori. To overcome this problem, for any v⊤= (w⊤, a, b) ∈Rd+2, α ∈R and z ∈Z, let ˆFt(v, α, z) = (1 −ˆpt)(w⊤x −a)2I[y=1] + ˆpt(w⊤x −b)2I[y=−1] + 2(1 + α)(ˆptw⊤xI[y=−1] −(1 −ˆpt)w⊤xI[y=1]) −ˆpt(1 −ˆpt)α2. (12) where ˆpt = Pt i=1 I[yi=1] t at iteration t. We propose, at iteration t, to use the stochastic estimator ˆGt(v, α, z) = (∂v ˆFt(v, α, z), −∂α ˆFt(v, α, z)) (13) to replace the unbiased, but practically inaccessible, stochastic estimator G(v, α, z). Assume κ = supx∈X ∥x∥< ∞, and recall that ∥w∥≤R. For any optimal solution (w∗, a∗, b∗) of the stochastic SPP (7) for AUC optimization, by (9), (10) and (11) we know that |a∗| = 1 p| R Z⟨w∗, x⟩I[y=1]dρ(z)| ≤ Rκ, |b∗| = 1 1−p| R Z⟨w∗, x′⟩I[y′=−1]dρ(z′)| ≤Rκ, and |α∗| = 1 1−p R Z⟨w∗, x′⟩I[y′=−1]dρ(z′) − 1 p R Z⟨w∗, x⟩I[y=1]dρ(z) ≤2Rκ. Therefore, we can restrict (w, a, b) and α to the following bounded domains: Ω1 = (w, a, b) ∈Rd+2 : ∥w∥≤R, |a| ≤Rκ, |b| ≤Rκ , Ω2 = α ∈R : |α| ≤2Rκ . (14) In this case, the projection steps (e.g. steps 4 and 5) in Table 1 can be easily computed. The pseudocode of the online AUC optimization algorithm is described in Table 1, to which we refer as SOLAM. 3 Analysis We now present the convergence results of the proposed algorithm for AUC optimization. Let u = (v, α) = (w, a, b, α). The quality of an approximation solution (¯vt, ¯αt) to the SPP problem (5) at iteration t is measured by the duality gap: εf(¯vt, ¯αt) = max α∈Ω2 f(¯vt, α) −min v∈Ω1 f(v, ¯αt). (15) 4 Stochastic Online AUC Maximization (SOLAM) 1. Choose step sizes {γt > 0 : t ∈N} 2. Initialize t = 1, v1 ∈Ω1, α1 ∈Ω2 and let ˆp0 = 0, ¯v0 = 0, ¯α0 = 0 and ¯γ0 = 0. 3. Receive a sample zt = (xt, yt) and compute ˆpt = (t−1)ˆpt−1+I[yt=1] t 4. Update vt+1 = PΩ1(vt −γt∂v ˆFt(vt, αt, zt)) 5. Update αt+1 = PΩ2(αt + γt∂α ˆFt(vt, αt, zt)) 6. Update ¯γt = ¯γt−1 + γt 7. Update ¯vt = 1 ¯γt (¯γt−1¯vt−1 + γtvt), and ¯αt = 1 ¯γt (¯γt−1¯αt−1 + γtαt) 8. Set t ←t + 1 Table 1: Pseudo code of the proposed algorithm. In steps 4 and 5, PΩ1(·) and PΩ2(·) denote the projection to the convex sets Ω1 and Ω2, respectively. Theorem 2. Assume that samples {(x1, y1), (x2, y2), . . . , (xT , yT )} are i.i.d. drawn from a distribution ρ over X × Y, let Ω1 and Ω2 be given by (14) and the step sizes given by {γt > 0 : t ∈N}. For sequence {(¯vt, ¯αt) : t ∈[1, T]} generated by SOLAM (Table (1)), and any 0 < δ < 1, with probability 1 −δ, the following holds εf(¯vT , ¯αT ) ≤Cκ max(R2, 1) r ln 4T δ T X j=1 γj −1h 1 + T X j=1 γ2 j + T X j=1 γ2 j 1 2 + T X j=1 γj √j i , where Cκ is an absolute constant independent of R and T (see its explicit expression in the proof). Denote f ∗as the optimum of (7) which, by Theorem 1, is identical to the optimal value of AUC optimization (3). From Theorem 2, the following convergence rate is straightforward. Corollary 1. Under the same assumptions as in Theorem 2, and γj = ζj−1 2 : j ∈N with constant ζ > 0, with probability 1 −δ, it holds |f(¯vT , ¯αT ) −f ∗| ≤εf(¯uT ) = O ln T r ln 4T δ √ T . While the above convergence rate is obtained by choosing decaying step sizes, one can establish a similar result when a constant step size is appropriately chosen. The proof of Theorem 2 requires several lemmas. The first is a standard result from convex online learning [16, 22]. We include its proof in the Supplementary Materials for completeness. Lemma 1. For any T ∈N, let {ξj : j ∈[1, T]} be a sequence of vectors in Rm, and ˜u1 ∈Ωwhere Ωis a convex set. For any t ∈[1, T] define ˜ut+1 = PΩ(˜ut −ξt). Then, for any u ∈Ω, there holds PT t=1(˜ut −u)⊤ξt ≤∥˜u1−u∥2 2 + 1 2 PT t=1 ∥ξt∥2. The second lemma is the Pinelis-Bernstein inequality for martingale difference sequence in a Hilbert space, which is from [15, Theorem 3.4] Lemma 2. Let {Sk : k ∈N} be a martingale difference sequence in a Hilbert space. Suppose that almost surely ∥Sk∥≤B and PT k=1 E[∥Sk∥2|S1, . . . , Sk−1] ≤σ2 T . Then, for any 0 < δ < 1, there holds, with probability at least 1 −δ, sup1≤j≤T
Pj k=1 Sk
≤2 B 3 + σT log 2 δ . The third lemma indicates that the approximate stochastic estimator ˆGj(u, z) defined by (13), is not far away from the unbiased one G(u, z). Its proof is given in the Supplementary materials. Lemma 3. Let Ω1 and Ω2 be given by (14) and denote by Ω= Ω1 × Ω2. For any t ∈N, with probability 1 −δ, there holds sup u∈Ω,z∈Z ∥ˆGt(u, z) −G(u, z)∥≤2κ(4κR + 11R + 1) ln (2 δ )/t 1 2 . Proof of Theorem 2. By the convexity of f(·, α) and concavity of of f(v, ·), for any u = (v, α) ∈ Ω1 × Ω2, we get f(vt, α) −f(v, αt) = (f(vt, αt) −f(v, αt)) + (f(vt, α) −f(vt, αt)) ≤(vt − v)⊤∂vf(vt, αt) −(αt −α)∂αf(vt, αt) = (ut −u)⊤g(ut). Hence, there holds max α∈Ω2 f(¯vT , α) −min v∈Ω1 f(v, ¯αT ) ≤( T X t=1 γt)−1 max α∈Ω2 T X t=1 γtf(vt, α) −min v∈Ω1 T X t=1 γtf(v, αt) ! 5 ≤( T X t=1 γt)−1 max u∈Ω1×Ω2 T X t=1 γt(ut −u)⊤g(ut) (16) Recall that Ω= Ω1 × Ω2. The steps 4 and 5 in Algorithm SOLAMcan be rewritten as ut+1 = (vt+1, αt+1) = PΩ(ut −γt ˆGt(ut, zt)). By applying Lemma 1 with ξt = γt ˆGt(ut, zt), we have, for any u ∈Ω, that PT t=1 γt(ut −u)⊤ˆGt(ut, zt) ≤∥u1−u∥2 2 + 1 2 PT t=1 γ2 t ∥ˆGt(ut, zt)∥2, which yields that sup u∈Ω T X t=1 γt(ut −u)⊤g(ut) ≤sup u∈Ω ∥u1 −u∥2 2 + 1 2 T X t=1 γ2 t ∥ˆGt(ut, zt)∥2 + sup u∈Ω T X t=1 γt(ut −u)⊤(g(ut) −ˆGt(ut, zt)) ≤sup u∈Ω ∥u1 −u∥2 2 + 1 2 T X t=1 γ2 t ∥ˆGt(ut, zt)∥2 + sup u∈Ω T X t=1 γt(ut −u)⊤(g(ut) −G(ut, zt)) + sup u∈Ω T X t=1 γt(ut −u)⊤(G(ut, zt) −ˆGt(ut, zt)) (17) Now we estimate the terms on the right hand side of (17) as follows. For the first term, we have 1 2 sup u∈Ω ∥u1 −u∥2 ≤2 sup v∈Ω1,α∈Ω2 (∥v∥2 + |α|2) ≤2 sup u∈Ω ∥u∥2 ≤2R2(1 + 6κ2). (18) For the second term on the right hand side of (17), observe that supx∈X ∥x∥≤κ and ut = (wt, at, bt, αt) ∈Ω= (w, a, b, α) : ∥w∥≤R, |a| ≤κR, |b| ≤κR, |α| ≤2κR . Combining this with the definition of ˆGt(ut, zt) given by (13), one can easily get ∥ˆGt(ut, zt)∥≤∥∂w ˆFt(ut, zt)∥+ |∂a ˆFt(ut, zt)| + |∂b ˆFt(ut, zt)| + |∂α ˆFt(ut, zt)| ≤2κ(2R + 1 + 2Rκ). Hence, there holds 1 2 T X t=1 γ2 t ∥ˆGt(ut, zt)∥2 ≤2κ2(2R + 1 + 2Rκ)2 T X t=1 γ2 t . (19) The third term on the right hand side of (17) can be bounded by supu∈Ω PT t=1 γt(ut −u)⊤(g(ut) − G(ut, zt)) ≤supu∈Ω[PT t=1 γt(˜ut −u)⊤(g(ut) −G(ut, zt))] + PT t=1 γt(ut −˜ut)⊤(g(ut) − G(ut, zt)), where ˜u1 = 0 ∈Ωand ˜ut+1 = PΩ(˜ut −γt(g(ut) −G(ut, zt))) for any t ∈[1, T]. Applying Lemma 1 with ξt = γt(g(ut) −G(ut, zt)) yields that sup u∈Ω T X t=1 γt(˜ut −u)⊤(g(ut) −G(ut, zt)) ≤sup u∈Ω ∥u∥2 2 + 1 2 T X t=1 γ2 t ∥g(ut) −G(ut, zt)∥2 ≤1 2R2(1 + 6κ2) + 4κ2(2R + 1 + 2Rκ)2 T X t=1 γ2 t , (20) where we used ∥G(ut, zt)∥and ∥g(ut)∥is uniformly bounded by 2κ(2R + 1 + 2Rκ). Notice that ut and ˜ut are only dependent on {z1, z2, . . . , zt−1}, {St = γt(ut −˜ut)⊤(g(ut) −G(ut, zt)) : t = 1, . . . , t} is a martingale difference sequence. Observe that E[∥St∥2|z1, . . . , zt−1] = γ2 t RR Z((ut−˜ut)⊤(g(ut)−G(ut, z)))2dρ(z) ≤γ2 t supu∈Ω,z∈Z[∥ut−˜ut∥2∥g(ut)−G(ut, zt)∥2] ≤ γ2 t [2κR √ 1 + 6κ2(2R + 1 + 2Rκ)]2. Applying Lemma 2 with σ2 T = [2κR √ 1 + 6κ2(2R + 1 + 2Rκ)]2 PT t=1 γ2 t , B = supT t=1 γt|(ut −˜ut)⊤(g(ut) −G(ut, zt))| ≤σT implies that, with probability 1 −δ 2, there holds T X t=1 γt(ut −˜ut)⊤(g(ut) −G(ut, zt)) ≤16κR √ 1 + 6κ2(2R + 1 + 2Rκ) 3 v u u t T X t=1 γ2 t . (21) Combining (20) with (21) implies, with probability 1 −δ 2, sup u∈Ω T X t=1 γt(ut −u)⊤(g(ut) −G(ut, zt)) ≤R2(1 + 6κ2) 2 + 4κ2(2R + 1 + 2Rκ)2 T X t=1 γ2 t 6 datasets ♯inst ♯feat datasets ♯inst ♯feat datasets ♯inst ♯feat datasets ♯inst ♯feat diabetes 768 8 fourclass 862 2 german 1,000 24 splice 3,175 60 usps 9,298 256 a9a 32,561 123 mnist 60,000 780 acoustic 78,823 50 ijcnn1 141,691 22 covtype 581,012 54 sector 9,619 55,197 news20 15,935 62,061 Table 2: Basic information about the benchmark datasets used in the experiments. + 16κR √ 1 + 6κ2(2R + 1 + 2Rκ) 3 T X t=1 γ2 t 1/2. (22) By Lemma 3, for any t ∈[1, T] there holds, with probability 1−δ 2T , sup u∈Ω,z∈Z ∥ˆGt(u, z)−G(u, z)∥≤ 2κ(2R(κ + 1) + 1) r ln (4T δ )/t. Hence, the fourth term on the righthand side of (17) can estimated as follows: with probability 1 −δ 2, there holds sup u∈Ω T X t=1 γt(ut −u)⊤(G(ut, zt) −ˆGt(ut, zt)) ≤2 sup uΩ ∥u∥ T X t=1 γt sup u∈Ω,z∈Z ∥ˆGt(u, z) −G(u, z)∥ ≤8Rκ(4Rκ + 11R + 1) p 6κ2 + 1 T X t=1 γt √ t. (23) Putting the estimations (18), (19), (22), (23) and (17) back into (16) implies that εf(¯uT ) ≤Cκ max(R2, 1) r ln 4T δ T X t=1 γt −1h 1 + T X t=1 γ2 t + T X t=1 γ2 t 1 2 + T X t=1 γt √ t i , where Cκ = 5 2(1 + 6κ2) + 6κ2(κ + 3)2 + 112 3 κ √ 6κ2 + 1(2κ + 3). □ 4 Experiments In this section, we report experimental evaluations of the SOLAM algorithm and comparing its performance with existing state-of-the-art learning algorithms for AUC optimization. SOLAM was implemented in MATLAB, and MATLAB code of the compared methods were obtained from the authors of corresponding papers. In the training phase, we use five-fold cross validation to determine the initial learning rate ζ ∈[1 : 9 : 100] and the bound on w, R ∈10[−1:1:5] by a grid search. Following the evaluation protocol of [6], the performance of SOLAM was evaluated by averaging results from five runs of five-fold cross validations. Our experiments were performed based on 12 datasets that had been used in previous studies. For multi-class datasets, e.g., news20 and sector, we transform them into binary classification problems by randomly partitioning the data into two groups, where each group includes the same number of classes. Information about these datasets is summarized in Table 2. On these datasets, we evaluate and compare SOLAM with four online and two offline learning algorithms for AUC maximization, i.e. one-pass AUC maximization (OPAUC) [6], which uses the ℓ2 loss surrogate of the AUC objective function; online AUC maximization [21] that uses the hinge loss surrogate of the AUC objective function with two variants, one with sequential update (OAMseq) and the other using gradient update (OAMgra); online Uni-Exp [12] which uses the weighted univariate exponential loss; B-SVM-OR [10], which is a batch learning algorithm using the hinge loss surrogate of the AUC objective function; and B-LS-SVM, which is a batch learning algorithm using the ℓ2 loss surrogate of the AUC objective function. Classification performances on the testing dataset of all methods are given in Table 3. These results show that SOLAM achieves similar performances as other state-of-the-art online and offline methods based on AUC maximization. The performance of SOLAM is better than the offline methods on acoustic and covtype which could be due to the normalization of features used in our experiments for SOLAM. On the other hand, the main advantage of SOLAM is the running efficiency, as we pointed out in the Introduction, its per-iteration running time and space complexity is linear in data dimension and do not depend on the iteration number. In Figure 1, we show AUC vs. run time (seconds) for 7 Datasets SOLAM OPAUC OAMseq OAMgra online Uni-Exp B-SVM-OR B-LS-SVM diabetes .8253±.0314 .8309±.0350 .8264±.0367 .8262±.0338 .8215±.0309 .8326±.0328 .8325±.0329 fourclass .8226±.0240 .8310±.0251 .8306±.0247 .8295±.0251 .8281±.0305 .8305±.0311 .8309±.0309 german .7882±.0243 .7978±.0347 .7747±.0411 .7723±.0358 .7908±.0367 .7935±.0348 .7994±.0343 splice .9253±.0097 .9232±.0099 .8594±.0194 .8864±.0166 .8931±.0213 .9239±.0089 .9245±.0092 usps .9766±.0032 .9620±.0040 .9310±.0159 .9348±.0122 .9538±.0045 .9630±.0047 .9634±.0045 a9a .9001±.0042 .9002±.0047 .8420±.0174 .8571±.0173 .9005±.0024 .9009±.0036 .8982±.0028 mnist .9324±.0020 .9242±.0021 .8615±.0087 .8643±.0112 .7932±.0245 .9340±.0020 .9336±.0025 acoustic .8898±.0026 .8192±.0032 .7113±.0590 .7711±.0217 .8171±.0034 .8262±.0032 .8210±.0033 ijcnn1 .9215±.0045 .9269±.0021 .9209±.0079 .9100±.0092 .9264±.0035 .9337±.0024 .9320±.0037 covtype .9744±.0004 .8244±.0014 .7361±.0317 .7403±.0289 .8236±.0017 .8248±.0013 .8222±.0014 sector .9834±.0023 .9292±.0081 .9163±.0087 .9043±.0100 .9215±.0034 news20 .9467±.0039 .8871±.0083 .8543±.0099 .8346±.0094 .8880±.0047 Table 3: Comparison of the testing AUC values (mean±std.) on the evaluated datasets. To accelerate the experiments, the performances of OPAUC, OAMseq, OAMgra, online Uni-Exp, B-SVM-OR and B-LS-SVM were taken from [6] (a) a9a (b) ups (c) sector Figure 1: AUC vs. time curves of SOLAM algorithm and three state-of-the-art AUC learning algorithms, i.e., OPAUC [6], OAMseq [21], and OAMgra [21]. The values in parentheses indicate the average running time (seconds) per pass for each algorithm. SOLAM and three other state-of-the-art online learning algorithms,i.e., OPAUC [6], OAMseq [21], and OAMgra [21] over three datasets (a9a, ups, and sector), along with the per-iteration running time in the legend2. These results show that SOLAM in general reaches convergence faster in comparison of, while achieving competitive performance. 5 Conclusion In this paper we showed that AUC maximization is equivalent to a stochastic saddle point problem, from which we proposed a novel online learning algorithm for AUC optimization. In contrast to the existing algorithms [6, 21], the main advantage of our algorithm is that it does not need to store all previous examples nor its second-order covariance matrix. Hence, it is a truly online learning algorithm with one-datum space and per-iteration complexities, which are the same as online gradient descent algorithms [22] for classification. There are several research directions for future work. Firstly, the convergence rate O(1/ √ T) for SOLAM only matches that of the black-box sub-gradient method. It would be interesting to derive fast convergence rate O(1/T) by exploring the special structure of the objective function F defined by (6). Secondly, the convergence was established using the duality gap associated with the stochastic SPP formulation 7. It would be interesting to establish the strong convergence of the output ¯wT of algorithm SOLAM to its optimal solution of the actual AUC optimization problem (3). Thirdly, the SPP formulation (1) holds for the least square loss. We do not know if the same formulation holds true for other loss functions such as the logistic regression or the hinge loss. 2Experiments were performed with running time reported based on a workstation with 12 nodes, each with an Intel Xeon E5-2620 2.0GHz CPU and 64GB RAM. 8 References [1] F. R. Bach and E. Moulines. Non-asymptotic analysis of stochastic approximation algorithms for machine learning. In NIPS, 2011. [2] L. Bottou and Y. LeCun. Large scale online learning. In NIPS, 2003. [3] N. Cesa-Bianchi, A. Conconi, and C. Gentile. On the generalization ability of on-line learning algorithms. IEEE Trans. Information Theory, 50(9):2050–2057, 2004. [4] S. Clemencon, G. Lugosi, and N. Vayatis. Ranking and empirical minimization of u-statistics. The Annals of Statistics, 36(2):844–874, 2008. [5] C. Cortes and M. Mohri. AUC optimization vs. error rate minimization. In NIPS, 2003. [6] W. Gao, R. Jin, S. Zhu, and Z. H. Zhou. One-pass AUC optimization. In ICML, 2013. [7] W. Gao and Z.H. Zhou. On the consistency of AUC pairwise optimization. In International Joint Conference on Artificial Intelligence, 2015. [8] J. A. Hanley and B. J. McNeil. The meaning and use of the area under of receiver operating characteristic (roc) curve. Radiology, 143(1):29–36, 1982. [9] T. Joachims. A support vector method for multivariate performance measures. In ICML, 2005. [10] Thorsten Joachims. Training linear svms in linear time. In Proceedings of the Twelfth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 217–226, 2006. [11] P. Kar, B. K. Sriperumbudur, P. Jain, and H. Karnick. On the generalization ability of online learning algorithms for pairwise loss functions. In ICML, 2013. [12] W. Kotlowski, K. Dembczynski, and E. Hüllermeier. Bipartite ranking through minimization of univariate loss. In ICML, 2011. [13] G. Lan. An optimal method for stochastic composite optimization. Math Programming, 133(1-2):365–397, 2012. [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] I. Pinelis. Optimum bounds for the distributions of martingales in banach spaces. The Annals of Probability, 22(4):1679–1706, 1994. [16] A. Rakhlin, O. Shamir, and K. Sridharan. Making gradient descent optimal for strongly convex stochastic optimization. In ICML, 2012. [17] A. Rakotomamonjy. Optimizing area under roc curve with svms. In 1st International Workshop on ROC Analysis in Artificial Intelligence, 2004. [18] Y. Wang, R. Khardon, D. Pechyony, and R. Jones. Generalization bounds for online learning algorithms with pairwise loss functions. In COLT, 2012. [19] Y. Ying and M. Pontil. Online gradient descent learning algorithms. Foundations of Computational Mathematics, 8(5):561–596, 2008. [20] Y. Ying and D. X. Zhou. Online pairwise learning algorithms. Neural Computation, 28:743–777, 2016. [21] P. Zhao, S. C. H. Hoi, R. Jin, and T. Yang. Online AUC maximization. In ICML, 2011. [22] M. Zinkevich. Online convex programming and generalized infinitesimal gradient ascent. In ICML, 2003. 9 | 2016 | 450 |
6,384 | Optimizing Affinity-Based Binary Hashing Using Auxiliary Coordinates Ramin Raziperchikolaei EECS, University of California, Merced rraziperchikolaei@ucmerced.edu Miguel ´A. Carreira-Perpi˜n´an EECS, University of California, Merced mcarreira-perpinan@ucmerced.edu Abstract In supervised binary hashing, one wants to learn a function that maps a highdimensional feature vector to a vector of binary codes, for application to fast image retrieval. This typically results in a difficult optimization problem, nonconvex and nonsmooth, because of the discrete variables involved. Much work has simply relaxed the problem during training, solving a continuous optimization, and truncating the codes a posteriori. This gives reasonable results but is quite suboptimal. Recent work has tried to optimize the objective directly over the binary codes and achieved better results, but the hash function was still learned a posteriori, which remains suboptimal. We propose a general framework for learning hash functions using affinity-based loss functions that uses auxiliary coordinates. This closes the loop and optimizes jointly over the hash functions and the binary codes so that they gradually match each other. The resulting algorithm can be seen as an iterated version of the procedure of optimizing first over the codes and then learning the hash function. Compared to this, our optimization is guaranteed to obtain better hash functions while being not much slower, as demonstrated experimentally in various supervised datasets. In addition, our framework facilitates the design of optimization algorithms for arbitrary types of loss and hash functions. Information retrieval arises in several applications, most obviously web search. For example, in image retrieval, a user is interested in finding similar images to a query image. Computationally, this essentially involves defining a high-dimensional feature space where each relevant image is represented by a vector, and then finding the closest points (nearest neighbors) to the vector for the query image, according to a suitable distance. For example, one can use features such as SIFT or GIST [23] and the Euclidean distance for this purpose. Finding nearest neighbors in a dataset of N images (where N can be millions), each a vector of dimension D (typically in the hundreds) is slow, since exact algorithms run essentially in time O(ND) and space O(ND) (to store the image dataset). In practice, this is approximated, and a successful way to do this is binary hashing [12]. Here, given a high-dimensional vector x ∈RD, the hash function h maps it to a b-bit vector z = h(x) ∈{−1, +1}b, and the nearest neighbor search is then done in the binary space. This now costs O(Nb) time and space, which is orders of magnitude faster because typically b < D and, crucially, (1) operations with binary vectors (such as computing Hamming distances) are very fast because of hardware support, and (2) the entire dataset can fit in (fast) memory rather than slow memory or disk. The disadvantage is that the results are inexact, since the neighbors in the binary space will not be identical to the neighbors in the original space. However, the approximation error can be controlled by using sufficiently many bits and by learning a good hash function. This has been the topic of much work in recent years. The general approach consists of defining a supervised objective that has a small value for good hash functions and minimizing it. Ideally, such an objective function should be minimal when the neighbors of any given image are the same in both original and binary spaces. Practically, in information retrieval, this is often evaluated using precision and recall. However, this 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. ideal objective cannot be easily optimized over hash functions, and one uses approximate objectives instead. Many such objectives have been proposed in the literature. We focus here on affinity-based loss functions, which directly try to preserve the original similarities in the binary space. Specifically, we consider objective functions of the form min L(h) = PN n,m=1 L(h(xn), h(xm); ynm) (1) where X = (x1, . . . , xN) is the high-dimensional dataset of feature vectors, minh means minimizing over the parameters of the hash function h (e.g. over the weights of a linear SVM), and L(·) is a loss function that compares the codes for two images (often through their Hamming distance ∥h(xn) −h(xm)∥) with the ground-truth value ynm that measures the affinity in the original space between the two images xn and xm (distance, similarity or other measure of neighborhood; [12]). The sum is often restricted to a subset of image pairs (n, m) (for example, within the k nearest neighbors of each other in the original space), to keep the runtime low. Examples of these objective functions (described below) include models developed for dimension reduction, be they spectral such as Laplacian Eigenmaps [2] and Locally Linear Embedding [24], or nonlinear such as the Elastic Embedding [4] or t-SNE [26]; as well as objective functions designed specifically for binary hashing, such as Supervised Hashing with Kernels (KSH) [19], Binary Reconstructive Embeddings (BRE) [14] or sequential Projection Learning Hashing (SPLH) [29]. If the hash function h was a continuous function of its input x and its parameters, one could simply apply the chain rule to compute derivatives over the parameters of h of the objective function (1) and then apply a nonlinear optimization method such as gradient descent. This would be guaranteed to converge to an optimum under mild conditions (for example, Wolfe conditions on the line search), which would be global if the objective is convex and local otherwise [21]. Hence, optimally learning the function h would be in principle doable (up to local optima), although it would still be slow because the objective can be quite nonlinear and involve many terms. In binary hashing, the optimization is much more difficult, because in addition to the previous issues, the hash function must output binary values, hence the problem is not just generally nonconvex, but also nonsmooth. In view of this, much work has sidestepped the issue and settled on a simple but suboptimal solution. First, one defines the objective function (1) directly on the b-dimensional codes of each image (rather than on the hash function parameters) and optimizes it assuming continuous codes (in Rb). Then, one binarizes the codes for each image. Finally, one learns a hash function given the codes. Optimizing the affinity-based loss function (1) can be done using spectral methods or nonlinear optimization as described above. Binarizing the codes has been done in different ways, from simply rounding them to {−1, +1} using zero as threshold [18, 19, 30, 33], to optimally finding a threshold [18], to rotating the continuous codes so that thresholding introduces less error [11, 32]. Finally, learning the hash function for each of the b output bits can be considered as a binary classification problem, where the resulting classifiers collectively give the desired hash function, and can be solved using various machine learning techniques. Several works (e.g. [16, 17, 33]) have used this approach, which does produce reasonable hash functions (in terms of retrieval measures such as precision/recall). In order to do better, one needs to take into account during the optimization (rather than after the optimization) the fact that the codes are constrained to be binary. This implies attempting directly the discrete optimization of the affinity-based loss function over binary codes. This is a daunting task, since this is usually an NP-complete problem with Nb binary variables altogether, and practical applications could make this number as large as millions or beyond. Recent works have applied alternating optimization (with various refinements) to this, where one optimizes over a usually small subset of binary variables given fixed values for the remaining ones [16, 17], and this did result in very competitive precision/recall compared with the state-of-the-art. This is still slow and future work will likely improve it, but as of now it provides an option to learn better binary codes. Of the three-step suboptimal approach mentioned (learn continuous codes, binarize them, learn hash function), these works manage to join the first two steps and hence learn binary codes [16, 17]. Then, one learns the hash function given these binary codes. Can we do better? Indeed, in this paper we show that all elements of the problem (binary codes and hash function) can be incorporated in a single algorithm that optimizes jointly over them. Hence, by initializing it from binary codes from the previous approach, this algorithm is guaranteed to achieve a lower error and learn better hash functions. Our framework can be seen as an iterated version of the two-step approach: learn binary codes given the current hash function, learn hash functions given codes, iterate (note the emphasis). 2 The key to achieve this in a principled way is to use a recently proposed method of auxiliary coordinates (MAC) for optimizing “nested” systems, i.e., consisting of the composition of two or more functions or processing stages. MAC introduces new variables and constraints that cause decoupling between the stages, resulting in the mentioned alternation between learning the hash function and learning the binary codes. Section 1 reviews affinity-based loss functions, section 2 describes our MAC-based proposed framework, section 3 evaluates it in several supervised datasets, using linear and nonlinear hash functions, and section 4 discusses implications of this work. Related work Although one can construct hash functions without training data [1, 15], we focus on methods that learn the hash function given a training set, since they perform better, and our emphasis is in optimization. The learning can be unsupervised [5, 11], which attempts to preserve distances in the original space, or supervised, which in addition attempts to preserve label similarity. Many objective functions have been proposed to achieve this and we focus on affinity-based ones. These create an affinity matrix for a subset of training points based on their distances (unsupervised) or labels (supervised) and combine it with a loss function [14, 16, 17, 19, 22]. Some methods optimize this directly over the hash function. For example, Binary Reconstructive Embeddings [14] use alternating optimization over the weights of the hash functions. Supervised Hashing with Kernels [19] learns hash functions sequentially by considering the difference between the inner product of the codes and the corresponding element of the affinity matrix. Although many approaches exist, a common theme is to apply a greedy approach where one first finds codes using an affinity-based loss function, and then fits the hash functions to them (usually by training a classifier). The codes can be found by relaxing the problem and binarizing its solution [18, 30, 33], or by approximately solving for the binary codes using some form of alternating optimization (possibly combined with GraphCut), as in two-step hashing [10, 16, 17], or by using relaxation in other ways [19, 22]. 1 Nonlinear embedding and affinity-based loss functions for binary hashing The dimensionality reduction literature has developed a number of objectives of the form (1) (often called “embeddings”) where the low-dimensional projection zn ∈Rb of each high-dimensional data point xn ∈RD is a free, real-valued parameter. The neighborhood information is encoded in the ynm values (using labels in supervised problems, or distance-based affinities in unsupervised problems). An example is the elastic embedding [4], where L(zn, zm; ynm) has the form: y+ nm ∥zn −zm∥2 + λy− nm exp (−∥zn −zm∥2), λ > 0 (2) where the first term tries to project true neighbors (having y+ nm > 0) close together, while the second repels all non-neighbors’ projections (having y− nm > 0) from each other. Laplacian Eigenmaps [2] and Locally Linear Embedding [24] result from replacing the second term above with a constraint that fixes the scale of Z, which results in an eigenproblem rather than a nonlinear optimization, but also produces more distorted embeddings. Other objectives exist, such as t-SNE [26], that do not separate into functions of pairs of points. Optimizing nonlinear embeddings is quite challenging, but much progress has been done recently [4, 6, 25, 27, 28, 31]. Although these models were developed to produce continuous projections, they have been successfully used for binary hashing too by truncating their codes [30, 33] or using the two-step approach of [16, 17]. Other loss functions have been developed specifically for hashing, where now zn is a b-bit vector (where binary values are in {−1, +1}). For example (see a longer list in [16]), for Supervised Hashing with Kernels (KSH) L(zn, zm; ynm) has the form (zT nzm −bynm)2 (3) where ynm is 1 if xn, xm are similar and −1 if they are dissimilar. Binary Reconstructive Embeddings [14] uses ( 1 b ∥zn −zm∥2 −ynm)2 where ynm = 1 2 ∥xn −xm∥2. The exponential variant of SPLH [29] proposed by Lin et al. [16] (which we call eSPLH) uses exp(−1 bynmzT nzn). Our approach can be applied to any of these loss functions, though we will mostly focus on the KSH loss for simplicity. When the variables Z are binary, we will call these optimization problems binary embeddings, in analogy to the more traditional continuous embeddings for dimension reduction. 2 Learning codes and hash functions using auxiliary coordinates The optimization of the loss L(h) in eq. (1) is difficult because of the thresholded hash function, which appears as the argument of the loss function L. We use the recently proposed method of 3 auxiliary coordinates (MAC) [7, 8], which is a meta-algorithm to construct optimization algorithms for nested functions. This proceeds in 3 stages. First, we introduce new variables (the “auxiliary coordinates”) as equality constraints into the problem, with the goal of unnesting the function. We can achieve this by introducing one binary vector zn ∈{−1, +1}b for each point. This transforms the original, unconstrained problem into the following equivalent, constrained problem: minh,Z PN n=1 L(zn, zm; ynm) s.t. z1 = h(x1), · · · , zN = h(xN). (4) We recognize as the objective function the “embedding” form of the loss function, except that the “free” parameters zn are in fact constrained to be the deterministic outputs of the hash function h. Second, we solve the constrained problem using a penalty method, such as the quadratic-penalty or augmented Lagrangian [21]. We discuss here the former for simplicity. We solve the following minimization problem (unconstrained again, but dependent on µ) while progressively increasing µ, so the constraints are eventually satisfied: min LP (h, Z; µ) = N X n,m=1 L(zn, zm; ynm) + µ N X n=1 ∥zn −h(xn)∥2 s.t. z1, . . . , zN ∈ {−1, +1}b. (5) ∥zn −h(xn)∥2 is proportional to the Hamming distance between the binary vectors zn and h(xn). Third, we apply alternating optimization over the binary codes Z and the parameters of the hash function h. This results in iterating the following two steps (described in detail later): Z step Optimize the binary codes z1, . . . , zN given h (hence, given the output binary codes h(x1), . . . , h(xN) for each of the N images). This can be seen as a regularized binary embedding, because the projections Z are encouraged to be close to the hash function outputs h(X). Here, we try two different approaches [16, 17] with some modifications. h step Optimize the hash function h given the binary codes Z. This simply means training b binary classifiers using X as inputs and Z as labels. This is very similar to the two-step (TSH) approach of Lin et al. [16], except that the latter learns the codes Z in isolation, rather than given the current hash function, so iterating the two-step approach would change nothing, and it does not optimize the loss L. More precisely, TSH corresponds to optimizing LP for µ →0+. In practice, we start from a very small value of µ (hence, initialize MAC from the result of TSH), and increase µ slowly while optimizing LP , until the equality constraints are satisfied, i.e., zn = h(xn) for n = 1, . . . , N. The supplementary material gives the overall MAC algorithm to learn a hash function by optimizing an affinity-based loss function. Theoretical results We can prove the following under the assumption that the Z and h steps are exact (suppl. mat.). 1) The MAC algorithm stops after a finite number of iterations, when Z = h(X) in the Z step, since then the constraints are satisfied and no more changes will occur to Z or h. 2) The path over the continuous penalty parameter µ ∈[0, ∞) is in fact discrete. The minimizer (h, Z) of LP for µ ∈[0, µ1] is identical to the minimizer for µ = 0, and the minimizer for µ ∈[µ2, ∞) is identical to the minimizer for µ →∞, where 0 < µ1 < µ2 < ∞. Hence, it suffices to take an initial µ no smaller than µ1 and keep increasing it until the algorithm stops. Besides, the interval [µ1, µ2] is itself partitioned in a finite set of intervals so that the minimizer changes only at interval boundaries. Hence, theoretically the algorithm needs only run for a finite set of µ values (although this set can still be very big). In practice, we increase µ more aggressively to reduce the runtime. This is very different from the quadratic-penalty methods in continuous optimization [21], which was the setting considered in the original MAC papers [7, 8]. There, the minimizer varies continuously with µ, which must be driven to infinity to converge to a stationary point, and in so doing it gives rise to ill-conditioning and slow convergence. 2.1 h step: optimization over the parameters of the hash function, given the binary codes Given the binary codes z1, . . . , zN, since h does not appear in the first term of LP , this simply involves finding a hash function h that minimizes minh PN n=1 ∥zn −h(xn)∥2 = Pb i=1 minhi PN n=1 (zni −hi(xn))2 where zni ∈{−1, +1} is the ith bit of the binary vector zn. Hence, we can find b one-bit hash functions in parallel and concatenate them into the b-bit hash function. Each of these is a binary 4 classification problem using the number of misclassified patterns as loss. This allows us to use a regular classifier for h, and even to use a simpler surrogate loss (such as the hinge loss), since this will also enforce the constraints eventually (as µ increases). For example, we can fit an SVM by optimizing the margin plus the slack and using a high penalty for misclassified patterns. We discuss other classifiers in the experiments. 2.2 Z step: optimization over the binary codes, given the hash function Although the MAC technique has significantly simplified the original problem, the step over Z is still complex. This involves finding the binary codes given the hash function h, and it is an NPcomplete problem in Nb binary variables. Fortunately, some recent works have proposed practical approaches for this problem based on alternating optimization: a quadratic surrogate method [16], and a GraphCut method [17]. In both methods, the starting point is to apply alternating optimization over the ith bit of all points given the remaining bits are fixed for all points (for i = 1, . . . , b), and to solve the optimization over the ith bit approximately. This would correspond to the first step in the two-step hashing of Lin et al. [16]. These methods, in their original form, can be applied to the loss function over binary codes, i.e., the first term in LP . Here, we explain briefly our modification to these methods to make them work with our Z step objective (the regularized loss function over codes, i.e., the complete LP ). The full explanation can be found in the supplementary material. Solution using a quadratic surrogate method [16] This is based on the fact that any loss function that depends on the Hamming distance of two binary variables can be equivalently written as a quadratic function of those two binary variables. We can then write the first term in LP as a binary quadratic problem using a certain matrix A ∈RN×N (computed using the fixed bits), and the second term (on µ) is also quadratic. The optimization for the ith bit can then be equivalently written as minz(i) zT (i)Az(i) + µ
z(i) −hi(X)
2 s.t. z(i) ∈{−1, +1}N (6) where hi(X) = (hi(x1), . . . , hi(xN))T and z(i) are vectors of length N (one bit per data point). This is still an NP-complete problem (except in special cases), and we approximate it by relaxing it to a continuous quadratic program (QP) over z(i) ∈[−1, 1]N, minimizing it using L-BFGS-B [34] and binarizing its solution. Solution using a GraphCut algorithm [17] To optimize LP over the ith bit of each image (given all the other bits are fixed), we have to minimize the NP-complete problem of eq. (6) over N bits. We can apply the GraphCut algorithm [3], as proposed by the FastHash algorithm of Lin et al. [17]. This proceeds as follows. First, we assign all the data points to different, possibly overlapping groups (blocks). Then, we minimize the objective function over the binary codes of the same block, while all the other binary codes are fixed, then proceed with the next block, etc. (that is, we do alternating optimization of the bits over the blocks). Specifically, to optimize over the bits in block B, ignoring the constants, we can rewrite equation (6) in the standard form for the GraphCut algorithm as: minz(i,B) P n∈B P m∈B vnmznizmi + P n∈B unmzni where vnm = anm, unm = 2 P m̸∈B anmzmi −µhi(xn). To minimize the objective function using the GraphCut algorithm, the blocks have to define a submodular function. In our case, this can be easily achieved by putting points with the same label in one block ([17] give a simple proof of this). 3 Experiments We have tested our framework with several combinations of loss function, hash function, number of bits, datasets, and comparing with several state-of-the-art hashing methods (see suppl. mat.). We report a representative subset to show the flexibility of the approach. We use the KSH (3) [19] and eSPLH [29] loss functions. We test quadratic surrogate and GraphCut methods for the Z step in MAC. As hash functions (for each bit), we use linear SVMs (trained with LIBLINEAR; [9]) and kernel SVMs (with 500 basis functions). We use the following labeled datasets: (1) CIFAR [13] contains 60 000 images in 10 classes. We use D = 320 GIST features [23] from each image. We use 58 000 images for training and 2 000 for test. (2) Infinite MNIST [20]. We generated, using elastic deformations of the original MNIST handwritten digit dataset, 1 000 000 images for training and 2 000 for test, in 10 classes. We represent each image by a D = 784 vector of raw pixels. Because of the computational cost of affinity-based methods, previous work has used training sets limited to a few thousand points [14, 16, 19, 22]. We train the hash functions in a subset of 10 000 points of the training set, and report precision and recall by searching for a test query on the entire dataset (the base set). 5 KSH loss eSPLH loss KSH precision eSPLH precision loss function L 2 4 6 8 10 12 14 5.2 5.4 5.6 5.8 x 10 6 ker−MACcut lin−MACcut ker−MACquad lin−MACquad ker−cut lin−cut ker−quad lin−quad ker−KSH iterations 2 4 6 8 10 12 5.4 5.5 5.6 5.7 5.8x 10 6 iterations precision 600 700 800 900 1000 30 35 40 45 48 k 600 700 800 900 1000 35 40 45 49 k Figure 1: Loss function L and precision for k retrieved points for KSH and eSPLH loss functions on CIFAR dataset, using b = 48 bits. We report precision (and precision/recall in the suppl. mat.) for the test set queries using as ground truth (set of true neighbors in original space) all the training points with the same label. The retrieved set contains the k nearest neighbors of the query point in the Hamming space. We report precision for different values of k to test the robustness of different algorithms. The main comparison point are the quadratic surrogate and GraphCut methods of Lin et al. [16, 17], which we denote in this section as quad and cut, respectively, regardless of the hash function that fits the resulting codes. Correspondingly, we denote the MAC version of these as MACquad and MACcut, respectively. We use the following schedule for the penalty parameter µ in the MAC algorithm (regardless of the hash function type or dataset). We initialize Z with µ = 0, i.e., the result of quad or cut. Starting from µ1 = 0.3 (MACcut) or 0.01 (MACquad), we multiply µ by 1.4 after each iteration (Z and h step). Our experiments show our MAC algorithm indeed finds hash functions with a significantly and consistently lower objective value than rounding or two-step approaches (in particular, cut and quad); and that it outperforms other state-of-the-art algorithms on different datasets, with MACcut beating MACquad most of the time. The improvement in precision makes using MAC well worth the relatively small extra runtime and minimal additional implementation effort it requires. In all our plots, the vertical arrows indicate the improvement of MACcut over cut and of MACquad over quad. The MAC algorithm finds better optima The goal of this paper is not to introduce a new affinitybased loss or hash function, but to describe a generic framework to construct algorithms that optimize a given combination thereof. We illustrate its effectiveness here with the CIFAR dataset, with different sizes of retrieved neighbor sets, and using 16 to 48 bits. We optimize two loss functions (KSH from eq. (3) and eSPLH), and two hash functions (linear and kernel SVM). In all cases, the MAC algorithm achieves a better hash function both in terms of the loss and of the precision/recall. We compare 4 ways of optimizing the loss function: quad [16], cut [17], MACquad and MACcut. For each point xn in the training set, we use κ+ = 100 positive and κ−= 500 negative neighbors, chosen at random to have the same or a different label as xn, respectively. Fig. 1 (panels 1 and 3) shows the KSH loss function for all the methods (including the original KSH method in [19]) over iterations of the MAC algorithm (KSH, quad and cut do not iterate), as well as precision and recall. It is clear that MACcut (red lines) and MACquad (magenta lines) reduce the loss function more than cut (blue lines) and quad (black lines), respectively, as well as the original KSH algorithm (cyan), in all cases: type of hash function (linear: dashed lines, kernel: solid lines) and number of bits b = 16 to 48 (suppl. mat.). Hence, applying MAC is always beneficial. Reducing the loss nearly always translates into better precision and recall (with a larger gain for linear than for kernel hash functions, usually). The gain of MACcut/MACquad over cut/quad is significant, often comparable to the gain obtained by changing from the linear to the kernel hash function within the same algorithm. We usually find cut outperforms quad (in agreement with [17]), and correspondingly MACcut outperforms MACquad. Interestingly, MACquad and MACcut end up being very similar even though they started very differently. This suggests it is not crucial which of the two methods to use in the MAC Z step, although we still prefer cut, because it usually produces somewhat better optima. Finally, fig. 1 (panels 2 and 4) also shows the MACcut results using the eSPLH loss. All settings are as in the first KSH experiment. As before, MACcut outperforms cut in both loss function and precision/recall using either a linear or a kernel SVM. Why does MAC learn better hash functions? In both the two-step and MAC approaches, the starting point are the “free” binary codes obtained by minimizing the loss over the codes without 6 KSH loss eSPLH loss loss function L 16 32 48 4 4.5 5 5.5 x 10 6 ker−MACcut lin−MACcut ker−cut lin−cut free codes number of bits b 16 32 48 4.6 4.8 5 5.2 5.4 5.6x 10 6 number of bits b {−1, +1}b×N free binary codes codes from optimal hash function codes realizable by hash functions two-step codes Figure 2: Panels 1–2: like fig. 1 but showing the value of the error function E(Z) of eq. (7) for the “free” binary codes, and for the codes produced by the hash functions learned by cut (the two-step method) and MACcut, with linear and kernel hash functions. Panel 3: illustration of free codes, two-step codes and optimal codes realizable by a hash function, in the space {−1, +1}b×N. them being the output of a particular hash function. That is, minimizing (4) without the “zn = h(xn)” constraints: minZ E(Z) = PN n=1 L(zn, zm; ynm), z1, . . . , zN ∈{−1, +1}b. (7) The resulting free codes try to achieve good precision/recall independently of whether a hash function can actually produce such codes. Constraining the codes to be realizable by a specific family of hash functions (say, linear), means the loss E(Z) will be larger than for free codes. How difficult is it for a hash function to produce the free codes? Fig. 2 (panels 1–2) plots the loss function for the free codes, the two-step codes from cut, and the codes from MACcut, for both linear and kernel hash functions in the same experiment as in fig. 1. It is clear that the free codes have a very low loss E(Z), which is far from what a kernel function can produce, and even farther from what a linear function can produce. Both of these are relatively smooth functions that cannot represent the presumably complex structure of the free codes. This could be improved by using a very flexible hash function (e.g. using a kernel function with many centers), which could better approximate the free codes, but 1) a very flexible function would likely not generalize well, and 2) we require fast hash functions for fast retrieval anyway. Given our linear or kernel hash functions, what the two-step cut optimization does is fit the hash function directly to the free codes. This is not guaranteed to find the best hash function in terms of the original problem (1), and indeed it produces a pretty suboptimal function. In contrast, MAC gradually optimizes both the codes and the hash function so they eventually match, and finds a better hash function for the original problem (although it is still not guaranteed to find the globally optimal function of problem (1), which is NP-complete). Fig. 2 (right) shows this conceptually. It shows the space of all possible binary codes, the contours of E(Z) (green) and the set of codes that can be produced by (say) linear hash functions h (gray), which is the feasible set {Z ∈{−1, +1}b×N: Z = h(X) for linear h}. The two-step codes “project” the free codes onto the feasible set, but these are not the codes for the optimal hash function h. Runtime The runtime per iteration for our 10 000-point training sets with b = 48 bits and κ+ = 100 and κ−= 500 neighbors in a laptop is 2’ for both MACcut and MACquad. They stop after 10– 20 iterations. Each iteration is comparable to a single cut or quad run, since the Z step dominates the computation. The iterations after the first one are faster because they are warm-started. Comparison with binary hashing methods Fig. 3 shows results on CIFAR and Infinite MNIST. We create affinities ynm for all methods using the dataset labels as before, with κ+ = 100 similar neighbors and κ−= 500 dissimilar neighbors. We compare MACquad and MACcut with Two-Step Hashing (quad) [16], FastHash (cut) [17], Hashing with Kernels (KSH) [19], Iterative Quantization (ITQ) [11], Binary Reconstructive Embeddings (BRE) [14] and Self-Taught Hashing (STH) [33]. MACquad, MACcut, quad and cut all use the KSH loss function (3). The results show that MACcut (and MACquad) generally outperform all other methods, often by a large margin, in nearly all situations (dataset, number of bits, size of retrieved set). In particular, MACcut and MACquad are the only ones to beat ITQ, as long as one uses sufficiently many bits. 4 Discussion The two-step approach of Two-Step Hashing [16] and FastHash [17] is a significant advance in finding good codes for binary hashing, but it also causes a maladjustment between the codes and the 7 b = 16 . . . . . . CIFAR . . . . . . b = 64 b = 16 . . . Inf. MNIST . . . b = 64 precision 500 600 700 800 900 1000 24 28 32 36 40 MACcut MACquad cut quad KSH ITQ BRE STH k 500 600 700 800 900 1000 24 28 32 36 40 k 5000 6000 7000 8000 9000 10000 62 65 68 71 74 77 MACcut MACquad cut quad KSH ITQ BRE STH k 5000 6000 7000 8000 9000 10000 62 65 68 71 74 77 k Figure 3: Comparison with binary hashing methods on CIFAR (left) and Infinite MNIST (right), using a linear hash function, using b = 16 to 64 bits (suppl. mat.). Each plot shows the precision for k retrieved points, for a range of k. hash function, since the codes were learned without knowledge of what kind of hash function would use them. Ignoring the interaction between the loss and the hash function limits the quality of the results. For example, a linear hash function will have a harder time than a nonlinear one at learning such codes. In our algorithm, this tradeoff is enforced gradually (as µ increases) in the Z step as a regularization term (eq. (5)): it finds the best codes according to the loss function, but makes sure they are close to being realizable by the current hash function. Our experiments demonstrate that significant, consistent gains are achieved in both the loss function value and the precision/recall in image retrieval over the two-step approach. Note that the objective (5) is not an ad-hoc combination of a loss over the hash function and a loss over the codes; it follows by applying MAC to the welldefined top-level problem (1), and it solves it in the limit of large µ (up to local optima). What is the best type of hash function to use? The answer to this is not unique, as it depends on application-specific factors: quality of the codes produced (to retrieve the correct images), time to compute the codes on high-dimensional data (since, after all, the reason to use binary hashing is to speed up retrieval), ease of implementation within a given hardware architecture and software libraries, etc. Our MAC framework facilitates this choice considerably, because training different types of hash functions simply involves reusing an existing classification algorithm within the h step, with no changes to the Z step. 5 Conclusion We have proposed a general framework for optimizing binary hashing using affinity-based loss functions. It improves over previous, two-step approaches based on learning binary codes first and then learning the hash function. Instead, it optimizes jointly over the binary codes and the hash function in alternation, so that the binary codes eventually match the hash function, resulting in a better local optimum of the affinity-based loss. This was possible by introducing auxiliary variables that conditionally decouple the codes from the hash function, and gradually enforcing the corresponding constraints. Our framework makes it easy to design an optimization algorithm for a new choice of loss function or hash function: one simply reuses existing software that optimizes each in isolation. The resulting algorithm is not much slower than the two-step approach—it is comparable to iterating the latter a few times—and well worth the improvement in precision/recall. The step over the hash function is essentially a solved problem if using a classifier, since this can be learned in an accurate and scalable way using machine learning techniques. The most difficult and time-consuming part in our approach is the optimization over the binary codes, which is NPcomplete and involves many binary variables and terms in the objective. Although some techniques exist [16, 17] that produce practical results, designing algorithms that reliably find good local optima and scale to large training sets is an important topic of future research. Another direction for future work involves learning more sophisticated hash functions that go beyond mapping image features onto output binary codes using simple classifiers such as SVMs. This is possible because the optimization over the hash function parameters is confined to the h step and takes the form of a supervised classification problem, so we can apply an array of techniques from machine learning and computer vision. For example, it may be possible to learn image features that work better with hashing than standard features such as SIFT, or to learn transformations of the input to which the binary codes should be invariant, such as translation, rotation or alignment. Acknowledgments Work supported by NSF award IIS–1423515. 8 References [1] A. Andoni and P. Indyk. Near-optimal hashing algorithms for approximate nearest neighbor in high dimensions. Comm. ACM, 51(1):117–122, Jan. 2008. [2] M. Belkin and P. Niyogi. Laplacian eigenmaps for dimensionality reduction and data representation. Neural Computation, 15(6):1373–1396, June 2003. [3] Y. Boykov and V. Kolmogorov. An experimental comparison of min-cut/max-flow algorithms for energy minimization in vision. IEEE PAMI, 26(9):1124–1137, Sept. 2004. [4] M. Carreira-Perpi˜n´an. The elastic embedding algorithm for dimensionality reduction. ICML, 2010. [5] M. Carreira-Perpi˜n´an and R. Raziperchikolaei. Hashing with binary autoencoders. CVPR, 2015. [6] M. Carreira-Perpi˜n´an and M. Vladymyrov. A fast, universal algorithm to learn parametric nonlinear embeddings. NIPS, 2015. [7] M. Carreira-Perpi˜n´an and W. Wang. Distributed optimization of deeply nested systems. arXiv:1212.5921 [cs.LG], Dec. 24 2012. [8] M. Carreira-Perpi˜n´an and W. Wang. Distributed optimization of deeply nested systems. AISTATS, 2014. [9] R.-E. Fan, K.-W. Chang, C.-J. Hsieh, X.-R. Wang, and C.-J. Lin. LIBLINEAR: A library for large linear classification. JMLR, 9:1871–1874, Aug. 2008. [10] T. Ge, K. He, and J. Sun. Graph cuts for supervised binary coding. ECCV, 2014. [11] Y. Gong, S. Lazebnik, A. Gordo, and F. Perronnin. Iterative quantization: A Procrustean approach to learning binary codes for large-scale image retrieval. IEEE PAMI, 35(12):2916–2929, Dec. 2013. [12] K. Grauman and R. Fergus. Learning binary hash codes for large-scale image search. In R. Cipolla, S. Battiato, and G. Farinella, editors, Machine Learning for Computer Vision, pages 49–87. SpringerVerlag, 2013. [13] A. Krizhevsky. Learning multiple layers of features from tiny images. Master’s thesis, U. Toronto, 2009. [14] B. Kulis and T. Darrell. Learning to hash with binary reconstructive embeddings. NIPS, 2009. [15] B. Kulis and K. Grauman. Kernelized locality-sensitive hashing. IEEE PAMI, 34(6):1092–1104, 2012. [16] G. Lin, C. Shen, D. Suter, and A. van den Hengel. A general two-step approach to learning-based hashing. ICCV, 2013. [17] G. Lin, C. Shen, Q. Shi, A. van den Hengel, and D. Suter. Fast supervised hashing with decision trees for high-dimensional data. CVPR, 2014. [18] W. Liu, J. Wang, S. Kumar, and S.-F. Chang. Hashing with graphs. ICML, 2011. [19] W. Liu, J. Wang, R. Ji, Y.-G. Jiang, and S.-F. Chang. Supervised hashing with kernels. CVPR, 2012. [20] G. Loosli, S. Canu, and L. Bottou. Training invariant support vector machines using selective sampling. In L. Bottou, O. Chapelle, D. DeCoste, and J. Weston, editors, Large Scale Kernel Machines, pages 301–320. MIT Press, 2007. [21] J. Nocedal and S. J. Wright. Numerical Optimization. Springer-Verlag, second edition, 2006. [22] M. Norouzi and D. Fleet. Minimal loss hashing for compact binary codes. ICML, 2011. [23] A. Oliva and A. Torralba. Modeling the shape of the scene: A holistic representation of the spatial envelope. Int. J. Computer Vision, 42(3):145–175, May 2001. [24] S. T. Roweis and L. K. Saul. Nonlinear dimensionality reduction by locally linear embedding. Science, 290(5500):2323–2326, Dec. 22 2000. [25] L. J. P. van der Maaten. Barnes-Hut-SNE. In Int. Conf. Learning Representations (ICLR 2013), 2013. [26] L. J. P. van der Maaten and G. E. Hinton. Visualizing data using t-SNE. JMLR, 9:2579–2605, Nov. 2008. [27] M. Vladymyrov and M. Carreira-Perpi˜n´an. Partial-Hessian strategies for fast learning of nonlinear embeddings. ICML, 2012. [28] M. Vladymyrov and M. Carreira-Perpi˜n´an. Linear-time training of nonlinear low-dimensional embeddings. AISTATS, 2014. [29] J. Wang, S. Kumar, and S.-F. Chang. Semi-supervised hashing for large scale search. IEEE PAMI, 2012. [30] Y. Weiss, A. Torralba, and R. Fergus. Spectral hashing. NIPS, 2009. [31] Z. Yang, J. Peltonen, and S. Kaski. Scalable optimization for neighbor embedding for visualization. ICML, 2013. [32] S. X. Yu and J. Shi. Multiclass spectral clustering. ICCV, 2003. [33] D. Zhang, J. Wang, D. Cai, and J. Lu. Self-taught hashing for fast similarity search. SIGIR, 2010. [34] C. Zhu, R. H. Byrd, P. Lu, and J. Nocedal. Algorithm 778: L-BFGS-B: FORTRAN subroutines for large-scale bound-constrained optimization. ACM Trans. Mathematical Software, 23(4):550–560, 1997. 9 | 2016 | 451 |
6,385 | Sample Complexity of Automated Mechanism Design Maria-Florina Balcan, Tuomas Sandholm, Ellen Vitercik School of Computer Science Carnegie Mellon University Pittsburgh, PA 15213 {ninamf,sandholm,vitercik}@cs.cmu.edu Abstract The design of revenue-maximizing combinatorial auctions, i.e. multi-item auctions over bundles of goods, is one of the most fundamental problems in computational economics, unsolved even for two bidders and two items for sale. In the traditional economic models, it is assumed that the bidders’ valuations are drawn from an underlying distribution and that the auction designer has perfect knowledge of this distribution. Despite this strong and oftentimes unrealistic assumption, it is remarkable that the revenue-maximizing combinatorial auction remains unknown. In recent years, automated mechanism design has emerged as one of the most practical and promising approaches to designing high-revenue combinatorial auctions. The most scalable automated mechanism design algorithms take as input samples from the bidders’ valuation distribution and then search for a high-revenue auction in a rich auction class. In this work, we provide the first sample complexity analysis for the standard hierarchy of deterministic combinatorial auction classes used in automated mechanism design. In particular, we provide tight sample complexity bounds on the number of samples needed to guarantee that the empirical revenue of the designed mechanism on the samples is close to its expected revenue on the underlying, unknown distribution over bidder valuations, for each of the auction classes in the hierarchy. In addition to helping set automated mechanism design on firm foundations, our results also push the boundaries of learning theory. In particular, the hypothesis functions used in our contexts are defined through multi-stage combinatorial optimization procedures, rather than simple decision boundaries, as are common in machine learning. 1 Introduction Multi-item, multi-bidder auctions have been studied extensively in economics, operations research, and computer science. In a combinatorial auction (CA), the bidders may submit bids on bundles of goods, rather than on individual items alone, and thereby they may fully express their complex valuation functions. Notably, these functions may be non-additive due to the presence of complementary or substitutable goods for sale. There are many important and practical applications of CAs, ranging from the US government’s wireless spectrum license auctions to sourcing auctions, through which companies coordinate the procurement and distribution of equipment, materials and supplies. One of the most important and tantalizing open questions in computational economics is the design of optimal auctions, that is, auctions that maximize the seller’s expected. In the standard economic model, it is assumed that the bidders’ valuations are drawn from an underlying distribution and that the mechanism designer has perfect information about this distribution. Astonishingly, even with this strong assumption, the optimal CA design problem is unsolved even for auctions with just two distinct items for sale and two bidders. A monumental advance in the study of optimal auction design was the characterization of the optimal 1-item auction [Myerson, 1981]. However, the problem becomes 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. significantly more challenging with multiple items for sale. In particular, Conitzer and Sandholm proved that the problem of finding a revenue-maximizing deterministic CA is NP-complete [Conitzer and Sandholm, 2004]. We note here that it is well-known that randomization can increase revenue in CAs, but we focus on deterministic CAs in this work because in many applications, randomization is not palatable and very few, if any, randomized CAs are used in practice. In recent years, a novel approach known as automated mechanism design (AMD) has been adopted to attack the revenue-maximizing auction design problem [Conitzer and Sandholm, 2002, Sandholm, 2003]. In the most scalable strand of AMD, algorithms have been developed which take samples from the bidders’ valuation distributions as input, optimize over a rich class of auctions, and return an auction which is high-performing over the sample [Likhodedov and Sandholm, 2004, 2005, Sandholm and Likhodedov, 2015]. AMD algorithms have yielded deterministic mechanisms with the highest known revenues in the contexts used for empirical evaluations [Sandholm and Likhodedov, 2015]. This approach relaxes the unrealistic assumption that the mechanism designer has perfect information about the bidders’ valuation distribution. However, until now, there was no formal characterization of the number of samples required to guarantee that the empirical revenue of the designed mechanism on the samples is close to its expected revenue on the underlying, unknown distribution over bidder valuations. In this paper, we provide that missing link. We present tight sample complexity guarantees over an extensive hierarchy of expressive CA families. These are the most commonly used auction families in AMD. The classes in the hierarchy are based on the classic VCG mechanism, which is a generalization of the well-known second-price, or Vickrey, single-item auction. The auctions we consider achieve significantly higher revenue than the VCG baseline by weighting bidders (multiplicatively increasing all of their bids) and boosting outcomes (additively increasing the liklihood that a particular outcome will be the result of the auction). A major strength of our results is their applicability to any algorithm that determines the optimal auction over the sample, a nearly optimal approximation, or any other black box procedure. Therefore, they apply to any automated mechanism design algorithm, optimal or not. One of the key challenges in deriving these general sample complexity bounds is that to do so, we must develop deep insights into how changes to the auction parameters (the bidder weights and allocation boosts) effect the outcome of the auction (who wins which items and how much each bidder pays) and thereby the revenue of the auction. In our context, we show that the functions which determine the outcome of an auction are highly complex, consisting of multi-stage optimization procedures. Therefore, the function classes we consider are much more challenging than those commonly found in machine learning contexts. Typically, for well-understood classes of functions used in machine learning, such as linear separators or other smooth curves in Euclidean spaces, there is a simple mapping from the parameters of a specific hypothesis to its prediction on a given example and a close connection between the distance in the parameter space between two parameter vectors and the distance in function space between their associated hypotheses. Roughly speaking, it is necessary to understand this connection in order to determine how many significantly different hypotheses there are over the full range of parameters. In our context, due to the inherent complexity of the classes we consider, connecting the parameter space to the space of revenue functions requires a much more delicate analysis. The key technical part of our work involves understanding this connection from a learning theoretic perspective. For the more general classes in the hierarchy, we use Rademacher complexity to derive our bounds, and for the auction classes with more combinatorial structure, we exploit that structure to prove pseudo-dimension bounds. This work is both of practical importance since we fill a fundamental gap in AMD, and of learning theoretical interest, as our sample complexity analysis requires a deep understanding of the structure of the revenue function classes we consider. Related Work. In prior research, the sample complexity of revenue maximization has been studied primarily in the single-item or the more general single-dimensional settings [Elkind, 2007, Cole and Roughgarden, 2014, Huang et al., 2015, Medina and Mohri, 2014, Morgenstern and Roughgarden, 2015, Roughgarden and Schrijvers, 2016, Devanur et al., 2016], as well as some multi-dimensional settings which are reducible to the single-bidder setting [Morgenstern and Roughgarden, 2016]. In contrast, the combinatorial settings that we study are much more complex since the revenue functions consist of multi-stage optimization procedures that cannot be reduced to a single-bidder setting. The complexity intrinsic to the multi-item setting is explored in [Dughmi et al., 2014], who show that 2 for a single unit-demand bidder, when the bidder’s values for the items may be correlated, Ω(2m) samples are required to determine a constant-factor approximation to the optimal auction. Learning theory tools such as pseudo-dimension and Rademacher complexity were used to prove strong guarantees in [Medina and Mohri, 2014, Morgenstern and Roughgarden, 2015, 2016], which analyze piecewise linear revenue functions and show that few samples are needed to learn over the revenue function classes in question. In a similar direction, bounds on the sample complexity of welfare-optimal item pricings have been developed [Feldman et al., 2015, Hsu et al., 2016]. Earlier work of Balcan et al. [2008] addressed sample complexity results for revenue maximization in unrestricted supply settings. In that context, the revenue function decomposes additively among bidders and does not apply to our combinatorial setting. Despite the inherent complexity of designing high-revenue CAs, Morgenstern and Roughgarden use linear separability as a tool to prove that certain simple classes of multi-parameter auctions have small sample complexity. The auctions they study are sequential auctions with item and grand bundle pricings, as well as second-price item auctions with item reserve prices [Morgenstern and Roughgarden, 2016]. In the item pricing auctions, the bidders show up one at a time and the seller offers each item that remains at some price. Each buyer then chooses the subset of goods that maximizes her utility. In the grand bundle pricing auctions, the bidders are each offered the grand bundle in some fixed order, and the first bidder to have a value greater than the price buys it. They show that bounding the sample complexity of these sequential auctions can be reduced to the single-buyer setting. In contrast, the auctions we study are more versatile than item pricing auctions, as they give the mechanism designer many more degrees of freedom than the number of items. This level of expressiveness allows the designer to increase competition between bidders, much like Myerson’s optimal auction, and thus boost revenue. It is easy to construct examples where even simple AMAs achieve significantly greater revenue than sequential auctions with item and grand bundle prices. Moreover, even the simpler auction classes we consider pose a unique challenge because the parameters defining the auctions influence the multi-stage allocation procedure and resulting revenue in non-intuitive ways. This is unlike item and grand bundle pricing auctions, as well as second-price item auctions, which are simple by design. Our function classes therefore require us to understand the specific form of the weighted VCG payment rule and its interaction with the parameter space. Thus, our context and techniques diverge from those in [Morgenstern and Roughgarden, 2016]. Finally, there is a wealth of work on characterizing the optimal CA for restricted settings and designing mechanisms which achieve high, if not optimal revenue in specific contexts. Due to space constraints, in Section A of the supplementary materials, we describe these results as well as what is known theoretically about the classes in the hierarchy of deterministic CAs we study. 2 Preliminaries, notation, and the combinatorial auction hierarchy In the following section, we explain the basic mechanism design problem, fix notation, and then describe the hierarchy of combinatorial auction families we study. Mechanism Design Preliminaries. We consider the problem of selling m heterogeneous goods to n bidders. This means that there are 2m different bundles of goods, B = {b1, . . . , b2m}. Each bidder i ∈[n] is associated with a set-wise valuation function over the bundles, vi : B →R. We assume that the bidders’ valuations are drawn from a distribution D. Every auction is defined by an allocation function and a payment function. The allocation function determines which bidders receive which items based on their bids and the payment function determines how much the bidders need to pay based on their bids and the allocation. It is up to the mechanism designer to determine which allocation and payment functions should be used. In our context, the two functions are fixed based on the samples from D before the bidders submit their bids. Each auction family that we consider has a design based on the classic Vickrey-Clarke-Groves mechanism (VCG). The VCG mechanism, which we describe below, is the canonical strategy-proof mechanism, which means that every bidder’s dominant strategy is to bid truthfully. In other words, for every Bidder i, no matter the bids made by the other bidders, Bidder i maximizes her expected utility (her value for her allocation minus the price she pays) by bidding her true value. Therefore, we describe the VCG mechanism assuming that the bids equal the bidders’ true valuations. 3 The VCG mechanism allocates the items such that the social welfare of the bidders, that is, the sum of each bidder’s value for the items she wins, is maximized. Intuitively, each winning bidder then pays her bid minus a “rebate” equal to the increase in welfare attributable to Bidder i’s presence in the auction. This form of the payment function is crucial to ensuring that the auction is strategy-proof. More concretely, the allocation of the VCG mechanism is the disjoint set of subsets (b∗ 1, . . . , b∗ n) ⊆B that maximizes P vi (b∗ i ). Meanwhile, let b−i 1 , . . . , b−i n be the disjoint set of subsets that maximizes P j̸=i vj b−i j . Then Bidder i must pay P j̸=i vj b−i j −vj b∗ j = vi (b∗ i ) − hP vj b∗ j −P j̸=i vj b−i j i . In the special case where there is one item for sale, the VCG mechanism is known as the second price, or Vickrey, auction, where the highest bidder wins the item and pays the second highest bid. We note that every auction in the classes we study is strategy-proof, so we may assume that the bids equal the bidders’ valuations. Notation. We study auctions with n bidders and m items. We refer to the bundle of all m items as the grand bundle. In total, there are (n + 1)m possible allocations, which we denote as the vectors O = ⃗o1, . . . ,⃗o(n+1)m . Each allocation vector ⃗oi can be written as (oi,1, . . . , oi,n), where oi,j = bℓ∈B denotes the bundle of items allocated to Bidder j in allocation ⃗oi. We use the notation ⃗v1 = (v1 (b1) , . . . , v1 (b2m)) and ⃗v = (⃗v1, . . . ,⃗vn) to denote a vector of bidder valuation functions. We say that revA(⃗v) is the revenue of an auction A on the valuation vector ⃗v. Denoting the payment of any one bidder under auction A given valuation vector ⃗v as pi,A (⃗v), we have that revA(⃗v) = Pn i=1 pi,A (⃗v). Finally, U is an upper bound on the revenue achievable for any auction over the support of the bidders’ valuation distribution. Auction Classes. We now give formal definitions of the CA families in the hierarchy we study. See Figure 1 for the hierarchical organization of the auction classes, together with the papers which introduced each family. Affine maximizer auctions (AMAs). An AMA A is defined by a set of weights per bidder (w1, . . . , wn) ⊂ R>0 and boosts per allocation λ (⃗o1) , . . . , λ ⃗o(n+1)m ⊂ R. An auction A uniquely corresponds to a set of these parameters, so we write A = w1, . . . , wn, λ (⃗o1) , . . . , λ ⃗o(n+1)m . To simplify notation, we write λi = λ (⃗oi) interchangeably. These parameters allow the mechanism designer to multiplicatively boost any bidder’s bids by their corresponding weight and to increase the likelihood that any one allocation is returned as the output of an auction. More concretely, the allocation ⃗o∗of an AMA A is the one which maximizes the weighted social welfare, i.e. ⃗o∗= argmax⃗oi∈O nPn j=1 wjvj (oi,j) + λ (⃗oi) o . The payment function of A has the same form as the VCG payment rule, with the parameters factored in to ensure that the auction remains strategy-proof. In particular, for all j ∈[n], the payments are pj,A (⃗v) = 1 wj hP ℓ̸=j wℓvℓ(o−j,ℓ) + λ (⃗o−j) −P ℓ̸=j wℓvℓ(o∗ ℓ) −λ (⃗o∗) i , where ⃗o−j = argmax⃗oi∈O nP ℓ̸=j wℓvℓ(oi,ℓ) + λ (⃗oi) o . We assume that Hw ≤wi ≤Hw, λi ≤Hλ, and vi (bℓ) ≤Hv for some Hw, Hw, Hλ, Hv ∈R≥0. It is typical to assume an upper bound (here, Hv) on the bidders’ valuation for any bundle. This is related to the fact that an upper bound on a target function’s range is always assumed in standard machine learning sample complexity bounds. Intuitively, generalizability depends on how much any one sample can skew the empirical average of a hypothesis, or in this case, auction. The bounds on the AMA parameters are closely related to the bound on the bidders’ valuations Hv. For example, it is a simple exercise to see that we need not search for a lambda value which is greater than Hv. Virtual valuation combinatorial auctions (VVCAs). VVCAs are a subset of AMAs. The defining characteristic of a VVCA is that each λ (⃗oj) is split into n terms such that λ (⃗oj) = Pn i=1 λi (⃗oj) where λi (⃗oj) = ci,b for all allocations ⃗oj that give Bidder i exactly bundle b ∈B. λ-auctions. λ-auctions are the subclass of AMAs where wi = 1 for all i ∈[n]. Mixed bundling auctions (MBAs). The class of MBAs is parameterized by a constant c ≥0 which can be seen as a discount for any bidder who receives the grand bundle. Formally, the c-MBA is the λ-auction with λ(⃗o) = c if some bidder receives the grand bundle in allocation ⃗o and 0 otherwise. Mixed bundling auctions with reserve prices (MBARPs). MBARPs are identical to MBAs though with reserve prices. In a single-item VCG auction (i.e. second price auction) with a reserve price, the 4 item is only sold if the highest bidder’s bid exceeds the reserve price, and the winner must pay the maximum of the second highest bid and the reserve price. We describe how this intuition generalizes to MBAs in Section 3. Generalization bounds. In order to derive sample complexity bounds which apply to any algorithm that determines the optimal auction over the sample, a nearly optimal approximation, or any other black-box procedure, we derive uniform convergence sample complexity bounds with respect to the auction classes we examine. Formally, we define the sample complexity of uniform convergence over an auction class A as follows. Definition 1 (Sample complexity of uniform convergence over A). We say that N(ϵ, δ, A) is the sample complexity of uniform convergence over A if for any ϵ, δ ∈(0, 1), if S = ⃗v1, . . . ,⃗vN is a sample of size N ≥N(ϵ, δ, A) drawn at random from D, with probability at least 1 −δ, for all auctions A ∈A, 1 N PN i=1 revA ⃗vi −E⃗v∼D [revA(⃗v)] ≤ϵ. 3 Sample complexity bounds over the hierarchy of auction classes In this section, we provide an overview of our sample complexity guarantees over the hierarchy of auction classes we consider (Section 3.1 and 3.2). We show that more structured classes require drastically fewer samples to learn over. We conclude with a note about sample complexity guarantees for algorithms that find an approximately optimal mechanism over a sample, as opposed to the optimal mechanism. All omitted proofs are presented in full in the supplementary material. 3.1 The sample complexity of AMA, VVCA, and λ-auction revenue maximization We begin by analyzing the most general families in the CA hierarchy — AMAs, VVCAs, and λ-auctions — proving a general upper bound and class-specific lower bounds. Theorem 1. The sample complexity of uniform convergence over the classes of n-bidder, m-item AMAs, VVCAs, and λ-Auctions is N = eO Unm√m U + nm/2 /ϵ 2 . Moreover, for λ-Auctions, N = Ω(nm) and for VVCAs, N = Ω(2m). We derive the upper bound by analyzing the Rademacher complexity of the class of n-bidder, m-item AMA revenue functions. For a family of functions G and a finite sample S = {x1, . . . , xN} of size N, the empirical Rademacher complexity is defined as bRS(G) = Eσ[supg∈G 1 N P σig(xi)], where σ = (σ1, . . . , σN), with σis independent uniform random variables taking values in {−1, 1}. The Rademacher complexity of G is defined as RN(G) = ES∼DN [ bRS(G)]. The AMA revenue function, defined in Section 2, can be summarized as a multi-stage optimization procedure: determine the weighted-optimal allocation and then compute the n different payments, each of which requires a separate optimization procedure. Luckily, we are able to decompose the revenue functions into small components, each of which is easier to analyze on its own, and then combine our results to prove the following theorem about this class of revenue functions as a whole. Theorem 2. Let F be the set of n-bidder, m-item AMA revenue functions revA such that A = w1, . . . , wn, λ1, . . . , λ(n+1)m , Hw ≤|wi| ≤Hw, |λi| ≤Hλ. Then RN(F) = O nm+2 (HwHv + Hλ) Hw r m log n N n ˆHv (nHw + Hλ) Hw + p nm log N !! , where ˆHv = max {Hv, 1}. Proof sketch. First, we describe how we split each revenue function into smaller, easier to analyze atoms, which together allow us to bound the Rademacher complexity of the class of AMA revenue functions. To this end, it is well-known (e.g. [Mohri et al., 2012]) that if every function f in a class F can be written as the summation of two functions g and h from classes G and H, respectively, then RN(F) ≤RN(G) + RN(H). Therefore, we split each revenue function into n + 1 components such that the sum of these components equals the revenue function. 5 Affine maximizer auctions [Roberts, 1979] ∪ ∪ Virtual valuation CAs [Likhodedov and Sandholm, 2004] λ-auctions [Jehiel et al., 2007] Mixed bundling auctions with reserve prices [Tang and Sandholm, 2012] ∪ ∪ Mixed bundling auctions [Jehiel et al., 2007] ∪ Figure 1: The hierarchy of deterministic CA families. Generality increases upward in the hierarchy. With this objective in mind, let ⃗o∗ A(⃗v) be the outcome of the AMA A on the bidding instance ⃗v, i.e. ⃗o∗ A = argmax⃗oi∈O nPn j=1 wjvj (oi,j) + λi o and let φA,−j(⃗v) be the weighted social welfare of the welfare-maximizing outcome without Bidder j’s participation. In other words, φA,−j(⃗v) = max⃗oi∈O nP ℓ̸=j wℓvℓ(oi,ℓ) + λi o . Then we can write revA(⃗v) = n X j=1 1 wj φA,−j(⃗v) − (n+1)m X i=1 n X j=1 1 wj X ℓ̸=j wℓvℓ(oi,ℓ) + λi 1⃗oi=⃗o∗ A(⃗v). We can now split revA into n + 1 simpler functions: revA,j(⃗v) = 1 wj φA,−j(⃗v) for j ∈[n] and revA,n+1(⃗v) = − (n+1)m X i=1 n X j=1 1 wj X ℓ̸=j wℓvℓ(oi,ℓ) + λi 1⃗oi=⃗o∗ A(⃗v), so revA(⃗v) = Pn+1 j=1 revA,j(⃗v). Intuitively, for j ∈[n], revA,j is a weighted version of what the social welfare would be if Bidder j had not participated in the auction, whereas revA,n+1(⃗v) measures the amount of revenue subtracted to ensure that the resulting auction is strategy-proof. As to be expected, bounding the Rademacher complexity of each smaller class of functions Lj = revA,j | w1, . . . , wn, λ1, . . . , λ(n+1)m , Hw ≤|wi| ≤Hw, |λi| ≤Hλ for j ∈[n+1] is simpler than bounding the Rademacher complexity the class of revenue functions itself, and if F is the set of all n-bidder, m-item AMA revenue functions, then RN(F) ≤Pn+1 j=1 RN(Lj). In Lemma 2 and Lemma 3 of Section B.1 in the supplementary materials, we obtain bounds on RN(Lj) for j ∈[n+1] which lead us to our bound on RN(F). 3.2 The sample complexity of MBA revenue maximization Fortunately, these negative sample complexity results are not the end of the story. We do achieve polynomial sample complexity upper bounds for the important classes of mixed bundling auctions (MBAs) and mixed bundling auctions with reserve prices (MBARPs). We derive these sample complexity bounds by analyzing the pseudo-dimensions of these classes of auctions. In this section, we present our results in increasing complexity, beginning with the class of n-bidder, m-item MBAs, which we show has a pseudo-dimension of 2. We build on the proof of this result to show that the class of n-bidder, m-item MBARPs has a pseudo-dimension of O m3 log n . We note that when we analyze the class of MBARPs, we assume additive reserve prices, rather than bundle reserve prices. In other words, each item has its own reserve price, and the reserve price of a bundle is the sum of its components’ reserve prices, as opposed to each bundle having its own reserve price. We have good reason to make this restriction; in Section C.1, we prove that an exponential number of samples are required to learn over the class of MBARPs with bundle reserve prices. Before we prove our sample complexity results, we fix some notation. For any c-MBA, let revc (⃗v) be its revenue on ⃗v, which is determined in the exact same way as the general AMA revenue function with the λ terms set as described in Section 2. Similarly, let rev⃗vℓ(c) be the revenue of the c-MBA on ⃗vℓas a function of c. We will use the following result regarding the structure of revc (⃗v) in order to derive our pseudo-dimension results. The proof is in Section C of the supplementary materials. 6 Figure 2: Example of rev⃗vℓ(c). Lemma 1. There exists c∗∈[0, ∞) such that rev⃗v(c) is non-decreasing on the interval [0, c∗] and non-increasing on the interval (c∗, ∞). The form of rev⃗v(c) as described in Lemma 1 is depicted in Figure 2. The full proof of the following pseudo-dimension bound can be found in Section C of the supplementary materials. Theorem 3. The pseudo-dimension of the class of n-bidder, m-item MBAs is 2. Proof sketch. First, we recall what we must show in order to prove that the pseudo-dimension of this class is 2 (for more on pseudo-dimension, see, for example, [Mohri et al., 2012]). The proof structure is similar to those involved in VC dimension derivations. To begin with, we must provide a set of two valuation vectors S = ⃗v1,⃗v2 that can be shattered by the class of MBA revenue functions. This means that there exist two targets z1, z2 ∈R with the property that for any T ⊆S, there exists a cT ∈C such that if ⃗vi ∈T, then revcT ⃗vi ≤zi and if ⃗vi ̸∈T, then revcT ⃗vi > zi. In other words, S can be labeled in every possible way by MBA revenue functions (whether or not revc ⃗vj is greater than its target zj). We must also prove that no set of three valuation vectors is shatterable. Our construction of the set S = ⃗v1,⃗v2 that can be shattered by the set of MBAs can be found in the full proof of this theorem in Section C of the supplementary materials. We now show that no set of size N ≥3 can be shattered by the class of MBAs. Fix one sample ⃗vi ∈S and consider rev⃗vi(c). From Lemma 1, we know that there exists c∗ i ∈[0, ∞), such that rev⃗vi(c) is non-decreasing on the interval [0, c∗ i ] and non-increasing on the interval (c∗ i , ∞). Therefore, there exist two thresholds t1 i ∈[0, c∗ i ] and t2 i ∈(c∗ i , ∞) ∪{∞} such that rev⃗vi(c) is below its threshold for c ∈[0, t1 i ), above its threshold for c ∈(t1 i , t2 i ), and below its threshold for c ∈(t2 i , ∞). Now, merge these thresholds for all N samples on the real line and consider the interval (t1, t2) between two adjacent thresholds. The binary labeling of the samples in S on this interval is fixed. In other words, for any sample ⃗vj ∈S, rev⃗vj(c) is either at least zj or strictly less than zj for all c ∈(t1, t2). There are at most 2N + 1 intervals between adjacent thresholds, so at most 2N + 1 different binary labelings of S. Since we assumed S is shatterable, it must be that 2N ≤2N + 1, so N ≤2. This result allows us to prove the following sample complexity guarantee. Theorem 4. The sample complexity of uniform convergence over the class of n-bidder, m-item MBAs is N = O (U/ϵ)2 (log(U/ϵ) + log(1/δ)) . Mixed bundling auctions with reserve prices (MBARPs). MBARPs are a variation on MBAs, with the addition of reserve prices. Reserve prices in the single-item case, as described in Section 2, can be generalized to the multi-item case as follows. We enlarge the set of agents to include the seller, who is now Bidder 0 and whose valuation for a set of items is the set’s reserve price. Working in this expanded set of agents, the bidder weights are all 1 and the λ terms are the same as in the standard MBA setup. Importantly, the seller makes no payments, no matter her allocation. More formally, given a vector of valuation functions ⃗v, the MBARP allocation is ⃗o∗= argmax⃗o∈O Pn i=0 vi (oi) + λ (⃗o) . For each i ∈{1, . . . , n}, Bidder i’s payment is pA,i(⃗v) = X j∈{0,...,n}\{i} vj (o−i,j) + λ (⃗o−i) − X j∈{0,...,n}\{i} vj o∗ j −λ (⃗o∗) , where ⃗o−i = argmax ⃗o∈O X j∈{0,...,n}\{i} vj (oj) + λ (⃗o) . 7 As mentioned, we restrict our attention to item-specific reserve prices. In this case, the the reserve price of a bundle is the sum of the reserve prices of the items in the bundle. Each MBARP is therefore parameterized by m + 1 values (c, r1, . . . , rm), where ri is the reserve price for the ith good. For a fixed valuation function vector ⃗v = (v1 (b1) , . . . , v1 (b2m) , . . . , vn (b1) , . . . , vn (b2m)), we can analyze the MBARP revenue function on ⃗v as a mapping rev⃗v : Rm+1 →R, where rev⃗v (c, r1, . . . , rm) is the revenue of the MBARP parameterized by (c, r1, . . . , rm) on ⃗v. Theorem 5. The psuedo-dimension of the class of n-bidder, m-item MBARPs with item-specific reserve prices is O m3 log n . Proof sketch. Let S = ⃗v1, . . . ,⃗vN of size N be a set of n-bidder valuation function samples that can be shattered by a set C of 2N MBARPs. This means that there exist N targets z1, . . . , zN such that each MBARP in C induces a binary labeling of the samples ⃗vj in S (whether the revenue of the MBARP on ⃗vj is greater than or less than zj). Since S is shatterable, we can thus label S in every possible way using MBARPs in C. This proof is similar to the proof of Theorem 3, where we split the real line into a set of intervals I such that for any I ∈I, the binary labeling of S by the c-MBA revenue function was fixed for all c ∈I. In the case of MBARPs, however, the domain is Rm+1, so we cannot split the domain into intervals in the same way. Instead, we show that we can split the domain into cells such that the binary labeling of S by the MBARP revenue function is a fixed linear function as we range over parameters in a single cell. In this way, we show that N = O m3 log n . This is enough to prove the following guarantee. Theorem 6. The sample complexity of uniform convergence over the class of n-bidder, m-item MBARPs with item-specific reserve prices is N = O (U/ϵ)2 m3 log n log (U/ϵ) + log (1/δ) . 3.3 Sample complexity bounds for approximation algorithms It may not always be computationally feasible to solve for the best auction over S for the given auction family. Rather, we may only be able to determine an auction A that has average revenue over S that is within a (1 + α) multiplicative factor of the revenue-maximizing auction over S within the family. Nonetheless, in Theorem 11 of the supplementary materials, we prove that with slightly more samples, we can ensure that the expected revenue of A is close to being with a (1 + α) multiplicative factor of the expected revenue of the optimal auction within the family with respect to the real distribution D. We prove a similar bound for an additive factor approximation as well. 4 Conclusion In this paper, we proved strong bounds on the sample complexity of uniform convergence for the well-studied and standard auction families that constitute the hierarchy of deterministic combinatorial auctions. We thereby answered a crucial question in the study of (automated) mechanism design: how to relate the performance of the mechanisms in the search space over the input samples to their expectation over the underlying—unknown—distribution. Specifically, for a fixed class of auctions, we determine the sample complexity necessary to ensure that with high probability, for any auction in that class, the average revenue over the sample is close to the expected revenue with respect to the underlying, unknown distribution over bidders’ valuations. Our bounds apply to any algorithm that finds an optimal or approximately optimal auction over an input sample, and therefore to any automated mechanism design algorithm. Moreover, our results and analyses are of interest from a learning theoretic perspective because the function classes which make up the hierarchy of deterministic combinatorial auctions diverge significantly from well-understood hypothesis classes typically found in machine learning. Acknowledgments. This work was supported in part by NSF grants CCF-1535967, CCF-1451177, CCF-1422910, IIS-1618714, IIS-1617590, IIS-1320620, IIS-1546752, ARO award W911NF-161-0061, a Sloan Research Fellowship, a Microsoft Research Faculty Fellowship, an NSF Graduate Research Fellowship, and a Microsoft Research Women’s Fellowship. 8 References Maria-Florina Balcan, Avrim Blum, Jason Hartline, and Yishay Mansour. Reducing mechanism design to algorithm design via machine learning. Journal of Computer and System Sciences, 74:78–89, 2008. Richard Cole and Tim Roughgarden. The sample complexity of revenue maximization. In Proceedings of the Annual Symposium on Theory of Computing (STOC), pages 243–252, 2014. Vincent Conitzer and Tuomas Sandholm. Complexity of mechanism design. In Proceedings of the 18th Annual Conference on Uncertainty in Artificial Intelligence (UAI), pages 103–110, 2002. Vincent Conitzer and Tuomas Sandholm. Self-interested automated mechanism design and implications for optimal combinatorial auctions. In Proceedings of the ACM Conference on Electronic Commerce (ACM-EC), pages 132–141, New York, NY, 2004. Nikhil R Devanur, Zhiyi Huang, and Christos-Alexandros Psomas. The sample complexity of auctions with side information. In Proceedings of the Annual Symposium on Theory of Computing (STOC), 2016. Shaddin Dughmi, Li Han, and Noam Nisam. Sampling and representation complexity of revenue maximization. In International Workshop On Internet And Network Economics (WINE), pages 277–291, 2014. Edith Elkind. Designing and learning optimal finite support auctions. In Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 736–745, 2007. Michal Feldman, Nick Gravin, and Brendan Lucier. Combinatorial auctions via posted prices. In Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), 2015. Justin Hsu, Jamie Morgenstern, Ryan Rogers, Aaron Roth, and Rakesh Vohra. Do prices coordinate markets? Proceedings of the Annual Symposium on Theory of Computing (STOC), 2016. Zhiyi Huang, Yishay Mansour, and Tim Roughgarden. Making the most of your samples. In Proceedings of the ACM Conference on Economics and Computation (EC), pages 45–60, 2015. Philippe Jehiel, Moritz Meyer-Ter-Vehn, and Benny Moldovanu. Mixed bundling auctions. Journal of Economic Theory, 127(1):494–512, 2007. Anton Likhodedov and Tuomas Sandholm. Methods for boosting revenue in combinatorial auctions. In Proceedings of the National Conference on Artificial Intelligence (AAAI), pages 232–237, 2004. Anton Likhodedov and Tuomas Sandholm. Approximating revenue-maximizing combinatorial auctions. In Proceedings of the National Conference on Artificial Intelligence (AAAI), 2005. Andres Munoz Medina and Mehryar Mohri. Learning theory and algorithms for revenue optimization in second price auctions with reserve. In International Conference on Machine Learning (ICML), pages 262–270, 2014. Mehryar Mohri, Afshin Rostamizadeh, and Ameet Talwalkar. Foundations of Machine Learning. MIT Press, 2012. Jamie Morgenstern and Tim Roughgarden. On the pseudo-dimension of nearly optimal auctions. In Proceedings of the Annual Conference on Neural Information Processing Systems (NIPS), pages 136–144, 2015. Jamie Morgenstern and Tim Roughgarden. Learning simple auctions. In Conference on Learning Theory (COLT), 2016. Roger Myerson. Optimal auction design. Mathematics of Operation Research, 6:58–73, 1981. Kevin Roberts. The characterization of implementable social choice rules. In J-J Laffont, editor, Aggregation and Revelation of Preferences. North-Holland Publishing Company, 1979. Tim Roughgarden and Okke Schrijvers. Ironing in the dark. Proceedings of the ACM Conference on Economics and Computation (EC), 2016. Tuomas Sandholm. Automated mechanism design: A new application area for search algorithms. In International Conference on Principles and Practice of Constraint Programming (CP), pages 19–36, 2003. Tuomas Sandholm and Anton Likhodedov. Automated design of revenue-maximizing combinatorial auctions. Operations Research, 63(5):1000–1025, 2015. Pingzhong Tang and Tuomas Sandholm. Mixed-bundling auctions with reserve prices. In International Conference on Autonomous Agents and Multi-Agent Systems (AAMAS), 2012. 9 | 2016 | 452 |
6,386 | LazySVD: Even Faster SVD Decomposition Yet Without Agonizing Pain∗ Zeyuan Allen-Zhu zeyuan@csail.mit.edu Institute for Advanced Study & Princeton University Yuanzhi Li yuanzhil@cs.princeton.edu Princeton University Abstract We study k-SVD that is to obtain the first k singular vectors of a matrix A. Recently, a few breakthroughs have been discovered on k-SVD: Musco and Musco [19] proved the first gap-free convergence result using the block Krylov method, Shamir [21] discovered the first variance-reduction stochastic method, and Bhojanapalli et al. [7] provided the fastest O(nnz(A) + poly(1/ε))-time algorithm using alternating minimization. In this paper, we put forward a new and simple LazySVD framework to improve the above breakthroughs. This framework leads to a faster gap-free method outperforming [19], and the first accelerated and stochastic method outperforming [21]. In the O(nnz(A) + poly(1/ε)) running-time regime, LazySVD outperforms [7] in certain parameter regimes without even using alternating minimization. 1 Introduction The singular value decomposition (SVD) of a rank-r matrix A ∈Rd×n corresponds to decomposing A = V ΣU ⊤where V ∈Rd×r, U ∈Rn×r are two column orthonormal matrices, and Σ = diag{σ1, . . . , σr} ∈Rr×r is a non-negative diagonal matrix with σ1 ≥σ2 ≥· · · ≥σr ≥0. The columns of V (resp. U) are called the left (resp. right) singular vectors of A and the diagonal entries of Σ are called the singular values of A. SVD is one of the most fundamental tools used in machine learning, computer vision, statistics, and operations research, and is essentially equivalent to principal component analysis (PCA) up to column averaging. A rank k partial SVD, or k-SVD for short, is to find the top k left singular vectors of A, or equivalently, the first k columns of V . Denoting by Vk ∈Rd×k the first k columns of V , and Uk the first k columns of U, one can define A∗ k := VkV ⊤ k A = VkΣkU ⊤ k where Σk = diag{σ1, . . . , σk}. Under this notation, A∗ k is the the best rank-k approximation of matrix A in terms of minimizing ∥A −Ak∥ among all rank k matrices Ak. Here, the norm can be any Schatten-q norm for q ∈[1, ∞], including spectral norm (q = ∞) and Frobenius norm (q = 2), therefore making k-SVD a very powerful tool for information retrieval, data de-noising, or even data compression. Traditional algorithms to compute SVD essentially run in time O(nd min{d, n}), which is usually very expensive for big-data scenarios. As for k-SVD, defining gap := (σk −σk+1)/(σk) to be the relative k-th eigengap of matrix A, the famous subspace power method or block Krylov method [14] solves k-SVD in time O(gap−1·k·nnz(A)·log(1/ε)) or O(gap−0.5·k·nnz(A)·log(1/ε)) respectively if ignoring lower-order terms. Here, nnz(A) is the number of non-zero elements in matrix A, and the more precise running times are stated in Table 1. Recently, there are breakthroughs to compute k-SVD faster, from three distinct perspectives. ∗The full version of this paper can be found on https://arxiv.org/abs/1607.03463. This paper is partially supported by a Microsoft Research Award, no. 0518584, and an NSF grant, no. CCF-1412958. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Paper Running time (× for being outperformed) GF? Stoc? Acc? subspace PM [19] eO knnz(A) ε + k2d ε × yes no no eO knnz(A) gap + k2d gap × no block Krylov [19] eO knnz(A) ε1/2 + k2d ε + k3 ε3/2 × yes no yes eO knnz(A) gap1/2 + k2d gap + k3 gap3/2 × no eO knnz(A) ε1/2 + k2d ε1/2 yes no yes LazySVD Corollary 4.3 and 4.4 eO knnz(A) gap1/2 + k2d gap1/2 no Shamir [21] eO knd + k4d σ4 kgap2 (local convergence only) × no yes no eO knd + kn3/4d σ1/2 k ε1/2 always ≤eO knd + kd σ2 kε2 yes yes yes LazySVD Corollary 4.3 and 4.4 eO knd + kn3/4d σ1/2 k gap1/2 always ≤eO knd + kd σ2 kgap2 no All GF results above provide (1 + ε)∥∆∥2 spectral and (1 + ε)∥∆∥F Frobenius guarantees Table 1: Performance comparison among direct methods. Define gap = (σk −σk+1)/σk ∈[0, 1]. GF = Gap Free; Stoc = Stochastic; Acc = Accelerted. Stochastic results in this table are assuming ∥ai∥2 ≤1 following (1.1). The first breakthrough is the work of Musco and Musco [19] for proving a running time for kSVD that does not depend on singular value gaps (or any other properties) of A. As highlighted in [19], providing gap-free results was an open question for decades and is a more reliable goal for practical purposes. Specifically, they proved that the block Krylov method converges in time eO knnz(A) ε1/2 + k2d ε + k3 ε3/2 , where ε is the multiplicative approximation error.2 The second breakthrough is the work of Shamir [21] for providing a fast stochastic k-SVD algorithm. In a stochastic setting, one assumes3 A is given in form AA⊤= 1 n Pn i=1 aia⊤ i and each ai ∈Rd has norm at most 1 . (1.1) Instead of repeatedly multiplying matrix AA⊤to a vector in the (subspace) power method, Shamir proposed to use a random rank-1 copy aia⊤ i to approximate such multiplications. When equipped with very ad-hoc variance-reduction techniques, Shamir showed that the algorithm has a better (local) performance than power method (see Table 1). Unfortunately, Shamir’s result is (1) not gap-free; (2) not accelerated (i.e., does not match the gap−0.5 dependence comparing to block Krylov); and (3) requires a very accurate warm-start that in principle can take a very long time to compute. The third breakthrough is in obtaining running times of the form eO(nnz(A) + poly(k, 1/ε) · (n + d)) [7, 8], see Table 2. We call them NNZ results. To obtain NNZ results, one needs sub-sampling on the matrix and this incurs a poor dependence on ε. For this reason, the polynomial dependence on 1/ε is usually considered as the most important factor. In 2015, Bhojanapalli et al. [7] obtained a 1/ε2-rate NNZ result using alternating minimization. Since 1/ε2 also shows up in the sampling complexity, we believe the quadratic dependence on ε is tight among NNZ types of algorithms. All the cited results rely on ad-hoc non-convex optimization techniques together with matrix algebra, which make the final proofs complicated. Furthermore, Shamir’s result [21] only works if a 1/poly(d)accurate warm start is given, and the time needed to find a warm start is unclear. In this paper, we develop a new algorithmic framework to solve k-SVD. It not only improves the aforementioned breakthroughs, but also relies only on simple convex analysis. 2In this paper, we use eO notations to hide possible logarithmic factors on 1/gap, 1/ε, n, d, k and potentially also on σ1/σk+1. 3This normalization follows the tradition of stochastic k-SVD or 1-SVD literatures [12, 20, 21] in order to state results more cleanly. 2 Paper Running time Frobenius norm Spectral norm [8] O(nnz(A)) + O k2 ε4 (n + d) + k3 ε5 (1 + ε)∥∆∥F (1 + ε)∥∆∥F [7] O(nnz(A)) + eO k5(σ1/σk)2 ε2 (n + d) (1 + ε)∥∆∥F ∥∆∥2 + ε∥∆∥F O(nnz(A)) + eO k2(σ1/σk+1)4 ε2 d N/A ∥∆∥2 + ε∥∆∥F O(nnz(A)) + eO k2(σ1/σk+1)2 ε2.5 (n + d) N/A ∥∆∥2 + ε∥∆∥F LazySVD Theorem 5.1 O(nnz(A)) + eO k4(σ1/σk+1)4.5 ε2 d (1 + ε)∥∆∥2 ∥∆∥2 + ε∥∆∥F Table 2: Performance comparison among O(nnz(A) + poly(1/ε)) type of algorithms. Remark: we have not tried hard to improve the dependency with respect to k or (σ1/σk+1). See Remark 5.2. 1.1 Our Results and the Settlement of an Open Question We propose to use an extremely simple framework that we call LazySVD to solve k-SVD: LazySVD: perform 1-SVD repeatedly, k times in total. More specifically, in this framework we first compute the leading singular vector v of A, and then left-project (I −vv⊤)A and repeat this procedure k times. Quite surprisingly, This seemingly “most-intuitive” approach was widely considered as “not a good idea.” In textbooks and research papers, one typically states that LazySVD has a running time that inversely depends on all the intermediate singular value gaps σ1−σ2, . . . , σk −σk+1 [18, 21]. This dependence makes the algorithm useless if some singular values are close, and is even thought to be necessary [18]. For this reason, textbooks describe only block methods (such as block power method, block Krylov, alternating minimization) which find the top k singular vectors together. Musco and Musco [19] stated as an open question to design “single-vector” methods without running time dependence on all the intermediate singular value gaps. In this paper, we fully answer this open question with novel analyses on this LazySVD framework. In particular, the resulting running time either • depends on gap−0.5 where gap is the relative singular value gap only between σk and σk+1, or • depends on ε−0.5 where ε is the approximation ratio (so is gap-free). Such dependency matches the best known dependency for block methods. More surprisingly, by making different choices of the 1-SVD subroutine in this LazySVD framework, we obtain multiple algorithms for different needs (see Table 1 and 2): • If accelerated gradient descent or Lanczos algorithm is used for 1-SVD, we obtain a faster k-SVD algorithm than block Krylov [19]. • If a variance-reduction stochastic method is used for 1-SVD, we obtain the first accelerated stochastic algorithm for k-SVD, and this outperforms Shamir [21]. • If one sub-samples A before applying LazySVD, the running time becomes eO(nnz(A) + ε−2poly(k)·d). This improves upon [7] in certain (but sufficiently interesting) parameter regimes, but completely avoids the use of alternating minimization. Finally, besides the running time advantages above, our analysis is completely based on convex optimization because 1-SVD is solvable using convex techniques. LazySVD also works when k is not known to the algorithm, as opposed to block methods which need to know k in advance. Other Related Work. Some authors focus on the streaming or online model of 1-SVD [4, 15, 17] or k-SVD [3]. These algorithms are slower than offline methods. Unlike k-SVD, accelerated stochastic methods were previously known for 1-SVD [12, 13]. After this paper is published, LazySVD has been generalized to also solve canonical component analysis and generalized PCA by the same authors [1]. If one is only interested in projecting a vector to the top k-eigenspace without computing the top k eigenvectors like we do in this paper, this can also be done in an accelerated manner [2]. 3 2 Preliminaries Given a matrix A we denote by ∥A∥2 and ∥A∥F respectively the spectral and Frobenius norms of A. For q ≥1, we denote by ∥A∥Sq the Schatten q-norm of A. We write A ⪰B if A, B are symmetric and A −B is positive semi-definite (PSD). We denote by λk(M) the k-th largest eigenvalue of a symmetric matrix M, and σk(A) the k-th largest singular value of a rectangular matrix A. Since λk(AA⊤) = λk(A⊤A) = (σk(A))2, solving k-SVD for A is the same as solving k-PCA for M = AA⊤. We denote by σ1 ≥· · · σd ≥0 the singular values of A ∈Rd×n, by λ1 ≥· · · λd ≥0 the eigenvalues of M = AA⊤∈Rd×d. (Although A may have fewer than d singular values for instance when n < d, if this happens, we append zeros.) We denote by A∗ k the best rank-k approximation of A. We use ⊥to denote the orthogonal complement of a matrix. More specifically, given a column orthonormal matrix U ∈Rd×k, we define U ⊥:= {x ∈Rd | U ⊤x = 0}. For notational simplicity, we sometimes also denote U ⊥as a d × (d −k) matrix consisting of some basis of U ⊥. Theorem 2.1 (approximate matrix inverse). Given d × d matrix M ⪰0 and constants λ, δ > 0 satisfying λI −M ⪰δI, one can minimize the quadratic f(x) := x⊤(λI −M)x −b⊤x in order to invert (λI −M)−1b. Suppose the desired accuracy is
x −(λI −M)−1b
≤ε. Then, • Accelerated gradient descent (AGD) produces such an output x in O λ1/2 δ1/2 log λ εδ iterations, each requiring O(d) time plus the time needed to multiply M with a vector. • If M is given in the form M = 1 n Pn i=1 aia⊤ i and ∥ai∥2 ≤1, then accelerated SVRG (see for instance [5]) produces such an output x in time O max{nd, n3/4dλ1/4 δ1/2 log λ εδ . 3 A Specific 1-SVD Algorithm: Shift-and-Inverse Revisited In this section, we study a specific 1-PCA algorithm AppxPCA (recall 1-PCA equals 1-SVD). It is a (multiplicative-)approximate algorithm for computing the leading eigenvector of a symmetric matrix. We emphasize that, in principle, most known 1-PCA algorithms (e.g., power method, Lanczos method) are suitable for our LazySVD framework. We choose AppxPCA solely because it provides the maximum flexibility in obtaining all stochastic / NNZ running time results at once. Our AppxPCA uses the shift-and-inverse routine [12, 13], and our pseudo-code in Algorithm 1 is a modification of Algorithm 5 that appeared in [12]. Since we need a more refined running time statement with a multiplicative error guarantee, and since the stated proof in [12] is anyways only a sketched one, we choose to carefully reprove a similar result of [12] and state the following theorem: Theorem 3.1 (AppxPCA). Let M ∈Rd×d be a symmetric matrix with eigenvalues 1 ≥λ1 ≥· · · ≥ λd ≥0 and corresponding eigenvectors u1, . . . , ud. With probability at least 1 −p, AppxPCA produces an output w satisfying X i∈[d],λi≤(1−δ×)λ1 (w⊤ui)2 ≤ε and w⊤Mw ≥(1 −δ×)(1 −ε)λ1 . Furthermore, the total number of oracle calls to A is O(log(1/δ×)m1 + m2), and each time we call A we have λ(s) λmin(λ(s)I−M) ≤12 δ× and 1 λmin(λ(s)I−M) ≤ 12 δ×λ1 . Since AppxPCA reduces 1-PCA to oracle calls of a matrix inversion subroutine A, the stated conditions λ(s) λmin(λ(s)I−M) ≤12 δ× and 1 λmin(λ(s)I−M) ≤ 12 δ×λ1 in Theorem 3.1, together with complexity results for matrix inversions (see Theorem 2.1), imply the following running times for AppxPCA: Corollary 3.2. • If A is AGD, the running time of AppxPCA is eO 1 δ1/2 × multiplied with O(d) plus the time needed to multiply M with a vector. • If M = 1 n Pn i=1 aia⊤ i where each ∥ai∥2 ≤1, and A is accelerated SVRG, then the total running time of AppxPCA is eO max{nd, n3/4d λ1/4 1 δ1/2 × . 4 Algorithm 1 AppxPCA(A, M, δ×, ε, p) ⋄(only for proving our theoretical results; for practitioners, feel free to use your favorite 1-PCA algorithm such as Lanczos to replace AppxPCA.) Input: A, an approximate matrix inversion method; M ∈Rd×d, a symmetric matrix satisfying 0 ⪯M ⪯I; δ× ∈(0, 0.5], a multiplicative error; ε ∈(0, 1), a numerical accuracy parameter; and p ∈(0, 1), a confidence parameter. ⋄running time only logarithmically depends on 1/ε and 1/p. 1: m1 ← l 4 log 288d p2 m , m2 ← l log 36d p2ε m ; ⋄m1 = T PM(8, 1/32, p) and m2 = T PM(2, ε/4, p) using definition in Lemma A.1 2: eε1 ← 1 64m1 δ× 6 m1 and eε2 ← ε 8m2 δ× 6 m2 3: bw0 ←a random unit vector; s ←0; λ(0) ←1 + δ×; 4: repeat 5: s ←s + 1; 6: for t = 1 to m1 do 7: Apply A to find bwt satisfying
bwt −(λ(s−1)I −M)−1 bwt−1
≤eε1; 8: w ←bwm1/∥bwm1∥; 9: Apply A to find v satisfying
v −(λ(s−1)I −M)−1w
≤eε1; 10: ∆(s) ←1 2 · 1 w⊤v−eε1 and λ(s) ←λ(s−1) −∆(s) 2 ; 11: until ∆(s) ≤δ×λ(s) 3 12: f ←s; 13: for t = 1 to m2 do 14: Apply A to find bwt satisfying
bwt −(λ(f)I −M)−1 bwt−1
≤eε2; 15: return w := bwm2/∥bwm2∥. Algorithm 2 LazySVD(A, M, k, δ×, εpca, p) Input: A, an approximate matrix inversion method; M ∈Rd×d, a matrix satisfying 0 ⪯M ⪯I; k ∈[d], the desired rank; δ× ∈(0, 1), a multiplicative error; εpca ∈(0, 1), a numerical accuracy parameter; and p ∈(0, 1), a confidence parameter. 1: M0 ←M and V0 ←[]; 2: for s = 1 to k do 3: v′ s ←AppxPCA(A, Ms−1, δ×/2, εpca, p/k); ⋄to practitioners: use your favorite 1-PCA algorithm such as Lanczos to compute v′ s 4: vs ← (I −Vs−1V ⊤ s−1)v′ s /
(I −Vs−1V ⊤ s−1)v′ s
; ⋄project v′ s to V ⊥ s−1 5: Vs ←[Vs−1, vs]; 6: Ms ←(I −vsv⊤ s )Ms−1(I −vsv⊤ s ) ⋄we also have Ms = (I −VsV ⊤ s )M(I −VsV ⊤ s ) 7: end for 8: return Vk. 4 Main Algorithm and Theorems Our algorithm LazySVD is stated in Algorithm 2. It starts with M0 = M, and repeatedly applies k times AppxPCA. In the s-th iteration, it computes an approximate leading eigenvector of matrix Ms−1 using AppxPCA with a multiplicative error δ×/2, projects Ms−1 to the orthogonal space of this vector, and then calls it matrix Ms. In this stated form, LazySVD finds approximately the top k eigenvectors of a symmetric matrix M ∈Rd×d. If M is given as M = AA⊤, then LazySVD automatically finds the k-SVD of A. 4.1 Our Core Theorems We state our approximation and running time core theorems of LazySVD below, and then provide corollaries to translate them into gap-dependent and gap-free theorems on k-SVD. Theorem 4.1 (approximation). Let M ∈Rd×d be a symmetric matrix with eigenvalues 1 ≥λ1 ≥ · · · λd ≥0 and corresponding eigenvectors u1, . . . , ud. Let k ∈[d], let δ×, p ∈(0, 1), and let εpca ≤ 5 poly ε, δ×, 1 d, λ1 λk+1 .4 Then, LazySVD outputs a (column) orthonormal matrix Vk = (v1, . . . , vk) ∈ Rd×k which, with probability at least 1 −p, satisfies all of the following properties. (Denote by Mk = (I −VkV ⊤ k )M(I −VkV ⊤ k ).) (a) Core lemma: ∥V ⊤ k U∥2 ≤ε, where U = (uj, . . . , ud) is the (column) orthonormal matrix and j is the smallest index satisfying λj ≤(1 −δ×)∥Mk−1∥2. (b) Spectral norm guarantee: λk+1 ≤∥Mk∥2 ≤λk+1 1−δ× . (c) Rayleigh quotient guarantee: (1 −δ×)λk ≤v⊤ k Mvk ≤ 1 1−δ× λk. (d) Schatten-q norm guarantee: for every q ≥1, we have ∥Mk∥Sq ≤(1+δ×)2 (1−δ×)2 Pd i=k+1 λq i 1/q . We defer the proof of Theorem 4.1 to the full version, and we also have a section in the full version to highlight the technical ideas behind the proof. Below we state the running time of LazySVD. Theorem 4.2 (running time). LazySVD can be implemented to run in time • eO knnz(M)+k2d δ1/2 × if A is AGD and M ∈Rd×d is given explicitly; • eO knnz(A)+k2d δ1/2 × if A is AGD and M is given as M = AA⊤where A ∈Rd×n; or • eO knd + kn3/4d λ1/4 k δ1/2 × if A is accelerated SVRG and M = 1 n Pn i=1 aia⊤ i where each ∥ai∥2 ≤1. Above, the eO notation hides logarithmic factors with respect to k, d, 1/δ×, 1/p, 1/λ1, λ1/λk. Proof of Theorem 4.2. We call k times AppxPCA, and each time we can feed Ms−1 = (I − Vs−1V ⊤ s−1)M(I −Vs−1V ⊤ s−1) implicitly into AppxPCA thus the time needed to multiply Ms−1 with a d-dimensional vector is O(dk + nnz(M)) or O(dk + nnz(A)). Here, the O(dk) overhead is due to the projection of a vector into V ⊥ s−1. This proves the first two running times using Corollary 3.2. To obtain the third running time, when we compute Ms from Ms−1, we explicitly project a′ i ←(I − vsv⊤ s )ai for each vector ai, and feed the new a′ 1, . . . , a′ n into AppxPCA. Now the running time follows from the second part of Corollary 3.2 together with the fact that ∥Ms−1∥2 ≥∥Mk−1∥2 ≥λk. □ 4.2 Our Main Results for k-SVD Our main theorems imply the following corollaries (proved in full version of this paper). Corollary 4.3 (Gap-dependent k-SVD). Let A ∈Rd×n be a matrix with singular values 1 ≥σ1 ≥ · · · σd ≥0 and the corresponding left singular vectors u1, . . . , ud ∈Rd. Let gap = σk−σk+1 σk be the relative gap. For fixed ε, p > 0, consider the output Vk ←LazySVD A, AA⊤, k, gap, O ε4·gap2 k4(σ1/σk)4 , p . Then, defining W = (uk+1, . . . , ud), we have with probability at least 1 −p: Vk is a rank-k (column) orthonormal matrix with ∥V ⊤ k W∥2 ≤ε . Our running time is eO knnz(A)+k2d √gap , or time eO knd + kn3/4d σ1/2 k √gap in the stochastic setting (1.1). Above, both running times depend only poly-logarithmically on 1/ε. Corollary 4.4 (Gap-free k-SVD). Let A ∈Rd×n be a matrix with singular values 1 ≥σ1 ≥ · · · σd ≥0. For fixed ε, p > 0, consider the output (v1, . . . , vk) = Vk ←LazySVD A, AA⊤, k, ε 3, O ε6 k4d4(σ1/σk+1)12 , p . Then, defining Ak = VkV ⊤ k A which is a rank k matrix, we have with probability at least 1 −p: 4The detailed specifications of εpca can be found in the appendix where we restate the theorem more formally. To provide the simplest proof, we have not tightened the polynomial factors in the theoretical upper bound of εpca because the running time depends only logarithmic on 1/εpca. 6 1. Spectral norm guarantee: ∥A −Ak∥2 ≤(1 + ε)∥A −A∗ k∥2; 2. Frobenius norm guarantee: ∥A −Ak∥F ≤(1 + ε)∥A −A∗ k∥F ; and 3. Rayleigh quotient guarantee: ∀i ∈[k], v⊤ i AA⊤vi −σ2 i ≤εσ2 i . Running time is eO knnz(A)+k2d √ε , or time eO knd + kn3/4d σ1/2 k √ε in the stochastic setting (1.1). Remark 4.5. The spectral and Frobenius guarantees are standard. The spectral guarantee is more desirable than the Frobenius one in practice [19]. In fact, our algorithm implies for all q ≥1, ∥A −Ak∥Sq ≤(1 + ε)∥A −A∗ k∥Sq where ∥· ∥Sq is the Schatten-q norm. Rayleigh-quotient guarantee was introduced by Musco and Musco [19] for a more refined comparison. They showed that the block Krylov method satisfies |v⊤ i AA⊤vi−σ2 i | ≤εσ2 k+1, which is slightly stronger than ours. However, these two guarantees are not much different in practice as we evidenced in experiments. 5 NNZ Running Time In this section, we translate our results in the previous section into the O(nnz(A) + poly(k, 1/ε)(n + d)) running-time statements. The idea is surprisingly simple: we sample either random columns of A, or random entries of A, and then apply LazySVD to compute the k-SVD. Such translation directly gives either 1/ε2.5 results if AGD is used as the convex subroutine and either column or entry sampling is used, or a 1/ε2 result if accelerated SVRG and column sampling are used together. We only informally state our theorem and defer all the details to the full paper. Theorem 5.1 (informal). Let A ∈Rd×n be a matrix with singular values σ1 ≥· · · ≥σd ≥0. For every ε ∈(0, 1/2), one can apply LazySVD with appropriately chosen δ× on a “carefully sub-sampled version” of A. Then, the resulting matrix V ∈Rd×k can satisfy • spectral norm guarantee: ∥A −V V ⊤A∥2 ≤∥A −A∗ k∥2 + ε∥A −A∗ k∥F ;5 • Frobenius norm guarantee: ∥A −V V ⊤A∥F ≤(1 + ε)∥A −A∗ k∥F . The total running time depends on (1) whether column or entry sampling is used, (2) which matrix inversion routine A is used, and (3) whether spectral or Frobenius guarantee is needed. We list our deduced results in Table 2 and the formal statements can be found in the full version of this paper. Remark 5.2. The main purpose of our NNZ results is to demonstrate the strength of LazySVD framework in terms of improving the ε dependency to 1/ε2. Since the 1/ε2 rate matches sampling complexity, it is very challenging have an NNZ result with 1/ε2 dependency.6 We have not tried hard, and believe it possible, to improve the polynomial dependence with respect to k or (σ1/σk+1). 6 Experiments We demonstrate the practicality of our LazySVD framework, and compare it to block power method or block Krylov method. We emphasize that in theory, the best worse-cast complexity for 1-PCA is obtained by AppxPCA on top of accelerated SVRG. However, for the size of our chosen datasets, Lanczos method runs faster than AppxPCA and therefore we adopt Lanczos method as the 1-PCA method for our LazySVD framework.7 Datasets. We use datasets SNAP/amazon0302, SNAP/email-enron, and news20 that were also used by Musco and Musco [19], as well as an additional but famous dataset RCV1. The first two can be found on the SNAP website [16] and the last two can be found on the LibSVM website [11]. The four datasets give rise sparse matrices of dimensions 257570×262111, 35600×16507, 11269×53975, and 20242 × 47236 respectively. 5This is the best known spectral guarantee one can obtain using NNZ running time [7]. It is an open question whether the stricter ∥A −V V ⊤A∥2 ≤(1 + ε)∥A −A∗ k∥2 type of spectral guarantee is possible. 6On one hand, one can use dimension reduction such as [9] to reduce the problem size to O(k/ε2); to the best of our knowledge, it is impossible to obtain any NNZ result faster than 1/ε3 using solely dimension reduction. On the other hand, obtaining 1/ε2 dependency was the main contribution of [7]: they relied on alternating minimization but we have avoided it in our paper. 7Our LazySVD framework turns every 1-PCA method satisfying Theorem 3.1 (including Lanczos method) into a k-SVD solver. However, our theoretical results (esp. stochastic and NNZ) rely on AppxPCA because Lanczos is not a stochastic method. 7 1E-3 1E-2 1E-1 1E+0 0 10 20 30 40 this paper Krylov(unstable) Krylov PM (a) amazon, k = 20, spectral 1E-7 1E-5 1E-3 1E-1 0 5 10 15 20 25 30 this paper Krylov(unstable) Krylov PM (b) news, k = 20, spectral 1E-8 1E-6 1E-4 1E-2 1E+0 0 5 10 15 20 25 30 this paper Krylov(unstable) Krylov PM (c) news, k = 20, rayleigh 1E-7 1E-5 1E-3 1E-1 0 0.5 1 1.5 2 2.5 3 this paper Krylov(unstable) Krylov PM (d) email, k = 10, Fnorm 1E-7 1E-5 1E-3 1E-1 0 10 20 30 40 50 60 this paper Krylov(unstable) Krylov PM (e) rcv1, k = 30, Fnorm 1E-3 1E-2 1E-1 1E+0 0 10 20 30 40 50 60 this paper Krylov(unstable) Krylov PM (f) rcv1, k = 30, rayleigh(last) Figure 1: Selected performance plots. Relative error (y-axis) vs. running time (x-axis). Implemented Algorithms. For the block Krylov method, it is a well-known issue that the Lanczos type of three-term recurrence update is numerically unstable. This is why Musco and Musco [19] only used the stable variant of block Krylov which requires an orthogonalization of each n × k matrix with respect to all previously obtained n × k matrices. This greatly improves the numerical stability albeit sacrificing running time. We implement both these algorithms. In sum, we have implemented: • PM: block power method for T iterations. • Krylov: stable block Krylov method for T iterations [19]. • Krylov(unstable): the three-term recurrence implementation of block Krylov for T iterations. • LazySVD: k calls of the vanilla Lanczos method, and each call runs T iterations. A Fair Running-Time Comparison. For a fixed integer T, the four methods go through the dataset (in terms of multiplying A with column vectors) the same number of times. However, since LazySVD does not need block orthogonalization (as needed in PM and Krylov) and does not need a (Tk)dimensional SVD computation in the end (as needed in Krylov), the running time of LazySVD is clearly much faster for a fixed value T. We therefore compare the performances of the four methods in terms of running time rather than T. We programmed the four algorithms using the same programming language with the same sparsematrix implementation. We tested them single-threaded on the same Intel i7-3770 3.40GHz personal computer. As for the final low-dimensional SVD decomposition step at the end of the PM or Krylov method (which is not needed for our LazySVD), we used a third-party library that is built upon the x64 Intel Math Kernel Library so the time needed for such SVD is maximally reduced. Performance Metrics. We compute four metrics on the output V = (v1, . . . , vk) ∈Rn×k: • Fnorm: relative Frobenius norm error: (∥A −V V ⊤A∥F −∥A −A∗ k∥F )/∥A −A∗ k∥F . • spectral: relative spectral norm error: (∥A −V V ⊤A∥2 −∥A −A∗ k∥2)/∥A −A∗ k∥2. • rayleigh(last): Rayleigh quotient error relative to σk+1: maxk j=1 σ2 j −v⊤ j AA⊤vj /σ2 k+1. • rayleigh: relative Rayleigh quotient error: maxk j=1 σ2 j −v⊤ j AA⊤vj /σ2 j . The first three metrics were also used by Musco and Musco [19]. We added the fourth one because our theory only predicted convergence with respect to the fourth but not the third metric. However, we observe that in practice they are not much different from each other. Our Results. We study four datasets each with k = 10, 20, 30 and with the four performance metrics, totaling 48 plots. Due to space limitation, we only select six representative plots out of 48 and include them in Figure 1. (The full plots can be found in Figure 2, 3, 4 and 5 in the appendix.) We make the following observations: • LazySVD outperforms its three competitors almost universally. • Krylov(unstable) outperforms Krylov for small value T; however, it is less useful for obtaining accurate solutions due to its instability. (The dotted green curves even go up if T is large.) • Subspace power method performs the slowest unsurprisingly due to its lack of acceleration. 8 References [1] Zeyuan Allen-Zhu and Yuanzhi Li. Doubly Accelerated Methods for Faster CCA and Generalized Eigendecomposition. ArXiv e-prints, abs/1607.06017, July 2016. [2] Zeyuan Allen-Zhu and Yuanzhi Li. Faster Principal Component Regression via Optimal Polynomial Approximation to sgn(x). ArXiv e-prints, abs/1608.04773, August 2016. [3] Zeyuan Allen-Zhu and Yuanzhi Li. First Efficient Convergence for Streaming k-PCA: a Global, Gap-Free, and Near-Optimal Rate. ArXiv e-prints, abs/1607.07837, July 2016. [4] Zeyuan Allen-Zhu and Yuanzhi Li. Follow the Compressed Leader: Faster Algorithm for Matrix Multiplicative Weight Updates. ArXiv e-prints, abs/1701.01722, January 2017. [5] Zeyuan Allen-Zhu and Yang Yuan. Improved SVRG for Non-Strongly-Convex or Sum-of-NonConvex Objectives. In ICML, 2016. [6] Sanjeev Arora, Satish Rao, and Umesh V. Vazirani. Expander flows, geometric embeddings and graph partitioning. Journal of the ACM, 56(2), 2009. [7] Srinadh Bhojanapalli, Prateek Jain, and Sujay Sanghavi. Tighter Low-rank Approximation via Sampling the Leveraged Element. In SODA, pages 902–920, 2015. [8] Kenneth L. Clarkson and David P. Woodruff. Low rank approximation and regression in input sparsity time. In STOC, pages 81–90, 2013. [9] Michael B. Cohen, Sam Elder, Cameron Musco, Christopher Musco, and Madalina Persu. Dimensionality reduction for k-means clustering and low rank approximation. In STOC, pages 163–172. ACM, 2015. [10] Petros Drineas and Anastasios Zouzias. A Note on Element-wise Matrix Sparsification via a Matrix-valued Bernstein Inequality. ArXiv e-prints, abs/1006.0407, January 2011. [11] Rong-En Fan and Chih-Jen Lin. LIBSVM Data: Classification, Regression and Multi-label. Accessed: 2015-06. [12] Dan Garber and Elad Hazan. Fast and simple PCA via convex optimization. ArXiv e-prints, September 2015. [13] Dan Garber, Elad Hazan, Chi Jin, Sham M. Kakade, Cameron Musco, Praneeth Netrapalli, and Aaron Sidford. Robust shift-and-invert preconditioning: Faster and more sample efficient algorithms for eigenvector computation. In ICML, 2016. [14] Gene H. Golub and Charles F. Van Loan. Matrix Computations. The JHU Press, 4th edition, 2012. [15] Prateek Jain, Chi Jin, Sham M. Kakade, Praneeth Netrapalli, and Aaron Sidford. Streaming PCA: Matching Matrix Bernstein and Near-Optimal Finite Sample Guarantees for Oja’s Algorithm. In COLT, 2016. [16] Jure Leskovec and Andrej Krevl. SNAP Datasets: Stanford large network dataset collection. http://snap.stanford.edu/data, June 2014. [17] Chris J. Li, Mengdi Wang, Han Liu, and Tong Zhang. Near-Optimal Stochastic Approximation for Online Principal Component Estimation. ArXiv e-prints, abs/1603.05305, March 2016. [18] Ren-Cang Li and Lei-Hong Zhang. Convergence of the block lanczos method for eigenvalue clusters. Numerische Mathematik, 131(1):83–113, 2015. [19] Cameron Musco and Christopher Musco. Randomized block krylov methods for stronger and faster approximate singular value decomposition. In NIPS, pages 1396–1404, 2015. [20] Ohad Shamir. A Stochastic PCA and SVD Algorithm with an Exponential Convergence Rate. In ICML, pages 144—-153, 2015. [21] Ohad Shamir. Fast stochastic algorithms for svd and pca: Convergence properties and convexity. In ICML, 2016. [22] Joel A. Tropp. An Introduction to Matrix Concentration Inequalities. ArXiv e-prints, abs/1501.01571, January 2015. 9 | 2016 | 453 |
6,387 | A Probabilistic Framework for Deep Learning Ankit B. Patel Baylor College of Medicine, Rice University ankitp@bcm.edu,abp4@rice.edu Tan Nguyen Rice University mn15@rice.edu Richard G. Baraniuk Rice University richb@rice.edu Abstract We develop a probabilistic framework for deep learning based on the Deep Rendering Mixture Model (DRMM), a new generative probabilistic model that explicitly capture variations in data due to latent task nuisance variables. We demonstrate that max-sum inference in the DRMM yields an algorithm that exactly reproduces the operations in deep convolutional neural networks (DCNs), providing a first principles derivation. Our framework provides new insights into the successes and shortcomings of DCNs as well as a principled route to their improvement. DRMM training via the Expectation-Maximization (EM) algorithm is a powerful alternative to DCN back-propagation, and initial training results are promising. Classification based on the DRMM and other variants outperforms DCNs in supervised digit classification, training 2-3⇥faster while achieving similar accuracy. Moreover, the DRMM is applicable to semi-supervised and unsupervised learning tasks, achieving results that are state-of-the-art in several categories on the MNIST benchmark and comparable to state of the art on the CIFAR10 benchmark. 1 Introduction Humans are adept at a wide array of complicated sensory inference tasks, from recognizing objects in an image to understanding phonemes in a speech signal, despite significant variations such as the position, orientation, and scale of objects and the pronunciation, pitch, and volume of speech. Indeed, the main challenge in many sensory perception tasks in vision, speech, and natural language processing is a high amount of such nuisance variation. Nuisance variations complicate perception by turning otherwise simple statistical inference problems with a small number of variables (e.g., class label) into much higher-dimensional problems. The key challenge in developing an inference algorithm is then how to factor out all of the nuisance variation in the input. Over the past few decades, a vast literature that approaches this problem from myriad different perspectives has developed, but the most difficult inference problems have remained out of reach. Recently, a new breed of machine learning algorithms have emerged for high-nuisance inference tasks, achieving super-human performance in many cases. A prime example of such an architecture is the deep convolutional neural network (DCN), which has seen great success in tasks like visual object recognition and localization, speech recognition and part-of-speech recognition. The success of deep learning systems is impressive, but a fundamental question remains: Why do they work? Intuitions abound to explain their success. Some explanations focus on properties of feature invariance and selectivity developed over multiple layers, while others credit raw computational power and the amount of available training data. However, beyond these intuitions, a coherent theoretical framework for understanding, analyzing, and synthesizing deep learning architectures has remained elusive. In this paper, we develop a new theoretical framework that provides insights into both the successes and shortcomings of deep learning systems, as well as a principled route to their design and improvement. Our framework is based on a generative probabilistic model that explicitly captures variation due to latent nuisance variables. The Rendering Mixture Model (RMM) explicitly models nuisance variation through a rendering function that combines task target variables (e.g., object class in an 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. object recognition) with a collection of task nuisance variables (e.g., pose). The Deep Rendering Mixture Model (DRMM) extends the RMM in a hierarchical fashion by rendering via a product of affine nuisance transformations across multiple levels of abstraction. The graphical structures of the RMM and DRMM enable efficient inference via message passing (e.g., using the max-sum/product algorithm) and training via the expectation-maximization (EM) algorithm. A key element of our framework is the relaxation of the RMM/DRMM generative model to a discriminative one in order to optimize the bias-variance tradeoff. Below, we demonstrate that the computations involved in joint MAP inference in the relaxed DRMM coincide exactly with those in a DCN. The intimate connection between the DRMM and DCNs provides a range of new insights into how and why they work and do not work. While our theory and methods apply to a wide range of different inference tasks (including, for example, classification, estimation, regression, etc.) that feature a number of task-irrelevant nuisance variables (including, for example, object and speech recognition), for concreteness of exposition, we will focus below on the classification problem underlying visual object recognition. The proofs of several results appear in the Appendix. 2 Related Work Theories of Deep Learning. Our theoretical work shares similar goals with several others such as the i-Theory [1] (one of the early inspirations for this work), Nuisance Management [24], the Scattering Transform [6], and the simple sparse network proposed by Arora et al. [2]. Hierarchical Generative Models. The DRMM is closely related to several hierarchical models, including the Deep Mixture of Factor Analyzers [27] and the Deep Gaussian Mixture Model [29]. Like the above models, the DRMM attempts to employ parameter sharing, capture the notion of nuisance transformations explicitly, learn selectivity/invariance, and promote sparsity. However, the key features that distinguish the DRMM approach from others are: (i) The DRMM explicitly models nuisance variation across multiple levels of abstraction via a product of affine transformations. This factorized linear structure serves dual purposes: it enables (ii) tractable inference (via the maxsum/product algorithm), and (iii) it serves as a regularizer to prevent overfitting by an exponential reduction in the number of parameters. Critically, (iv) inference is not performed for a single variable of interest but instead for the full global configuration of nuisance variables. This is justified in lownoise settings. And most importantly, (v) we can derive the structure of DCNs precisely, endowing DCN operations such as the convolution, rectified linear unit, and spatial max-pooling with principled probabilistic interpretations. Independently from our work, Soatto et al. [24] also focus strongly on nuisance management as the key challenge in defining good scene representations. However, their work considers max-pooling and ReLU as approximations to a marginalized likelihood, whereas our work interprets those operations differently, in terms of max-sum inference in a specific probabilistic generative model. The work on the number of linear regions in DCNs [14] is complementary to our own, in that it sheds light on the complexity of functions that a DCN can compute. Both approaches could be combined to answer questions such as: How many templates are required for accurate discrimination? How many samples are needed for learning? We plan to pursue these questions in future work. Semi-Supervised Neural Networks. Recent work in neural networks designed for semi-supervised learning (few labeled data, lots of unlabeled data) has seen the resurgence of generative-like approaches, such as Ladder Networks [17], Stacked What-Where Autoencoders (SWWAE) [31] and many others. These network architectures augment the usual task loss with one or more regularization term, typically including an image reconstruction error, and train jointly. A key difference with our DRMM-based approach is that these networks do not arise from a proper probabilistic density and as such they must resort to learning the bottom-up recognition and top-down reconstruction weights separately, and they cannot keep track of uncertainty. 3 The Deep Rendering Mixture Model: Capturing Nuisance Variation Although we focus on the DRMM in this paper, we define and explore several other interesting variants, including the Deep Rendering Factor Model (DRFM) and the Evolutionary DRMM (EDRMM), both of which are discussed in more detail in [16] and the Appendix. The E-DRMM is particularly important, since its max-sum inference algorithm yields a decision tree of the type employed in a random decision forest classifier[5]. 2 ... I cL gL gL−1 g1 I z g a c I g a c Rendering Mixture Model Rendering Factor Model Deep Rendering Mixture Model A B zL zL−1 z1 C Deep Sparse Path Model Figure 1: Graphical model depiction of (A) the Shallow Rendering Models and (B) the DRMM. All dependence on pixel location x has been suppressed for clarity. (C) The Sparse Sum-over-Paths formulation of the DRMM. A rendering path contributes only if it is active (green arrows). 3.1 The (Shallow) Rendering Mixture Model The RMM is a generative probabilistic model for images that explicitly models the relationship between images I of the same object c subject to nuisance g 2 G, where G is the set of all nuisances (see Fig. 1A for the graphical model depiction). c ⇠Cat({⇡c}c2C), g ⇠Cat({⇡g}g2G), a ⇠Bern({⇡a}a2A), I = aµcg + noise. (1) Here, µcg is a template that is a function of the class c and the nuisance g. The switching variable a 2 A = {ON, OFF} determines whether or not to render the template at a particular patch; a sparsity prior on a thus encourages each patch to have a few causes. The noise distribution is from the exponential family, but without loss of generality we illustrate below using Gaussian noise N(0, σ21). We assume that the noise is i.i.d. as a function of pixel location x and that the class and nuisance variables are independently distributed according to categorical distributions. (Independence is merely a convenience for the development; in practice, g can depend on c.) Finally, since the world is spatially varying and an image can contain a number of different objects, it is natural to break the image up into a number of patches, that are centered on a single pixel x. The RMM described in (1) then applies at the patch level, where c, g, and a depend on pixel/patch location x. We will omit the dependence on x when it is clear from context. Inference in the Shallow RMM Yields One Layer of a DCN. We now connect the RMM with the computations in one layer of a deep convolutional network (DCN). To perform object recognition with the RMM, we must marginalize out the nuisance variables g and a. Maximizing the log-posterior over g 2 G and a 2 A and then choosing the most likely class yields the max-sum classifier ˆc(I) = argmax c2C max g2G max a2A ln p(I|c, g, a) + ln p(c, g, a) (2) that computes the most likely global configuration of target and nuisance variables for the image. Assuming that Gaussian noise is added to the template, the image is normalized so that kIk2 = 1, and c, g are uniformly distributed, (2) becomes ˆc(I) ⌘argmax c2C max g2G max a2A a(hwcg|Ii + bcg) + ba = argmax c2C max g2G ReLu(hwcg|Ii + bcg) + b0 (3) where ReLU(u) ⌘(u)+ = max{u, 0} is the soft-thresholding operation performed by the rectified linear units in modern DCNs. Here we have reparameterized the RMM model from the moment parameters ✓⌘{σ2, µcg, ⇡a} to the natural parameters ⌘(✓) ⌘{wcg ⌘ 1 σ2 µcg, bcg ⌘ − 1 2σ2 kµcgk2 2, ba ⌘ln p(a) = ln ⇡a, b0 ⌘ln ⇣ p(a=1) p(a=0) ⌘ . The relationships ⌘(✓) are referred to as the generative parameter constraints. 3 We now demonstrate that the sequence of operations in the max-sum classifier in (3) coincides exactly with the operations involved in one layer of a DCN: image normalization, linear template matching, thresholding, and max pooling. First, the image is normalized (by assumption). Second, the image is filtered with a set of noise-scaled rendered templates wcg. If we assume translational invariance in the RMM, then the rendered templates wcg yield a convolutional layer in a DCN [10] (see Appendix Lemma A.2). Third, the resulting activations (log-probabilities of the hypotheses) are passed through a pooling layer; if g is a translational nuisance, then taking the maximum over g corresponds to max pooling in a DCN. Fourth, since the switching variables are latent (unobserved), we max-marginalize over them during classification. This leads to the ReLU operation (see Appendix Proposition A.3). 3.2 The Deep Rendering Mixture Model: Capturing Levels of Abstraction Marginalizing over the nuisance g 2 G in the RMM is intractable for modern datasets, since G will contain all configurations of the high-dimensional nuisance variables g. In response, we extend the RMM into a hierarchical Deep Rendering Mixture Model (DRMM) by factorizing g into a number of different nuisance variables g(1), g(2), . . . , g(L) at different levels of abstraction. The DRMM image generation process starts at the highest level of abstraction (` = L), with the random choice of the object class c(L) and overall nuisance g(L). It is then followed by random choices of the lower-level details g(`) (we absorb the switching variable a into g for brevity), progressively rendering more concrete information level-by-level (` ! `−1), until the process finally culminates in a fully rendered D-dimensional image I (` = 0). Generation in the DRMM takes the form: c(L) ⇠Cat({⇡c(L)}), g(`) ⇠Cat({⇡g(`)}) 8` 2 [L] (4) µc(L)g ⌘⇤gµc(L) ⌘⇤(1) g(1)⇤(2) g(2) · · · ⇤(L−1) g(L−1)⇤(L) g(L)µc(L) (5) I ⇠N(µc(L)g, ⌘σ21D), (6) where the latent variables, parameters, and helper variables are defined in full detail in Appendix B. The DRMM is a deep Gaussian Mixture Model (GMM) with special constraints on the latent variables. Here, c(L) 2 CL and g(`) 2 G`, where CL is the set of target-relevant nuisance variables, and G` is the set of all target-irrelevant nuisance variables at level `. The rendering path is defined as the sequence (c(L), g(L), . . . , g(`), . . . , g(1)) from the root (overall class) down to the individual pixels at ` = 0. µc(L)g is the template used to render the image, and ⇤g ⌘Q ` ⇤g(`) represents the sequence of local nuisance transformations that partially render finer-scale details as we move from abstract to concrete. Note that each ⇤(`) g(`) is an affine transformation with a bias term ↵(`) g(`) that we have suppressed for clarity. Fig. 1B illustrates the corresponding graphical model. As before, we have suppressed the dependence of g(`) on the pixel location x(`) at level ` of the hierarchy. Sum-Over-Paths Formulation of the DRMM. We can rewrite the DRMM generation process by expanding out the matrix multiplications into scalar products. This yields an interesting new perspective on the DRMM, as each pixel intensity Ix = P p λ(L) p a(L) p · · · λ(1) p a(1) p is the sum over all active paths to that pixel, of the product of weights along that path. A rendering path p is active iff every switch on the path is active i.e. Q ` a(`) p = 1 . While exponentially many possible rendering paths exist, only a very small fraction, controlled by the sparsity of a, are active. Fig. 1C depicts the sum-over-paths formulation graphically. Recursive and Nonnegative Forms. We can rewrite the DRMM into a recursive form as z(`) = ⇤(`+1) g(`+1)z(`+1), where z(L) ⌘µc(L) and z(0) ⌘I. We refer to the helper latent variables z(`) as intermediate rendered templates. We also define the Nonnegative DRMM (NN-DRMM) as a DRMM with an extra nonnegativity constraint on the intermediate rendered templates, z(`) ≥08` 2 [L]. The latter is enforced in training via the use of a ReLu operation in the top-down reconstruction phase of inference. Throughout the rest of the paper, we will focus on the NN-DRMM, leaving the unconstrained DRMM for future work. For brevity, we will drop the NN prefix. Factor Model. We also define and explore a variant of the DRMM that where the top-level latent variable is Gaussian: z(L+1) ⇠N(0, 1d) 2 Rd and the recursive generation process is otherwise identical to the DRMM: z(`) = ⇤(`+1) g(`+1)z(`+1) where g(L+1) ⌘c(L). We call this the Deep Rendering Factor Model (DRFM). The DRFM is closely related to the Spike-and-Slab Sparse Coding model [22]. Below we explore some training results, but we leave most of the exploration for future work. (see Fig. 3 in Appendix C for architecture of the RFM, the shallow version of the DRFM) 4 Number of Free Parameters. Compared to the shallow RMM, which has D |CL| Q ` |G`| parameters, the DRMM has only P ` |G`+1|D`D`+1 parameters, an exponential reduction in the number of free parameters (Here GL+1 ⌘CL and D` is the number of units in the `-th layer with D0 ⌘D). This enables efficient inference, learning, and better generalization. Note that we have assumed dense (fully connected) ⇤g’s here; if we impose more structure (e.g. translation invariance), the number of parameters will be further reduced. Bottom-Up Inference. As in the shallow RMM, given an input image I the DRMM classifier infers the most likely global configuration {c(L), g(`)}, ` = 0, 1, . . . , L by executing the max-sum/product message passing algorithm in two stages: (i) bottom-up (from fine-to-coarse) to infer the overall class label ˆc(L) and (ii) top-down (from coarse-to-fine) to infer the latent variables ˆg(`) at all intermediate levels `. First, we will focus on the fine-to-coarse pass since it leads directly to DCNs. Using (3), the fine-to-coarse NN-DRMM inference algorithm for inferring the most likely cateogry ˆcL is given by argmax c(L)2C max g2G µT c(L)gI = argmax c(L)2C max g2G µT c(L) 1 Y `=L ⇤T g(`)I = argmax c(L)2C µT c(L) max g(L)2GL ⇤T g(L) · · · max g(1)2G1 ⇤T g(1)|I | {z } ⌘I1 = · · · ⌘argmax c(L)2C µT c(L)I(L). (7) Here, we have assumed the bias terms ↵g(`) = 0. In the second line, we used the max-product algorithm (distributivity of max over products i.e. for a > 0, max{ab, ac} = a max{b, c}). See Appendix B for full details. This enables us to rewrite (7) recursively: I(`+1) ⌘ max g(`+1)2G`+1 (⇤g(`+1))T | {z } ⌘W (`+1) I(`) = MaxPool(ReLu(Conv(I(`)))), (8) where I(`) is the output feature maps of layer `, I(0) ⌘I and W (`) are the filters/weights for layer `. Comparing to (3), we see that the `-th iteration of (7) and (8) corresponds to feedforward propagation in the `-th layer of a DCN. Thus a DCN’s operation has a probabilistic interpretation as fine-to-coarse inference of the most probable configuration in the DRMM. Top-Down Inference. A unique contribution of our generative model-based approach is that we have a principled derivation of a top-down inference algorithm for the NN-DRMM (Appendix B). The resulting algorithm amounts to a simple top-down reconstruction term ˆIn = ⇤ˆgnµˆc(L) n . Discriminative Relaxations: From Generative to Discriminative Classifiers. We have constructed a correspondence between the DRMM and DCNs, but the mapping is not yet complete. In particular, recall the generative constraints on the weights and biases. DCNs do not have such constraints — their weights and biases are free parameters. As a result, when faced with training data that violates the DRMM’s underlying assumptions, the DCN will have more freedom to compensate. In order to complete our mapping from the DRMM to DCNs, we relax these parameter constraints, allowing the weights and biases to be free and independent parameters. We refer to this process as a discriminative relaxation of a generative classifier ([15, 4], see the Appendix D for details). 3.3 Learning the Deep Rendering Model via the Expectation-Maximization (EM) Algorithm We describe how to learn the DRMM parameters from training data via the hard EM algorithm in Algorithm 1. The DRMM E-Step consists of bottom-up and top-down (reconstruction) E-steps at each layer ` in the model. The γncg ⌘p(c, g|In; ✓) are the responsibilities, where for brevity we have absorbed a into g. The DRMM M-step consists of M-steps for each layer ` in the model. The per-layer M-step in turn consists of a responsibility-weighted regression, where GLS(yn ⇠xn) denotes the solution to a generalized Least Squares regression problem that predict targets yn from predictors xn and is closely related to the SVD. The Iversen bracket is defined as JbK ⌘1 if expression b is true and is 0 otherwise. There are several interesting and useful features of the EM algorithm. First, we note that it is a derivative-free alternative to the back propagation algorithm for training that is both intuitive and potentially much faster (provided a good implementation for the GLS problem). Second, it is easily parallelized over layers, since the M-step updates each layer separately (model parallelism). Moreover, it can be extended to a batch version so that at each iteration the model is 5 Algorithm 1 Hard EM and EG Algorithms for the DRMM E-step: ˆcn, ˆgn = argmax c,g γncg M-step: ˆ⇤g(`) = GLS |{z} ⇣ I(`−1) n ⇠ˆz(`) n | g(`) = ˆg(`) n ⌘ 8g(`) G-step: ∆ˆ⇤g(`) / r⇤g(`) `DRMM(✓) simultaneously updated using separate subsets of the data (data parallelism). This will enable training to be distributed easily across multiple machines. In this vein, our EM algorithm shares several features with the ADMM-based Bregman iteration algorithm in [28]. However, the motivation there is from an optimization perspective and so the resulting training algorithm is not derived from a proper probabilistic density. Third, it is far more interpretable via its connections to (deep) sparse coding and to the hard EM algorithm for GMMs. The sum-over-paths formulation makes it particularly clear that the mixture components are paths (from root to pixels) in the DRMM. G-step. For the training results in this paper, we use the Generalized EM algorithm wherein we replace the M-step with a gradient descent based G-step (see Algorithm 1). This is useful for comparison with backpropagation-based training and for ease of implementation. Flexibility and Extensibility. Since we can choose different priors/types for the nuisances g, the larger DRMM family could be useful for modeling a wider range of inputs, including scenes, speech and text. The EM algorithm can then be used to train the whole system end-to-end on different sources/modalities of labeled and unlabeled data. Moreover, the capability to sample from the model allows us to probe what is captured by the DRMM, providing us with principled ways to improve the model. And finally, in order to properly account for noise/uncertainty, it is possible in principle to extend this algorithm into a soft EM algorithm. We leave these interesting extensions for future work. 3.4 New Insights into Deep Convnets DCNs are Message Passing Networks. The convolution, Max-Pooling and ReLu operations in a DCN correspond to max-sum/product inference in a DRMM. Note that by “max-sum-product” we mean a novel combination of max-sum and max-product as described in more detail in the proofs in the Appendix. Thus, we see that architectures and layer types commonly used in today’s DCNs can be derived from precise probabilistic assumptions that entirely determine their structure. The DRMM therefore unifies two perspectives — neural network and probabilistic inference (see Table 2 in the Appendix for details). Shortcomings of DCNs. DCNs perform poorly in categorizing transparent objects [20]. This might be explained by the fact that transparent objects generate pixels that have multiple sources, conflicting with the DRMM sparsity prior on a, which encourages few sources. DCNs also fail to classify slender and man-made objects [20]. This is because of the locality imposed by the locallyconnected/convolutional layers, or equivalently, the small size of the template µc(L)g in the DRMM. As a result, DCNs fail to model long-range correlations. Class Appearance Models and Activity Maximization. The DRMM enables us to understand how trained DCNs distill and store knowledge from past experiences in their parameters. Specifically, the DRMM generates rendered templates µc(L)g via a mixture of products of affine transformations, thus implying that class appearance models in DCNs are stored in a similar factorized-mixture form over multiple levels of abstraction. As a result, it is the product of all the filters/weights over all layers that yield meaningful images of objects (Eq. 6). We can also shed new light on another approach to understanding DCN memories that proceeds by searching for input images that maximize the activity of a particular class unit (say, class of cats) [23], a technique we call activity maximization. Results from activity maximization on a high performance DCN trained on 15 million images is shown in Fig. 1 of [23]. The resulting images reveal much about how DCNs store memories. Using the DRMM, the solution I⇤ c(L) of the activity maximization for class c(L) can be derived as the sum of individual activity-maximizing patches I⇤ Pi, each of which is a function of the learned DRMM parameters (see Appendix E). In particular, I⇤ c(L) ⌘P Pi2P I⇤ Pi(c(L), g⇤ Pi) / P Pi2P µ(c(L), g⇤ Pi). 6 Layer& Accuracy&Rate& Figure 2: Information about latent nuisance variables at each layer (Left), training results from EG for RFM (Middle) and DRFM (Right) on MNIST, as compared to DCNs of the same configuration. This implies that I⇤ c(L) contains multiple appearances of the same object but in various poses. Each activity-maximizing patch has its own pose g⇤ Pi, consistent with Fig. 1 of [23] and our own extensive experiments with AlexNet, VGGNet, and GoogLeNet (data not shown). Such images provide strong confirmational evidence that the underlying model is a mixture over nuisance parameters, as predcted by the DRMM. Unsupervised Learning of Latent Task Nuisances. A key goal of representation learning is to disentangle the factors of variation that contribute to an image’s appearance. Given our formulation of the DRMM, it is clear that DCNs are discriminative classifiers that capture these factors of variation with latent nuisance variables g. As such, the theory presented here makes a clear prediction that for a DCN, supervised learning of task targets will lead to unsupervised learning of latent task nuisance variables. From the perspective of manifold learning, this means that the architecture of DCNs is designed to learn and disentangle the intrinsic dimensions of the data manifolds. In order to test this prediction, we trained a DCN to classify synthetically rendered images of naturalistic objects, such as cars and cats, with variation in factors such as location, pose, and lighting. After training, we probed the layers of the trained DCN to quantify how much linearly decodable information exists about the task target c(L) and latent nuisance variables g. Fig. 2 (Left) shows that the trained DCN possesses significant information about latent factors of variation and, furthermore, the more nuisance variables, the more layers are required to disentangle the factors. This is strong evidence that depth is necessary and that the amount of depth required increases with the complexity of the class models and the nuisance variations. 4 Experimental Results We evaluate the DRMM and DRFM’s performance on the MNIST dataset, a standard digit classification benchmark with a training set of 60,000 28 ⇥28 labeled images and a test set of 10,000 labeled images. We also evaluate the DRMM’s performance on CIFAR10, a dataset of natural objects which include a training set of 50,000 32 ⇥32 labeled images and a test set of 10,000 labeled images. In all experiments, we use a full E-step that has a bottom-up phase and a principled top-down reconstruction phase. In order to approximate the class posterior in the DRMM, we include a Kullback-Leibler divergence term between the inferred posterior p(c|I) and the true prior p(c) as a regularizer [9]. We also replace the M-step in the EM algorithm of Algorithm 1 by a G-step where we update the model parameters via gradient descent. This variant of EM is known as the Generalized EM algorithm [3], and here we refer to it as EG. All DRMM experiments were done with the NN-DRMM. Configurations of our models and the corresponding DCNs are provided in the Appendix I. Supervised Training. Supervised training results are shown in Table 3 in the Appendix. Shallow RFM: The 1-layer RFM (RFM sup) yields similar performance to a Convnet of the same configuration (1.21% vs. 1.30% test error). Also, as predicted by the theory of generative vs discriminative classifiers, EG training converges 2-3x faster than a DCN (18 vs. 40 epochs to reach 1.5% test error, Fig. 2, middle). Deep RFM: Training results from an initial implementation of the 2-layer DRFM EG algorithm converges 2 −3⇥faster than a DCN of the same configuration, while achieving a similar asymptotic test error (Fig. 2, Right). Also, for completeness, we compare supervised training for a 5-layer DRMM with a corresponding DCN, and they show comparable accuracy (0.89% vs 0.81%, Table 3). 7 Unsupervised Training. We train the RFM and the 5-layer DRMM unsupervised with NU images, followed by an end-to-end re-training of the whole model (unsup-pretr) using NL labeled images. The results and comparison to the SWWAE model are shown in Table 1. The DRMM model outperforms the SWWAE model in both scenarios (Filters and reconstructed images from the RFM are available in the Appendix 4.) Table 1: Comparison of Test Error rates (%) between best DRMM variants and other best published results on MNIST dataset for the semi-supervised setting (taken from [31]) with NU = 60K unlabeled images, of which NL 2 {100, 600, 1K, 3K} are labeled. Model NL = 100 NL = 600 NL = 1K NL = 3K Convnet [10] 22.98 7.86 6.45 3.35 MTC [18] 12.03 5.13 3.64 2.57 PL-DAE [11] 10.49 5.03 3.46 2.69 WTA-AE [13] 2.37 1.92 SWWAE dropout [31] 8.71 ± 0.34 3.31 ± 0.40 2.83 ± 0.10 2.10 ± 0.22 M1+TSVM [8] 11.82 ± 0.25 5.72 4.24 3.49 M1+M2 [8] 3.33 ± 0.14 2.59 ± 0.05 2.40 ± 0.02 2.18 ± 0.04 Skip Deep Generative Model [12] 1.32 LadderNetwork [17] 1.06 ± 0.37 0.84 ± 0.08 Auxiliary Deep Generative Model [12] 0.96 catGAN [25] 1.39 ± 0.28 ImprovedGAN [21] 0.93 ± 0.065 RFM 14.47 5.61 4.67 2.96 DRMM 2-layer semi-sup 11.81 3.73 2.88 1.72 DRMM 5-layer semi-sup 3.50 1.56 1.67 0.91 DRMM 5-layer semi-sup NN+KL 0.57 − − − SWWAE unsup-pretr [31] 9.80 6.135 4.41 RFM unsup-pretr 16.2 5.65 4.64 2.95 DRMM 5-layer unsup-pretr 12.03 3.61 2.73 1.68 Semi-Supervised Training. For semi-supervised training, we use a randomly chosen subset of NL = 100, 600, 1K, and 3K labeled images and NU = 60K unlabeled images from the training and validation set. Results are shown in Table 1 for a RFM, a 2-layer DRMM and a 5-layer DRMM with comparisons to related work. The DRMMs performs comparably to state-of-the-art models. Specially, the 5-layer DRMM yields the best results when NL = 3K and NL = 600 while results in the second best result when NL = 1K. We also show the training results of a 9-layer DRMM on CIFAR10 in Table 4 in Appendix H. The DRMM yields comparable results on CIFAR10 with the best semi-supervised methods. For more results and comparison with other works, see Appendix H. 5 Conclusions Understanding successful deep vision architectures is important for improving performance and solving harder tasks. In this paper, we have introduced a new family of hierarchical generative models, whose inference algorithms for two different models reproduce deep convnets and decision trees, respectively. Our initial implementation of the DRMM EG algorithm outperforms DCN backpropagation in both supervised and unsupervised classification tasks and achieves comparable/stateof-the-art performance on several semi-supervised classification tasks, with no architectural hyperparameter tuning. Acknowledgments. Thanks to Xaq Pitkow and Ben Poole for helpful feedback. ABP and RGB were supported by IARPA via DoI/IBC contract D16PC00003. 1 RGB was supported by NSF CCF-1527501, AFOSR FA9550-14-1-0088, ARO W911NF-15-1-0316, and ONR N00014-12-10579. TN was supported by an NSF Graduate Reseach Fellowship and NSF IGERT Training Grant (DGE-1250104). 1The U.S. Government is authorized to reproduce and distribute reprints for Governmental purposes notwithstanding any copyright annotation thereon. Disclaimer: The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of IARPA, DoI/IBC, or the U.S. Government. 8 References [1] F. Anselmi, J. Z. Leibo, L. Rosasco, J. Mutch, A. Tacchetti, and T. Poggio. Magic materials: a theory of deep hierarchical architectures for learning sensory representations. MIT CBCL Technical Report, 2013. [2] S. Arora, A. Bhaskara, R. Ge, and T. Ma. Provable bounds for learning some deep representations. arXiv preprint arXiv:1310.6343, 2013. [3] C. M. Bishop. Pattern Recognition and Machine Learning, volume 4. Springer New York, 2006. [4] C. M. Bishop, J. Lasserre, et al. Generative or discriminative? getting the best of both worlds. Bayesian Statistics, 8:3–24, 2007. [5] L. Breiman. Random forests. Machine learning, 45(1):5–32, 2001. [6] J. Bruna and S. Mallat. Invariant scattering convolution networks. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(8):1872–1886, 2013. [7] I. J. Goodfellow, D. Warde-Farley, M. Mirza, A. Courville, and Y. Bengio. Maxout networks. arXiv preprint arXiv:1302.4389, 2013. [8] D. P. Kingma, S. Mohamed, D. J. Rezende, and M. Welling. Semi-supervised learning with deep generative models. In Advances in Neural Information Processing Systems, pages 3581–3589, 2014. [9] D. P. Kingma and M. Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. [10] 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. [11] D.-H. Lee. Pseudo-label: The simple and efficient semi-supervised learning method for deep neural networks. In Workshop on Challenges in Representation Learning, ICML, volume 3, 2013. [12] L. Maaløe, C. K. Sønderby, S. K. Sønderby, and O. Winther. Auxiliary deep generative models. arXiv preprint arXiv:1602.05473, 2016. [13] A. Makhzani and B. J. Frey. Winner-take-all autoencoders. In Advances in Neural Information Processing Systems, pages 2773–2781, 2015. [14] G. F. Montufar, R. Pascanu, K. Cho, and Y. Bengio. On the number of linear regions of deep neural networks. In Advances in Neural Information Processing Systems, pages 2924–2932, 2014. [15] A. Ng and M. Jordan. On discriminative vs. generative classifiers: A comparison of logistic regression and naive bayes. Advances in neural information processing systems, 14:841, 2002. [16] A. B. Patel, T. Nguyen, and R. G. Baraniuk. A probabilistic theory of deep learning. arXiv preprint arXiv:1504.00641, 2015. [17] A. Rasmus, M. Berglund, M. Honkala, H. Valpola, and T. Raiko. Semi-supervised learning with ladder networks. In Advances in Neural Information Processing Systems, pages 3532–3540, 2015. [18] S. Rifai, Y. N. Dauphin, P. Vincent, Y. Bengio, and X. Muller. The manifold tangent classifier. In Advances in Neural Information Processing Systems, pages 2294–2302, 2011. [19] S. Rifai, P. Vincent, X. Muller, X. Glorot, and Y. Bengio. Contractive auto-encoders: Explicit invariance during feature extraction. In Proceedings of the 28th international conference on machine learning (ICML-11), pages 833–840, 2011. [20] 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. International Journal of Computer Vision, 115(3):211–252, 2015. [21] T. Salimans, I. Goodfellow, W. Zaremba, V. Cheung, A. Radford, and X. Chen. Improved techniques for training gans. arXiv preprint arXiv:1606.03498, 2016. [22] A.-S. Sheikh, J. A. Shelton, and J. Lücke. A truncated em approach for spike-and-slab sparse coding. Journal of Machine Learning Research, 15(1):2653–2687, 2014. [23] K. Simonyan, A. Vedaldi, and A. Zisserman. Deep inside convolutional networks: Visualising image classification models and saliency maps. arXiv preprint arXiv:1312.6034, 2013. [24] S. Soatto and A. Chiuso. Visual representations: Defining properties and deep approximations. In International Conference on Learning Representations, 2016. [25] J. T. Springenberg. Unsupervised and semi-supervised learning with categorical generative adversarial networks. arXiv preprint arXiv:1511.06390, 2015. [26] J. T. Springenberg, A. Dosovitskiy, T. Brox, and M. Riedmiller. Striving for simplicity: The all convolutional net. arXiv preprint arXiv:1412.6806, 2014. [27] Y. Tang, R. Salakhutdinov, and G. Hinton. Deep mixtures of factor analysers. arXiv preprint arXiv:1206.4635, 2012. [28] G. Taylor, R. Burmeister, Z. Xu, B. Singh, A. Patel, and T. Goldstein. Training neural networks without gradients: A scalable admm approach. arXiv preprint arXiv:1605.02026, 2016. [29] A. van den Oord and B. Schrauwen. Factoring variations in natural images with deep gaussian mixture models. In Advances in Neural Information Processing Systems, pages 3518–3526, 2014. [30] V. N. Vapnik and V. Vapnik. Statistical learning theory, volume 1. Wiley New York, 1998. [31] J. Zhao, M. Mathieu, R. Goroshin, and Y. LeCun. Stacked what-where autoencoders. arXiv preprint arXiv:1506.02351, 2016. 9 | 2016 | 454 |
6,388 | Without-Replacement Sampling for Stochastic Gradient Methods Ohad Shamir Department of Computer Science and Applied Mathematics Weizmann Institute of Science Rehovot, Israel ohad.shamir@weizmann.ac.il Abstract Stochastic gradient methods for machine learning and optimization problems are usually analyzed assuming data points are sampled with replacement. In contrast, sampling without replacement is far less understood, yet in practice it is very common, often easier to implement, and usually performs better. In this paper, we provide competitive convergence guarantees for without-replacement sampling under several scenarios, focusing on the natural regime of few passes over the data. Moreover, we describe a useful application of these results in the context of distributed optimization with randomly-partitioned data, yielding a nearly-optimal algorithm for regularized least squares (in terms of both communication complexity and runtime complexity) under broad parameter regimes. Our proof techniques combine ideas from stochastic optimization, adversarial online learning and transductive learning theory, and can potentially be applied to other stochastic optimization and learning problems. 1 Introduction Many canonical machine learning problems boil down to solving a convex empirical risk minimization problem of the form min w∈W F(w) = 1 m m X i=1 fi(w), (1) where each individual function fi(·) is convex (e.g. the loss on a given example in the training data), and the set W ⊆Rd is convex. In large-scale applications, where both m, d can be huge, a very popular approach is to employ stochastic gradient methods. Generally speaking, these methods maintain some iterate wt ∈W, and at each iteration, sample an individual function fi(·), and perform some update to wt based on ∇fi(wt). Since the update is with respect to a single function, this update is usually computationally cheap. Moreover, when the sampling is done independently and uniformly at random, ∇fi(wt) is an unbiased estimator of the true gradient ∇F(wt), which allows for good convergence guarantees after a reasonable number of iterations (see for instance [18, 15]). However, in practical implementations of such algorithms, it is actually quite common to use withoutreplacement sampling, or equivalently, pass sequentially over a random shuffling of the functions fi. Intuitively, this forces the algorithm to process more equally all data points, and often leads to better empirical performance. Moreover, without-replacement sampling is often easier and faster to implement, as it requires sequential data access, as opposed to the random data access required by with-replacement sampling (see for instance [3, 16, 8]). 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. 1.1 What is Known so Far? Unfortunately, without-replacement sampling is not covered well by current theory. The challenge is that unlike with-replacement sampling, the functions processed at every iteration are not statistically independent, and their correlations are difficult to analyze. Since this lack of theory is the main motivation for our paper, we describe the existing known results in some detail, before moving to our contributions. To begin with, there exist classic convergence results which hold deterministically for every order in which the individual functions are processed, and in particular when we process them by sampling without replacement (e.g. [14]). However, these can be exponentially worse than those obtained using random without-replacement sampling, and this gap is inevitable (see for instance [16]). More recently, Recht and Ré [16] studied this problem, attempting to show that at least for least squares optimization, without-replacement sampling is always better (or at least not substantially worse) than with-replacement sampling on a given dataset. They showed this reduces to a fundamental conjecture about arithmetic-mean inequalities for matrices, and provided partial results in that direction, such as when the individual functions themselves are assumed to be generated i.i.d. from some distribution. However, the general question remains open. In a recent breakthrough, Gürbüzbalaban et al. [8] provided a new analysis of gradient descent algorithms for solving Eq. (1) based on random reshuffling: Each epoch, the algorithm draws a new permutation on {1, . . . , m} uniformly at random, and processes the individual functions in that order. Under smoothness and strong convexity assumptions, the authors obtain convergence guarantees of essentially O(1/k2) after k epochs, vs. O(1/k) using with-replacement sampling (with the O(·) notation including certain dependencies on the problem parameters and data size). Thus, withoutreplacement sampling is shown to be strictly better than with-replacement sampling, after sufficiently many passes over the data. However, this leaves open the question of why without-replacement sampling works well after a few – or even just one – passes over the data. Indeed, this is often the regime at which stochastic gradient methods are most useful, do not require repeated data reshuffling, and their good convergence properties are well-understood in the with-replacement case. 1.2 Our Results In this paper, we provide convergence guarantees for stochastic gradient methods, under several scenarios, in the natural regime where the number of passes over the data is small, and in particular that no data reshuffling is necessary. We emphasize that our goal here will be more modest than those of [16, 8]: Rather than show superiority of without-replacement sampling, we only show that it will not be significantly worse (in a worst-case sense) than with-replacement sampling. Nevertheless, such guarantees are novel, and still justify the use of with-replacement sampling, especially in situations where it is advantageous due to data access constraints or other reasons. Moreover, these results have a useful application in the context of distributed learning and optimization, as we will shortly describe. Our main contributions can be summarized as follows: • For convex functions on some convex domain W, we consider algorithms which perform a single pass over a random permutation of m individual functions, and show that their suboptimality can be characterized by a combination of two quantities, each from a different field: First, the regret which the algorithm can attain in the setting of adversarial online convex optimization [17, 9], and second, the transductive Rademacher complexity of W with respect to the individual functions, a notion stemming from transductive learning theory [22, 6]. • As a concrete application of the above, we show that if each function fi(·) corresponds to a convex Lipschitz loss of a linear predictor, and the algorithm belongs to the class of algorithms which in the online setting attain O( √ T) regret on T such functions (which includes, for example, stochastic gradient descent), then the suboptimality using without-replacement sampling, after processing T functions, is O(1/ √ T). Up to numerical constants, the guarantee is the same as that obtained using with-replacement sampling. • We turn to consider more specifically the stochastic gradient descent algorithm, and show that if the objective function F(·) is λ-strongly convex, and the functions fi(·) are also smooth, then the suboptimality bound becomes O(1/λT), which matches the with-replacement guarantees 2 (although with replacement, smoothness is not needed, and the dependence on some parameters hidden in the O(·) is somewhat better). • In recent years, a new set of fast stochastic algorithms to solve Eq. (1) has emerged, such as SAG, SDCA, SVRG, and quite a few other variants. These algorithms are characterized by cheap stochastic iterations, involving computations of individual function gradients, yet unlike traditional stochastic algorithms, enjoy a linear convergence rate (runtime scaling logarithmically with the required accuracy). To the best of our knowledge, all existing analyses require sampling with replacement. We consider a representative algorithm from this set, namely SVRG, and the problem of regularized least squares, and show that similar guarantees can be obtained using without-replacement sampling. This result has a potentially interesting implication: Under the mild assumption that the problem’s condition number is smaller than the data size, we get that SVRG can converge to an arbitrarily accurate solution (even up to machine precision), without the need to reshuffle the data – only a single shuffle at the beginning suffices. Thus, at least for this problem, we can obatin fast and high-quality solutions even if random data access is expensive. • A further application of the SVRG result is in the context of distributed learning: By simulating without-replacement SVRG on data randomly partitioned between several machines, we get a nearly-optimal algorithm for regularized least squares, in terms of communication and computational complexity, as long as the condition number is smaller than the data size per machine (up to logarithmic factors). This builds on the work of Lee et al. [13], who were the first to recognize the applicability of SVRG to distributed optimization. However, their results relied on with-replacement sampling, and are applicable only for much smaller condition numbers. We note that our focus is on scenarios where no reshufflings are necessary. In particular, the O(1/ √ T) and O(1/λT) bounds apply for all T ∈{1, 2, . . . , m}, namely up to one full pass over a random permutation of the entire data. However, our techniques are also applicable to a constant (> 1) number of passes, by randomly reshuffling the data after every pass. In a similar vein, our SVRG result can be readily extended to a situation where each epoch of the algorithm is done on an independent permutation of the data. We leave a full treatment of this to future work. 2 Preliminaries and Notation We use bold-face symbols to denote vectors. Given a vector w, wi denotes it’s i-th coordinate. We utilize the standard O(·), Θ(·), Ω(·) notation to hide constants, and ˜O, ˜Θ(·), ˜Ω(·) to hide constants and logarithmic factors. Given convex functions f1(·), f2(·), . . . , fm(·) from Rd to R, we define our objective function F : Rd →R as F(w) = 1 m m X i=1 fi(w), with some fixed optimum w∗∈arg minw∈W F(w). In machine learning applications, each individual fi(·) usually corresponds to a loss with respect to a data point, hence will use the terms “individual function”, “loss function” and “data point” interchangeably throughout the paper. We let σ be a permutation over {1, . . . , m} chosen uniformly at random. In much of the paper, we consider methods which draw loss functions without replacement according to that permutation (that is, fσ(1)(·), fσ(2)(·), fσ(3)(·), . . .). We will use the shorthand notation F1:t−1(·) = 1 t −1 t−1 X i=1 fσ(i)(·) , Ft:m(·) = 1 m −t + 1 m X i=t fσ(i)(·) to denote the average loss with respect to the first t −1 and last m −t + 1 loss functions respectively, as ordered by the permutation (intuitively, the losses in F1:t−1(·) are those already observed by the algorithm at the beginning of iteration t, whereas the losses in Ft:m(·) are those not yet observed). We use the convention that F1:1(·) ≡0, and the same goes for other expressions of the form 1 t−1 Pt−1 i=1 · · · throughout the paper, when t = 1. We also define quantities such as ∇F1:t−1(·) and ∇Ft:m(·) similarly. 3 A function f : Rd → R is λ-strongly convex, if for any w, w′, f(w′) ≥ f(w) + ⟨g, w′ −w⟩+ λ 2 ∥w′ −w∥2, where g is any (sub)-gradient of f at w, and is µ-smooth if for any w, w′, f(w′) ≤ f(w) + ⟨g, w′ −w⟩+ µ 2 ∥w′ −w∥2. µ-smoothness also implies that the function f is differentiable, and its gradient is µ-Lipschitz. Based on these properties, it is easy to verify that if w∗∈arg min f(w), and f is λ-strongly convex and µ-smooth, then λ 2 ∥w −w∗∥2 ≤f(w) −f(w∗) ≤ µ 2 ∥w −w∗∥2. We will also require the notion of trandsuctive Rademacher complexity, as developed by El-Yaniv and Pechyony [6, Definition 1], with a slightly different notation adapted to our setting: Definition 1. Let V be a set of vectors v = (v1, . . . , vm) in Rm. Let s, u be positive integers such that s + u = m, and denote p := su (s+u)2 ∈(0, 1/2). We define the transductive Rademacher Complexity Rs,u(V) as Rs,u(V) = 1 s + 1 u · Er1,...,rm [supv∈V Pm i=1 rivi] , where r1, . . . , rm are i.i.d. random variables such that ri = 1 or −1 with probability p, and ri = 0 with probability 1 −2p. This quantity is an important parameter is studying the richness of the set V, and will prove crucial in providing some of the convergence results presented later on. Note that it differs slightly from standard Rademacher complexity, which is used in the theory of learning from i.i.d. data, where the Rademacher variables ri only take −1, +1 values, and (1/s + 1/u) is replaced by 1/m). 3 Convex Lipschitz Functions We begin by considering loss functions f1(·), f2(·), . . . , fm(·) which are convex and L-Lipschitz over some convex domain W. We assume the algorithm sequentially goes over some permuted ordering of the losses, and before processing the t-th loss function, produces an iterate wt ∈W. Moreover, we assume that the algorithm has a regret bound in the adversarial online setting, namely that for any sequence of T convex Lipschitz losses f1(·), . . . , fT (·), and any w ∈W, T X t=1 ft(wt) − T X t=1 ft(w) ≤RT for some RT scaling sub-linearly in T 1. For example, online gradient descent (which is equivalent to stochastic gradient descent when the losses are i.i.d.), with a suitable step size, satisfies RT = O(BL √ T), where L is the Lipschitz parameter and B upper bounds the norm of any vector in W. A similar regret bound can also be shown for other online algorithms (see [9, 17, 23]). Since the ideas used for analyzing this setting will also be used in the more complicated results which follow, we provide the analysis in some detail. We first have the following straightforward theorem, which upper bounds the expected suboptimality in terms of regret and the expected difference between the average loss on prefixes and suffixes of the data. Theorem 1. Suppose the algorithm has a regret bound RT , and sequentially processes fσ(1)(·), . . . , fσ(T )(·) where σ is a random permutation on {1, . . . , m}. Then in expectation over σ, E " 1 T T X t=1 F(wt) −F(w∗) # ≤RT T + 1 mT T X t=2 (t −1) · E[F1:t−1(wt) −Ft:m(wt)]. The left hand side in the inequality above can be interpreted as an expected bound on F(wt)−F(w∗), where t is drawn uniformly at random from 1, 2, . . . , T. Alternatively, by Jensen’s inequality and the fact that F(·) is convex, the same bound also applies on E[F( ¯wT ) −F(w∗)], where ¯wT = 1 T PT t=1 wt. The proof of the theorem relies on the following simple but key lemma, which expresses the expected difference between with-replacement and without-replacement sampling in an alternative form, similar to Thm. 1 and one which lends itself to tools and ideas from transductive learning theory. This lemma will be used in proving all our main results, and its proof appears in Subsection A.2 1For simplicity, we assume the algorithm is deterministic given f1, . . . , fm, but all results in this section also hold for randomized algorithms (in expectation over the algorithm’s randomness), assuming the expected regret of the algorithm w.r.t. any w ∈W is at most RT . 4 Lemma 1. Let σ be a permutation over {1, . . . , m} chosen uniformly at random. Let s1, . . . , sm ∈R be random variables which conditioned on σ(1), . . . , σ(t −1), are independent of σ(t), . . . , σ(m). Then E 1 m Pm i=1 si −sσ(t) equals t−1 m · E [s1:t−1 −st:m] for t > 1, and 0 for t = 1. Proof of Thm. 1. Adding and subtracting terms, and using the facts that σ is a permutation chosen uniformly at random, and w∗is fixed, E " 1 T T X t=1 F(wt) −F(w∗) # = E " 1 T T X t=1 fσ(t)(wt) −F(w∗) # + E " 1 T T X t=1 F(wt) −fσ(t)(wt) # = E " 1 T T X t=1 fσ(t)(wt) −fσ(t)(w∗) # + E " 1 T T X t=1 F(wt) −fσ(t)(wt) # Applying the regret bound assumption on the sequence of losses fσ(1)(·), . . . , fσ(T )(·), the above is at most RT T + 1 T PT t=1 E F(wt) −fσ(t)(wt) . Since wt (as a random variable over the permutation σ of the data) depends only on σ(1), . . . , σ(t −1), we can use Lemma 1 (where si = fi(wt), and noting that the expectation above is 0 when t = 1), and get that the above equals RT T + 1 mT PT t=2(t− 1) · E[F1:t−1(wt) −Ft:m(wt)]. Having reduced the expected suboptimality to the expected difference E[F1:t−1(wt) −Ft:m(wt)], the next step is to upper bound it with E[supw∈W (F1:t−1(w) −Ft:m(w))]: Namely, having split our loss functions at random to two groups of size t−1 and m−t+1, how large can be the difference between the average loss of any w on the two groups? Such uniform convergence bounds are exactly the type studied in transductive learning theory, where a fixed dataset is randomly split to a training set and a test set, and we consider the generalization performance of learning algorithms ran on the training set. Such results can be provided in terms of the transductive Rademacher complexity of W, and combined with Thm. 1, lead to the following bound in our setting: Theorem 2. Suppose that each wt is chosen from a fixed domain W, that the algorithm enjoys a regret bound RT , and that supi,w∈W |fi(w)| ≤B. Then in expectation over the random permutation σ, E " 1 T T X t=1 F(wt) −F(w∗) # ≤RT T + 1 mT T X t=2 (t −1)Rt−1:m−t+1(V) + 24B √m , where V = {(f1(w), . . . , fm(w) | w ∈W}. Thus, we obtained a generic bound which depends on the online learning characteristics of the algorithm, as well as the statistical learning properties of the class W on the loss functions. The proof (as the proofs of all our results from now on) appears in Section A. We now instantiate the theorem to the prototypical case of bounded-norm linear predictors, where the loss is some convex and Lipschitz function of the prediction ⟨w, x⟩of a predictor w on an instance x, possibly with some regularization: Corollary 1. Under the conditions of Thm. 2, suppose that W ⊆{w : ∥w∥≤¯B}, and each loss function fi has the form ℓi(⟨w, xi⟩) + r(w) for some L-Lipschitz ℓi, ∥xi∥≤1, and a fixed function r. Then E h 1 T PT t=1 F(wt) −F(w∗) i ≤ RT T + 2(12+ √ 2) ¯ BL √m . As discussed earlier, in the setting of Corollary 1, typical regret bounds are on the order of O( ¯BL √ T). Thus, the expected suboptimality is O( ¯BL/ √ T), all the way up to T = m (i.e. a full pass over a random permutation of the data). Up to constants, this is the same as the suboptimality attained by T iterations of with-replacement sampling, using stochastic gradient descent or similar algorithms. 4 Faster Convergence for Strongly Convex Functions We now consider more specifically the stochastic gradient descent algorithm on a convex domain W, which can be described as follows: We initialize at some w1 ∈W, and perform the update steps wt+1 = ΠW(wt −ηtgt), 5 where ηt > 0 are fixed step sizes, ΠW is projection on W, and gt is a subgradient of fσ(t)(·) at wt. Moreover, we assume the objective function F(·) is λ-strongly convex for some λ > 0. In this scenario, using with-replacement sampling (i.e. gt is a subgradient of an independently drawn fi(·)), performing T iterations as above and returning a randomly sampled iterate wt or their average results in expected suboptimality ˜O(G2/λT), where G2 is an upper bound on the expected squared norm of gt [15, 18]. Here, we study a similar situation in the without-replacement case. In the result below, we will consider specifically the case where each fi(w) is a Lipschitz and smooth loss of a linear predictor w, possibly with some regularization. The smoothness assumption is needed to get a good bound on the transductive Rademacher complexity of quantities such as ⟨∇fi(w), w⟩. However, the technique can be potentially applied to more general cases. Theorem 3. Suppose W has diameter B, and that F(·) is λ-strongly convex on W. Assume that fi(w) = ℓi(⟨w, xi⟩) + r(w) where ∥xi∥≤1, r(·) is possibly some regularization term, and each ℓi is L-Lipschitz and µ-smooth on {z : z = ⟨w, x⟩, w ∈W, ∥x∥≤1}. Furthermore, suppose supw∈W ∥∇fi(w)∥≤G. Then for any 1 < T ≤m, if we run SGD for T iterations with step size ηt = 2/λt, we have (for a universal positive constant c) E " 1 T T X t=1 F(wt) −F(w∗) # ≤c · ((L + µB)2 + G2) log(T) λT . As in the results of the previous section, the left hand side is the expected optimality of a single wt where t is chosen uniformly at random, or an upper bound on the expected suboptimality of the average ¯wT = 1 T PT t=1 wt. This result is similar to the with-replacement case, up to numerical constants and the additional (L + µB2) term in the numerator. We note that in some cases, G2 is the dominant term anyway2. However, it is not clear that the (L + µB2) term is necessary, and removing it is left to future work. We also note that the log(T) factor in the theorem can be removed by considering not 1 T PT t=1 F(wt), but rather only an average over some suffix of the iterates, or weighted averaging (see for instance [15, 12, 21], where the same techniques can be applied here). The proof of Thm. 3 is somewhat more challenging than the results of the previous section, since we are attempting to get a faster rate of O(1/T) rather than O(1/ √ T), all the way up to T = m. A significant technical obstacle is that our proof technique relies on concentration of averages around expectations, which on T samples does not go down faster than O(1/ √ T). To overcome this, we apply concentration results not on the function values (i.e. F1:t−1(wt) −Ft:m(wt) as in the previous section), but rather on gradient-iterate inner products, i.e. ⟨∇F1:t−1(wt) −∇Ft:m(wt), wt −w∗⟩, where w∗is the optimal solution. To get good bounds, we need to assume these gradients have a certain structure, which is why we need to make the assumption in the theorem about the form of each fi(·). Using transductive Rademacher complexity tools, we manage to upper bound the expectation of these inner products by quantities roughly of the form q E[∥wt −w∗∥2]/ √ t (assuming here t < m/2 for simplicity). We now utilize the fact that in the strongly convex case, ∥wt −w∗∥itself decreases to zero with t at a certain rate, to get fast rates decreasing as 1/t. 5 Without-Replacement SVRG for Least Squares In this section, we will consider a more sophisticated stochastic gradient approach, namely the SVRG algorithm of [11], designed to solve optimization problems with a finite sum structure as in Eq. (1). Unlike purely stochastic gradient procedures, this algorithm does require several passes over the data. However, assuming the condition number 1/λ is smaller than the data size (assuming each fi(·) is O(1) smooth, and λ is the strong convexity parameter of F(·)), only O(m log(1/ϵ)) gradient evaluations are required to get an ϵ-accurate solution, for any ϵ. Thus, we can get a high-accuracy solution after the equivalent of a small number of data passes. As discussed in the introduction, over the past few years several other algorithms have been introduced and shown to have such a behavior. We will focus on the algorithm in its basic form, where the domain W equals Rd. The existing analysis of SVRG ([11]) assumes stochastic iterations, which involves sampling the data with replacement. Thus, it is natural to consider whether a similar convergence behavior occurs using 2G is generally on the order of L + λB, which is the same as L + µB if L is the dominant term. This happens for instance with the squared loss, whose Lipschitz parameter is on the order of µB. 6 without-replacement sampling. As we shall see, a positive reply has at least two implications: The first is that as long as the condition number is smaller than the data size, SVRG can be used to obtain a high-accuracy solution, without the need to reshuffle the data: Only a single shuffle at the beginning suffices, and the algorithm terminates after a small number of sequential passes (logarithmic in the required accuracy). The second implication is that such without-replacement SVRG can be used to get a nearly-optimal algorithm for convex distributed learning and optimization on randomly partitioned data, as long as the condition number is smaller than the data size at each machine. The SVRG algorithm using without-replacement sampling on a dataset of size m is described as Algorithm 1. It is composed of multiple epochs (indexed by s), each involving one gradient computation on the entire dataset, and T stochastic iterations, involving gradient computations with respect to individual data points. Although the gradient computation on the entire dataset is expensive, it is only needed to be done once per epoch. Since the algorithm will be shown to have linear convergence as a function of the number of epochs, this requires only a small (logarithmic) number of passes over the data. Algorithm 1 SVRG using Without-Replacement Sampling Parameters: η, T, permutation σ on {1, . . . , m} Initialize ˜w1 at 0 for s = 1, 2, . . . do w(s−1)T +1 := ˜ws ˜n := ∇F( ˜ws) = 1 m Pm i=1 ∇fi( ˜ws) for t = (s −1)T + 1, . . . , sT do wt+1 := wt −η ∇fσ(t)(wt) −∇fσ(t)( ˜ws) + ˜n end for Let ˜ws+1 be the average of w(s−1)T +1, . . . , wsT , or one of them drawn uniformly at random. end for We will consider specifically the regularized least mean squares problem, where fi(w) = 1 2 (⟨w, xi⟩−yi)2 + ˆλ 2 ∥w∥2 . (2) for some xi, yi and ˆλ > 0. Moreover, we assume that F(w) = 1 m Pm i=1 fi(w) is λ-strongly convex (note that necessarily λ ≥ˆλ). For convenience, we will assume that ∥xi∥, |yi|, λ are all at most 1 (this is without much loss of generality, since we can always re-scale the loss functions by an appropriate factor). Note that under this assumption, each fi(·) as well as F(·) are also 1 + ˆλ ≤2-smooth. Theorem 4. Suppose each loss function fi(·) corresponds to Eq. (2), where xi ∈Rd, maxi ∥xi∥≤1, maxi |yi| ≤1, ˆλ > 0, and that F(·) is λ-strongly convex, where λ ∈(0, 1). Moreover, let B ≥1 be such that ∥w∗∥2 ≤B and maxt F(wt) −F(w∗) ≤B with probability 1 over the random permutation. There is some universal constant c0 ≥1, such that for any c ≥c0 and any ϵ ∈(0, 1), if we run algorithm 1, using parameters η, T satisfying η = 1 c , T ≥9 ηλ , m ≥c log2 64dmB2 λϵ T, then after S = ⌈log4(9/ϵ)⌉epochs of the algorithm, ˜wS+1 satisfies E[F( ˜wS+1)−minw F(w)] ≤ϵ. In particular, by taking η = Θ(1) and T = Θ(1/λ), the algorithm attains an ϵ-accurate solution after O(log(1/ϵ)/λ) stochastic iterations of without-replacement sampling, and O(log(1/ϵ)) sequential passes over the data to compute gradients of F(·). This implies that as long as 1/λ (which stands for the condition number of the problem) is smaller than O(m/ log(1/ϵ)), the number of withoutreplacement stochastic iterations is smaller than the data size m. Thus, assuming the data is randomly shuffled, we can get a solution using only sequential data passes, without the need to reshuffle. In terms of the log factors, we note that the condition maxt F(wt) −F(w∗) ≤B with probability 1 is needed for technical reasons in our analysis, and we conjecture that it can be improved. However, since B appears only inside log factors, even a crude bound would suffice. In appendix C, we indeed show that under there is always a valid B satisfying log(B) = O (log(1/ϵ) log(T) + log(1/λ)). Regarding the logarithmic dependence on the dimension d, it is due to an application of a matrix Bernstein inequality for d × d matrices, and can possibly be improved. 7 5.1 Application of Without-Replacement SVRG to distributed learning An important variant of the problems we discussed so far is when training data (or equivalently, the individual loss functions f1(·), . . . , fm(·)) are split between different machines, who need to communicate in order to reach a good solution. This naturally models situations where data is too large to fit at a single machine, or where we wish to speed up the optimization process by parallelizing it on several computers. Over the past few years, there has been much research on this question in the machine learning community, with just a few examples including [24, 2, 1, 5, 4, 10, 20, 19, 25, 13]. A substantial number of these works focus on the setting where the data is split equally at random between k machines (or equivalently, that data is assigned to each machine by sampling without replacement from {f1(·), . . . , fm(·)})). Intuitively, this creates statistical similarities between the data at different machines, which can be leveraged to aid the optimization process. Recently, Lee et al. [13] proposed a simple and elegant approach, which applies at least in certain parameter regimes. This is based on the observation that SVRG, according to its with-replacement analysis, requires O(log(1/ϵ)) epochs, where in each epoch one needs to compute an exact gradient of the objective function F(·) = 1 m Pm i=1 fi(·), and O(1/λ) gradients of individual losses fi(·) chosen uniformly at random (where ϵ is the required suboptimality, and λ is the strong convexity parameter of F(·)). Therefore, if each machine had i.i.d. samples from {f1(·), . . . , fm(·)}, whose union cover {f1(·), . . . , fm(·)}, the machines could just simulate SVRG: First, each machine splits its data to batches of size O(1/λ). Then, each SVRG epoch is simulated by the machines computing a gradient of F(·) = 1 m Pm i=1 fi(·) – which can be fully parallelized and involves one communication round (assuming a broadcast communication model) – and one machine computing gradients with respect to one of its batches. Overall, this would require O(log(1/ϵ)) communication rounds, and O(m/k + 1/λ) log(1/ϵ) runtime, where m/k is the number of data points per machine (ignoring communication time, and assuming constant time to compute a gradient of fi(·)). Under the reasonable assumption that the strong convexity parameter λ is at least k/m, this requires runtime linear in the data size per machine, and logarithmic in the target accuracy ϵ, with only a logarithmic number of communication rounds. Up to log factors, this is essentially the best one can hope for with a distributed algorithm. Moreover, a lower bound in [13] indicates that at least in the worst case, O(log(1/ϵ)) communication rounds is impossible to obtain if λ is significantly smaller than k/m. Unfortunately, the reasoning above crucially relies on each machine having access to i.i.d. samples, which can be reasonable in some cases, but is different than the more common assumption that the data is randomly split among the machines. To circumvent this issue, [13] propose to communicate individual data points / losses fi(·) between machines, so as to simulate i.i.d. sampling. However, by the birthday paradox, this only works well in the regime where the overall number of samples required (O((1/λ) log(1/ϵ)) is not much larger than √m. Otherwise, with-replacement and withoutreplacement sampling becomes statistically very different, and a large number of data points would need to be communicated. In other words, if communication is an expensive resource, then the solution proposed in [13] only works well when λ is at least order of 1/√m. In machine learning applications, the strong convexity parameter λ often comes from explicit regularization designed to prevent over-fitting, and needs to scale with the data size, usually between 1/√m and 1/m. Thus, the solution above is communication-efficient only when λ is relatively large. However, the situation immediately improves if we can use a without-replacement version of SVRG, which can easily be simulated with randomly partitioned data: The stochastic batches can now be simply subsets of each machine’s data, which are statistically identical to sampling {f1(·), . . . , fm(·)} without replacement. Thus, no data points need to be sent across machines, even if λ is small. For clarity, we present an explicit pseudocode as Algorithm 2 in Appendix D. Let us consider the analysis of no-replacement SVRG provided in Thm. 4. According to this analysis, by setting T = Θ(1/λ), then as long as the total number of batches is at least Ω(log(1/ϵ)), and λ = ˜Ω(1/m), then the algorithm will attain an ϵ-suboptimal solution in expectation. In other words, without any additional communication, we extend the applicability of distributed SVRG (at least for regularized least squares) from the λ = ˜Ω(1/√m) regime to 1/λ = ˜Ω(1/m). We emphasize that this formal analysis only applies to regularized squared loss, which is the scope of Thm. 4. However, this algorithmic approach can be applied to any loss function, and we conjecture that it will have similar performance for any smooth losses and strongly-convex objectives. Acknowledgments: This research is supported in part by an FP7 Marie Curie CIG grant, an ISF grant 425/13, and by the Intel Collaborative Research Institute for Computational Intelligence (ICRI-CI). 8 References [1] A. Agarwal, O. Chapelle, M. Dudík, and J. Langford. A reliable effective terascale linear learning system. CoRR, abs/1110.4198, 2011. [2] M.-F. Balcan, A. Blum, S. Fine, and Y. Mansour. Distributed learning, communication complexity and privacy. In COLT, 2012. [3] L. Bottou. Stochastic gradient descent tricks. In Neural Networks: Tricks of the Trade. Springer, 2012. [4] A. Cotter, O. Shamir, N. Srebro, and K. Sridharan. Better mini-batch algorithms via accelerated gradient methods. In NIPS, 2011. [5] O. Dekel, R. Gilad-Bachrach, O. Shamir, and L. Xiao. Optimal distributed online prediction using mini-batches. Journal of Machine Learning Research, 13:165–202, 2012. [6] R. El-Yaniv and D. Pechyony. Transductive rademacher complexity and its applications. Journal of Artificial Intelligence Research, 35:193–234, 2009. [7] D. Gross and V. Nesme. Note on sampling without replacing from a finite collection of matrices. arXiv preprint arXiv:1001.2738, 2010. [8] M. Gürbüzbalaban, A. Ozdaglar, and P. Parrilo. Why random reshuffling beats stochastic gradient descent. arXiv preprint arXiv:1510.08560, 2015. [9] E. Hazan. Introduction to online convex optimization. Book draft, 2015. [10] M. Jaggi, V. Smith, M. Takác, J. Terhorst, S. Krishnan, T. Hofmann, and M. Jordan. Communicationefficient distributed dual coordinate ascent. In NIPS, 2014. [11] R. Johnson and T. Zhang. Accelerating stochastic gradient descent using predictive variance reduction. In NIPS, 2013. [12] S. Lacoste-Julien, M. Schmidt, and F. Bach. A simpler approach to obtaining an o (1/t) convergence rate for the projected stochastic subgradient method. arXiv preprint arXiv:1212.2002, 2012. [13] J. Lee, T. Ma, and Q. Lin. Distributed stochastic variance reduced gradient methods. arXiv preprint arXiv:1507.07595, 2015. [14] A. Nedi´c and D. Bertsekas. Convergence rate of incremental subgradient algorithms. In Stochastic optimization: algorithms and applications, pages 223–264. Springer, 2001. [15] A. Rakhlin, O. Shamir, and K. Sridharan. Making gradient descent optimal for strongly convex stochastic optimization. arXiv preprint arXiv:1109.5647, 2011. [16] B. Recht and C. Ré. Beneath the valley of the noncommutative arithmetic-geometric mean inequality: conjectures, case-studies, and consequences. In COLT, 2012. [17] S. Shalev-Shwartz. Online learning and online convex optimization. Foundations and Trends in Machine Learning, 4(2):107–194, 2011. [18] S. Shalev-Shwartz and S. Ben-David. Understanding machine learning: From Theory to Algorithms. Cambridge University Press, 2014. [19] O. Shamir and N. Srebro. On distributed stochastic optimization and learning. In Allerton, 2014. [20] O. Shamir, N. Srebro, and T. Zhang. Communication-efficient distributed optimization using an approximate newton-type method. In ICML, 2014. [21] O. Shamir and T. Zhang. Stochastic gradient descent for non-smooth optimization: Convergence results and optimal averaging schemes. In ICML, 2013. [22] V. Vapnik. Statistical learning theory. Wiley New York, 1998. [23] L. Xiao. Dual averaging methods for regularized stochastic learning and online optimization. Journal of Machine Learning Research, 11:2543–2596, 2010. [24] Y. Zhang, J. Duchi, and M. Wainwright. Communication-efficient algorithms for statistical optimization. Journal of Machine Learning Research, 14:3321–3363, 2013. [25] Y. Zhang and L. Xiao. Communication-efficient distributed optimization of self-concordant empirical loss. In ICML, 2015. 9 | 2016 | 455 |
6,389 | Learning to Communicate with Deep Multi-Agent Reinforcement Learning Jakob N. Foerster1,† jakob.foerster@cs.ox.ac.uk Yannis M. Assael1,† yannis.assael@cs.ox.ac.uk Nando de Freitas1,2,3 nandodefreitas@google.com Shimon Whiteson1 shimon.whiteson@cs.ox.ac.uk 1University of Oxford, United Kingdom 2Canadian Institute for Advanced Research, CIFAR NCAP Program 3Google DeepMind Abstract We consider the problem of multiple agents sensing and acting in environments with the goal of maximising their shared utility. In these environments, agents must learn communication protocols in order to share information that is needed to solve the tasks. By embracing deep neural networks, we are able to demonstrate endto-end learning of protocols in complex environments inspired by communication riddles and multi-agent computer vision problems with partial observability. We propose two approaches for learning in these domains: Reinforced Inter-Agent Learning (RIAL) and Differentiable Inter-Agent Learning (DIAL). The former uses deep Q-learning, while the latter exploits the fact that, during learning, agents can backpropagate error derivatives through (noisy) communication channels. Hence, this approach uses centralised learning but decentralised execution. Our experiments introduce new environments for studying the learning of communication protocols and present a set of engineering innovations that are essential for success in these domains. 1 Introduction How language and communication emerge among intelligent agents has long been a topic of intense debate. Among the many unresolved questions are: Why does language use discrete structures? What role does the environment play? What is innate and what is learned? And so on. Some of the debates on these questions have been so fiery that in 1866 the French Academy of Sciences banned publications about the origin of human language. The rapid progress in recent years of machine learning, and deep learning in particular, opens the door to a new perspective on this debate. How can agents use machine learning to automatically discover the communication protocols they need to coordinate their behaviour? What, if anything, can deep learning offer to such agents? What insights can we glean from the success or failure of agents that learn to communicate? In this paper, we take the first steps towards answering these questions. Our approach is programmatic: first, we propose a set of multi-agent benchmark tasks that require communication; then, we formulate several learning algorithms for these tasks; finally, we analyse how these algorithms learn, or fail to learn, communication protocols for the agents. †These authors contributed equally to this work. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. The tasks that we consider are fully cooperative, partially observable, sequential multi-agent decision making problems. All the agents share the goal of maximising the same discounted sum of rewards. While no agent can observe the underlying Markov state, each agent receives a private observation correlated with that state. In addition to taking actions that affect the environment, each agent can also communicate with its fellow agents via a discrete limited-bandwidth channel. Due to the partial observability and limited channel capacity, the agents must discover a communication protocol that enables them to coordinate their behaviour and solve the task. We focus on settings with centralised learning but decentralised execution. In other words, communication between agents is not restricted during learning, which is performed by a centralised algorithm; however, during execution of the learned policies, the agents can communicate only via the limited-bandwidth channel. While not all real-world problems can be solved in this way, a great many can, e.g., when training a group of robots on a simulator. Centralised planning and decentralised execution is also a standard paradigm for multi-agent planning [1, 2]. To address this setting, we formulate two approaches. The first, reinforced inter-agent learning (RIAL), uses deep Q-learning [3] with a recurrent network to address partial observability. In one variant of this approach, which we refer to as independent Q-learning, the agents each learn their own network parameters, treating the other agents as part of the environment. Another variant trains a single network whose parameters are shared among all agents. Execution remains decentralised, at which point they receive different observations leading to different behaviour. The second approach, differentiable inter-agent learning (DIAL), is based on the insight that centralised learning affords more opportunities to improve learning than just parameter sharing. In particular, while RIAL is end-to-end trainable within an agent, it is not end-to-end trainable across agents, i.e., no gradients are passed between agents. The second approach allows real-valued messages to pass between agents during centralised learning, thereby treating communication actions as bottleneck connections between agents. As a result, gradients can be pushed through the communication channel, yielding a system that is end-to-end trainable even across agents. During decentralised execution, real-valued messages are discretised and mapped to the discrete set of communication actions allowed by the task. Because DIAL passes gradients from agent to agent, it is an inherently deep learning approach. Experiments on two benchmark tasks, based on the MNIST dataset and a well known riddle, show, not only can these methods solve these tasks, they often discover elegant communication protocols along the way. To our knowledge, this is the first time that either differentiable communication or reinforcement learning with deep neural networks has succeeded in learning communication protocols in complex environments involving sequences and raw images. The results also show that deep learning, by better exploiting the opportunities of centralised learning, is a uniquely powerful tool for learning such protocols. Finally, this study advances several engineering innovations that are essential for learning communication protocols in our proposed benchmarks. 2 Related Work Research on communication spans many fields, e.g. linguistics, psychology, evolution and AI. In AI, it is split along a few axes: a) predefined or learned communication protocols, b) planning or learning methods, c) evolution or RL, and d) cooperative or competitive settings. Given the topic of our paper, we focus on related work that deals with the cooperative learning of communication protocols. Out of the plethora of work on multi-agent RL with communication, e.g., [4–7], only a few fall into this category. Most assume a pre-defined communication protocol, rather than trying to learn protocols. One exception is the work of Kasai et al. [7], in which tabular Q-learning agents have to learn the content of a message to solve a predator-prey task with communication. Another example of open-ended communication learning in a multi-agent task is given in [8]. Here evolutionary methods are used for learning the protocols which are evaluated on a similar predator-prey task. Their approach uses a fitness function that is carefully designed to accelerate learning. In general, heuristics and handcrafted rules have prevailed widely in this line of research. Moreover, typical tasks have been necessarily small so that global optimisation methods, such as evolutionary algorithms, can be applied. The use of deep representations and gradient-based optimisation as advocated in this paper is an important departure, essential for scalability and further 2 progress. A similar rationale is provided in [9], another example of making an RL problem end-to-end differentiable. Unlike the recent work in [10], we consider discrete communication channels. One of the key components of our methods is the signal binarisation during the decentralised execution. This is related to recent research on fitting neural networks in low-powered devices with memory and computational limitations using binary weights, e.g. [11], and previous works on discovering binary codes for documents [12]. 3 Background Deep Q-Networks (DQN). In a single-agent, fully-observable, RL setting [13], an agent observes the current state st ∈S at each discrete time step t, chooses an action ut ∈U according to a potentially stochastic policy π, observes a reward signal rt, and transitions to a new state st+1. Its objective is to maximise an expectation over the discounted return, Rt = rt + γrt+1 + γ2rt+2 + · · · , where rt is the reward received at time t and γ ∈[0, 1] is a discount factor. The Q-function of a policy π is Qπ(s, u) = E [Rt|st = s, ut = u]. The optimal action-value function Q∗(s, u) = maxπ Qπ(s, u) obeys the Bellman optimality equation Q∗(s, u) = Es′ [r + γ maxu′ Q∗(s′, u′) | s, u]. Deep Qlearning [3] uses neural networks parameterised by θ to represent Q(s, u; θ). DQNs are optimised by minimising: Li(θi) = Es,u,r,s′[(yDQN i −Q(s, u; θi))2], at each iteration i, with target yDQN i = r+γ maxu′ Q(s′, u′; θ− i ). Here, θ− i are the parameters of a target network that is frozen for a number of iterations while updating the online network Q(s, u; θi). The action u is chosen from Q(s, u; θi) by an action selector, which typically implements an ϵ-greedy policy that selects the action that maximises the Q-value with a probability of 1 −ϵ and chooses randomly with a probability of ϵ. DQN also uses experience replay: during learning, the agent builds a dataset of episodic experiences and is then trained by sampling mini-batches of experiences. Independent DQN. DQN has been extended to cooperative multi-agent settings, in which each agent a observes the global st, selects an individual action ua t , and receives a team reward, rt, shared among all agents. Tampuu et al. [14] address this setting with a framework that combines DQN with independent Q-learning, in which each agent a independently and simultaneously learns its own Q-function Qa(s, ua; θa i ). While independent Q-learning can in principle lead to convergence problems (since one agent’s learning makes the environment appear non-stationary to other agents), it has a strong empirical track record [15, 16], and was successfully applied to two-player pong. Deep Recurrent Q-Networks. Both DQN and independent DQN assume full observability, i.e., the agent receives st as input. By contrast, in partially observable environments, st is hidden and the agent receives only an observation ot that is correlated with st, but in general does not disambiguate it. Hausknecht and Stone [17] propose deep recurrent Q-networks (DRQN) to address single-agent, partially observable settings. Instead of approximating Q(s, u) with a feed-forward network, they approximate Q(o, u) with a recurrent neural network that can maintain an internal state and aggregate observations over time. This can be modelled by adding an extra input ht−1 that represents the hidden state of the network, yielding Q(ot, ht−1, u). For notational simplicity, we omit the dependence of Q on θ. 4 Setting In this work, we consider RL problems with both multiple agents and partial observability. All the agents share the goal of maximising the same discounted sum of rewards Rt. While no agent can observe the underlying Markov state st, each agent a receives a private observation oa t correlated with st. In every time-step t, each agent selects an environment action ua t ∈U that affects the environment, and a communication action ma t ∈M that is observed by other agents but has no direct impact on the environment or reward. We are interested in such settings because it is only when multiple agents and partial observability coexist that agents have the incentive to communicate. As no communication protocol is given a priori, the agents must develop and agree upon such a protocol to solve the task. Since protocols are mappings from action-observation histories to sequences of messages, the space of protocols is extremely high-dimensional. Automatically discovering effective protocols in this space remains an elusive challenge. In particular, the difficulty of exploring this space of protocols is exacerbated by the need for agents to coordinate the sending and interpreting of messages. For 3 example, if one agent sends a useful message to another agent, it will only receive a positive reward if the receiving agent correctly interprets and acts upon that message. If it does not, the sender will be discouraged from sending that message again. Hence, positive rewards are sparse, arising only when sending and interpreting are properly coordinated, which is hard to discover via random exploration. We focus on settings where communication between agents is not restricted during centralised learning, but during the decentralised execution of the learned policies, the agents can communicate only via a limited-bandwidth channel. 5 Methods In this section, we present two approaches for learning communication protocols. 5.1 Reinforced Inter-Agent Learning The most straightforward approach, which we call reinforced inter-agent learning (RIAL), is to combine DRQN with independent Q-learning for action and communication selection. Each agent’s Q-network represents Qa(oa t , ma′ t−1, ha t−1, ua), which conditions on that agent’s individual hidden state ha t−1 and observation oa t as well as messages from other agents ma′ t−1. To avoid needing a network with |U||M| outputs, we split the network into Qa u and Qa m, the Q-values for the environment and communication actions, respectively. Similarly to [18], the action selector separately picks ua t and ma t from Qu and Qm, using an ϵ-greedy policy. Hence, the network requires only |U| + |M| outputs and action selection requires maximising over U and then over M, but not maximising over U × M. Both Qu and Qm are trained using DQN with the following two modifications, which were found to be essential for performance. First, we disable experience replay to account for the non-stationarity that occurs when multiple agents learn concurrently, as it can render experience obsolete and misleading. Second, to account for partial observability, we feed in the actions u and m taken by each agent as inputs on the next time-step. Figure 1(a) shows how information flows between agents and the environment, and how Q-values are processed by the action selector in order to produce the action, ua t , and message ma t . Since this approach treats agents as independent networks, the learning phase is not centralised, even though our problem setting allows it to be. Consequently, the agents are treated exactly the same way during decentralised execution as during learning. ot 1 ut+1 2 Q-Net ut 1 Q-Net Action Select m t 1 m t+1 2 Agent 1 Agent 2 ot+1 2 Action Select m t-1 2 Environment Q-Net Action Select Q-Net Action Select t+1 t (a) RIAL - RL based communication ot 1 ut+1 2 C-Net ut 1 C-Net Action Select DRU m t 1 m t+1 2 Agent 1 Agent 2 ot+1 2 Action Select Environment C-Net Action Select C-Net Action Select DRU t+1 t (b) DIAL - Differentiable communication Figure 1: The bottom and top rows represent the communication flow for agent a1 and agent a2, respectively. In RIAL (a), all Q-values are fed to the action selector, which selects both environment and communication actions. Gradients, shown in red, are computed using DQN for the selected action and flow only through the Q-network of a single agent. In DIAL (b), the message ma t bypasses the action selector and instead is processed by the DRU (Section 5.2) and passed as a continuous value to the next C-network. Hence, gradients flow across agents, from the recipient to the sender. For simplicity, at each time step only one agent is highlighted, while the other agent is greyed out. Parameter Sharing. RIAL can be extended to take advantage of the opportunity for centralised learning by sharing parameters among the agents. This variation learns only one network, which is used by all agents. However, the agents can still behave differently because they receive different 4 observations and thus evolve different hidden states. In addition, each agent receives its own index a as input, allowing it to specialise. The rich representations in deep Q-networks can facilitate the learning of a common policy while also allowing for specialisation. Parameter sharing also dramatically reduces the number of parameters that must be learned, thereby speeding learning. Under parameter sharing, the agents learn two Q-functions Qu(oa t , ma′ t−1, ha t−1, ua t−1, ma t−1, a, ua t ) and Qm(oa t , ma′ t−1, ha t−1, ua t−1, ma t−1, a, ua t ). During decentralised execution, each agent uses its own copy of the learned network, evolving its own hidden state, selecting its own actions, and communicating with other agents only through the communication channel. 5.2 Differentiable Inter-Agent Learning While RIAL can share parameters among agents, it still does not take full advantage of centralised learning. In particular, the agents do not give each other feedback about their communication actions. Contrast this with human communication, which is rich with tight feedback loops. For example, during face-to-face interaction, listeners send fast nonverbal queues to the speaker indicating the level of understanding and interest. RIAL lacks this feedback mechanism, which is intuitively important for learning communication protocols. To address this limitation, we propose differentiable inter-agent learning (DIAL). The main insight behind DIAL is that the combination of centralised learning and Q-networks makes it possible, not only to share parameters but to push gradients from one agent to another through the communication channel. Thus, while RIAL is end-to-end trainable within each agent, DIAL is end-to-end trainable across agents. Letting gradients flow from one agent to another gives them richer feedback, reducing the required amount of learning by trial and error, and easing the discovery of effective protocols. DIAL works as follows: during centralised learning, communication actions are replaced with direct connections between the output of one agent’s network and the input of another’s. Thus, while the task restricts communication to discrete messages, during learning the agents are free to send real-valued messages to each other. Since these messages function as any other network activation, gradients can be passed back along the channel, allowing end-to-end backpropagation across agents. In particular, the network, which we call a C-Net, outputs two distinct types of values, as shown in Figure 1(b), a) Q(·), the Q-values for the environment actions, which are fed to the action selector, and b) ma t , the real-valued vector message to other agents, which bypasses the action selector and is instead processed by the discretise/regularise unit (DRU(ma t )). The DRU regularises it during centralised learning, DRU(ma t ) = Logistic(N(ma t , σ)), where σ is the standard deviation of the noise added to the channel, and discretises it during decentralised execution, DRU(ma t ) = 1{ma t > 0}. Figure 1 shows how gradients flow differently in RIAL and DIAL. The gradient chains for Qu, in RIAL and Q, in DIAL, are based on the DQN loss. However, in DIAL the gradient term for m is the backpropagated error from the recipient of the message to the sender. Using this inter-agent gradient for training provides a richer training signal than the DQN loss for Qm in RIAL. While the DQN error is nonzero only for the selected message, the incoming gradient is a |m|-dimensional vector that can contain more information. It also allows the network to directly adjust messages in order to minimise the downstream DQN loss, reducing the need for trial and error learning of good protocols. While we limit our analysis to discrete messages, DIAL naturally handles continuous message spaces, as they are used anyway during centralised learning. At the same time, DIAL can also scale to large discrete message spaces, since it learns binary encodings instead of the one-hot encoding in RIAL, |m| = O(log(|M|). Further algorithmic details and pseudocode are in the supplementary material. 6 Experiments In this section, we evaluate RIAL and DIAL with and without parameter sharing in two multi-agent problems and compare it with a no-communication shared-parameter baseline (NoComm). Results presented are the average performance across several runs, where those without parameter sharing (NS), are represented by dashed lines. Across plots, rewards are normalised by the highest average reward achievable given access to the true state (Oracle). In our experiments, we use an ϵ-greedy policy with ϵ = 0.05, the discount factor is γ = 1, and the target network is reset every 100 episodes. To stabilise learning, we execute parallel episodes in batches of 32. The parameters are optimised using RMSProp [19] with a learning rate of 5 × 10−4. The architecture uses rectified linear units 5 (ReLU), and gated recurrent units (GRU) [20], which have similar performance to long short-term memory [21] (LSTM) [22]. Unless stated otherwise, we set the standard deviation of noise added to the channel to σ = 2, which was found to be essential for good performance.1 6.1 Model Architecture … … … … … … h 21 a z 1 a z 2 a z 3 a z T a h 11 a h 12 a h 13 a h 1T -1 a h 22 a h 23 a h 2T a h 11 a h 12 a h 13 a h 1T a h 21 a h 22 a h 23 a h 2T -1 a Q 1 a m 1 a , ) ( Q 3 a m 3 a , ) ( Q T a ) ( … … ) m 0 a, (o1 a 0 u , a ) m 2 a, (o3 a 2 u , a ) m T-1 a , (oT a T-1 u , a , , , Figure 2: DIAL architecture. RIAL and DIAL share the same individual model architecture. For brevity, we describe only the DIAL model here. As illustrated in Figure 2, each agent consists of a recurrent neural network (RNN), unrolled for T time-steps, that maintains an internal state h, an input network for producing a task embedding z, and an output network for the Q-values and the messages m. The input for agent a is defined as a tuple of (oa t , ma′ t−1, ua t−1, a). The inputs a and ua t−1 are passed through lookup tables, and ma′ t−1 through a 1-layer MLP, both producing embeddings of size 128. oa t is processed through a task-specific network that produces an additional embedding of the same size. The state embedding is produced by element-wise summation of these embeddings, za t = TaskMLP(oa t ) + MLP[|M|, 128](mt−1) + Lookup(ua t−1) + Lookup(a) . We found that performance and stability improved when a batch normalisation layer [23] was used to preprocess mt−1. za t is processed through a 2-layer RNN with GRUs, ha 1,t = GRU[128, 128](za t , ha 1,t−1), which is used to approximate the agent’s action-observation history. Finally, the output ha 2,t of the top GRU layer, is passed through a 2-layer MLP Qa t , ma t = MLP[128, 128, (|U| + |M|)](ha 2,t). 6.2 Switch Riddle Day 1 3 2 3 1 Off On Off On Off On Day 2 Day 3 Day 4 Switch: Action: On None None Tell Off On Prisoner in IR: Figure 3: Switch: Every day one prisoner gets sent to the interrogation room where he sees the switch and chooses from “On”, “Off”, “Tell” and “None”. The first task is inspired by a well-known riddle described as follows: “One hundred prisoners have been newly ushered into prison. The warden tells them that starting tomorrow, each of them will be placed in an isolated cell, unable to communicate amongst each other. Each day, the warden will choose one of the prisoners uniformly at random with replacement, and place him in a central interrogation room containing only a light bulb with a toggle switch. The prisoner will be able to observe the current state of the light bulb. If he wishes, he can toggle the light bulb. He also has the option of announcing that he believes all prisoners have visited the interrogation room at some point in time. If this announcement is true, then all prisoners are set free, but if it is false, all prisoners are executed[...]” [24]. Architecture. In our formalisation, at time-step t, agent a observes oa t ∈{0, 1}, which indicates if the agent is in the interrogation room. Since the switch has two positions, it can be modelled as a 1-bit message, ma t . If agent a is in the interrogation room, then its actions are ua t ∈{“None”,“Tell”}; otherwise the only action is “None”. The episode ends when an agent chooses “Tell” or when the maximum time-step, T, is reached. The reward rt is 0 unless an agent chooses “Tell”, in which case it is 1 if all agents have been to the interrogation room and −1 otherwise. Following the riddle definition, in this experiment ma t−1 is available only to the agent a in the interrogation room. Finally, we set the time horizon T = 4n −6 in order to keep the experiments computationally tractable. Complexity. The switch riddle poses significant protocol learning challenges. At any time-step t, there are |o|t possible observation histories for a given agent, with |o| = 3: the agent either is not in the interrogation room or receives one of two messages when it is. For each of these histories, an agent can chose between 4 = |U||M| different options, so at time-step t, the single-agent policy space is (|U||M|)|o|t = 43t. The product of all policies for all time-steps defines the total policy space for an agent: Q 43t = 4(3T +1−3)/2, where T is the final time-step. The size of the multi-agent 1Source code is available at: https://github.com/iassael/learning-to-communicate 6 1k 2k 3k 4k 5k # Epochs 0.5 0.6 0.7 0.8 0.9 1.0 Norm. R (Optimal) DIAL DIAL-NS RIAL RIAL-NS NoComm Oracle (a) Evaluation of n = 3 10k 20k 30k 40k # Epochs 0.5 0.6 0.7 0.8 0.9 1.0 Norm. R (Optimal) DIAL DIAL-PS RIAL RIAL-NS NoComm Oracle (b) Evaluation of n = 4 Off Has Been? On Yes No None Has Been? Yes No Switch? On On Off Tell On Day 1 2 3+ (c) Protocol of n = 3 Figure 4: Switch: (a-b) Performance of DIAL and RIAL, with and without ( -NS) parameter sharing, and NoComm-baseline, for n = 3 and n = 4 agents. (c) The decision tree extracted for n = 3 to interpret the communication protocol discovered by DIAL. policy space grows exponentially in n, the number of agents: 4n(3T +1−3)/2. We consider a setting where T is proportional to the number of agents, so the total policy space is 4n3O(n). For n = 4, the size is 4354288. Our approach using DIAL is to model the switch as a continuous message, which is binarised during decentralised execution. Experimental results. Figure 4(a) shows our results for n = 3 agents. All four methods learn an optimal policy in 5k episodes, substantially outperforming the NoComm baseline. DIAL with parameter sharing reaches optimal performance substantially faster than RIAL. Furthermore, parameter sharing speeds both methods. Figure 4(b) shows results for n = 4 agents. DIAL with parameter sharing again outperforms all other methods. In this setting, RIAL without parameter sharing was unable to beat the NoComm baseline. These results illustrate how difficult it is for agents to learn the same protocol independently. Hence, parameter sharing can be crucial for learning to communicate. DIAL-NS performs similarly to RIAL, indicating that the gradient provides a richer and more robust source of information. We also analysed the communication protocol discovered by DIAL for n = 3 by sampling 1K episodes, for which Figure 4(c) shows a decision tree corresponding to an optimal strategy. When a prisoner visits the interrogation room after day two, there are only two options: either one or two prisoners may have visited the room before. If three prisoners had been, the third prisoner would have finished the game. The other options can be encoded via the “On” and “Off” positions respectively. 6.3 MNIST Games In this section, we consider two tasks based on the well known MNIST digit classification dataset [25]. u1 2 m1 m2 m3 m4 u1 1 u5 1 u5 2 … … … … … … … … … Agent 1 Agent 2 m1 … … u1 2 u1 1 u2 2 u2 1 Agent 1 Agent 2 Figure 5: MNIST games architectures. Colour-Digit MNIST is a two-player game in which each agent observes the pixel values of a random MNIST digit in red or green, while the colour label and digit value are hidden. The reward consists of two components that are antisymmetric in the action, colour, and parity of the digits. As only one bit of information can be sent, agents must agree to encode/decode either colour or parity, with parity yielding greater rewards. The game has two steps; in the first step, both agents send a 1-bit message, in the second step they select a binary action. Multi-Step MNIST is a grayscale variant that requires agents to develop a communication protocol that integrates information across 5 time-steps in order to guess each others’ digits. At each step, the agents exchange a 1-bit message and at he final step, t = 5, they are awarded r = 0.5 for each correctly guessed digit. Further details on both tasks are provided in the supplementary material. Architecture. The input processing network is a 2-layer MLP TaskMLP[(|c|×28×28), 128, 128](oa t ). Figure 5 depicts the generalised setting for both games. Our experimental evaluation showed improved training time using batch normalisation after the first layer. 7 10k 20k 30k 40k 50k # Epochs 0.0 0.2 0.4 0.6 0.8 1.0 Norm. R (Optimal) DIAL DIAL-NS RIAL RIAL-NS NoComm Oracle (a) Evaluation of Multi-Step 5k 10k 15k 20k # Epochs 0.0 0.2 0.4 0.6 0.8 1.0 Norm. R (Optimal) DIAL DIAL-NS RIAL RIAL-NS NoComm Oracle (b) Evaluation of Colour-Digit 1 2 3 4 Step 0 1 2 3 4 5 6 7 8 9 True Digit (c) Protocol of Multi-Step Figure 6: MNIST Games: (a,b) Performance of DIAL and RIAL, with and without (-NS) parameter sharing, and NoComm, for both MNIST games. (c) Extracted coding scheme for multi-step MNIST. Experimental results. Figures 6(a) and 6(b) show that DIAL substantially outperforms the other methods on both games. Furthermore, parameter sharing is crucial for reaching the optimal protocol. In multi-step MNIST, results were obtained with σ = 0.5. In this task, RIAL fails to learn, while in colour-digit MNIST it fluctuates around local minima in the protocol space; the NoComm baseline is stagnant at zero. DIAL’s performance can be attributed to directly optimising the messages in order to reduce the global DQN error while RIAL must rely on trial and error. DIAL can also optimise the message content with respect to rewards taking place many time-steps later, due to the gradient passing between agents, leading to optimal performance in multi-step MNIST. To analyse the protocol that DIAL learned, we sampled 1K episodes. Figure 6(c) illustrates the communication bit sent at time-step t by agent 1, as a function of its input digit. Thus, each agent has learned a binary encoding and decoding of the digits. These results illustrate that differentiable communication in DIAL is essential to fully exploiting the power of centralised learning and thus is an important tool for studying the learning of communication protocols. 6.4 Effect of Channel Noise -10 0 10 Activation 0.0 0.5 1.0 Probability ¾ = 0 -10 0 10 Activation ¾ = 2: 0 Epoch 1k Epoch 3k Epoch 5k Figure 7: DIAL’s learned activations with and without noise in DRU. The question of why language evolved to be discrete has been studied for centuries, see e.g., the overview in [26]. Since DIAL learns to communicate in a continuous channel, our results offer an illuminating perspective on this topic. In particular, Figure 7 shows that, in the switch riddle, DIAL without noise in the communication channel learns centred activations. By contrast, the presence of noise forces messages into two different modes during learning. Similar observations have been made in relation to adding noise when training document models [12] and performing classification [11]. In our work, we found that adding noise was essential for successful training. More analysis on this appears in the supplementary material. 7 Conclusions This paper advanced novel environments and successful techniques for learning communication protocols. It presented a detailed comparative analysis covering important factors involved in the learning of communication protocols with deep networks, including differentiable communication, neural network architecture design, channel noise, tied parameters, and other methodological aspects. This paper should be seen as a first attempt at learning communication and language with deep learning approaches. The gargantuan task of understanding communication and language in their full splendour, covering compositionality, concept lifting, conversational agents, and many other important problems still lies ahead. We are however optimistic that the approaches proposed in this paper can help tackle these challenges. 8 References [1] F. A. Oliehoek, M. T. J. Spaan, and N. Vlassis. Optimal and approximate Q-value functions for decentralized POMDPs. JAIR, 32:289–353, 2008. [2] L. Kraemer and B. Banerjee. Multi-agent reinforcement learning as a rehearsal for decentralized planning. Neurocomputing, 190:82–94, 2016. [3] V. Mnih, K. Kavukcuoglu, D. Silver, A. A. Rusu, J. Veness, M. G. Bellemare, A. Graves, M. Riedmiller, A. K. Fidjeland, G. Ostrovski, S. Petersen, C. Beattie, A. Sadik, I. Antonoglou, H. King, D. Kumaran, D. Wierstra, S. Legg, and D. Hassabis. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015. [4] M. Tan. Multi-agent reinforcement learning: Independent vs. cooperative agents. In ICML, 1993. [5] F. S. Melo, M. Spaan, and S. J. Witwicki. QueryPOMDP: POMDP-based communication in multiagent systems. In Multi-Agent Systems, pages 189–204. 2011. [6] L. Panait and S. Luke. Cooperative multi-agent learning: The state of the art. Autonomous Agents and Multi-Agent Systems, 11(3):387–434, 2005. [7] T. Kasai, H. Tenmoto, and A. Kamiya. Learning of communication codes in multi-agent reinforcement learning problem. In IEEE Soft Computing in Industrial Applications, pages 1–6, 2008. [8] C. L. Giles and K. C. Jim. Learning communication for multi-agent systems. In Innovative Concepts for Agent-Based Systems, pages 377–390. Springer, 2002. [9] K. Gregor, I. Danihelka, A. Graves, and D. Wierstra. Draw: A recurrent neural network for image generation. arXiv preprint arXiv:1502.04623, 2015. [10] S. Sukhbaatar, A. Szlam, and R. Fergus. Learning multiagent communication with backpropagation. arXiv preprint arXiv:1605.07736, 2016. [11] M. Courbariaux and Y. Bengio. BinaryNet: Training deep neural networks with weights and activations constrained to +1 or -1. arXiv preprint arXiv:1602.02830, 2016. [12] G. Hinton and R. Salakhutdinov. Discovering binary codes for documents by learning deep generative models. Topics in Cognitive Science, 3(1):74–91, 2011. [13] R. S. Sutton and A. G. Barto. Introduction to reinforcement learning. MIT Press, 1998. [14] A. Tampuu, T. Matiisen, D. Kodelja, I. Kuzovkin, K. Korjus, J. Aru, J. Aru, and R. Vicente. Multiagent cooperation and competition with deep reinforcement learning. arXiv preprint arXiv:1511.08779, 2015. [15] Y. Shoham and K. Leyton-Brown. Multiagent Systems: Algorithmic, Game-Theoretic, and Logical Foundations. Cambridge University Press, New York, 2009. [16] E. Zawadzki, A. Lipson, and K. Leyton-Brown. Empirically evaluating multiagent learning algorithms. arXiv preprint 1401.8074, 2014. [17] M. Hausknecht and P. Stone. Deep recurrent Q-learning for partially observable MDPs. arXiv preprint arXiv:1507.06527, 2015. [18] K. Narasimhan, T. Kulkarni, and R. Barzilay. Language understanding for text-based games using deep reinforcement learning. arXiv preprint arXiv:1506.08941, 2015. [19] T. Tieleman and G. Hinton. Lecture 6.5-rmsprop: Divide the gradient by a running average of its recent magnitude. COURSERA: Neural Networks for Machine Learning, 4(2), 2012. [20] K. Cho, B. van Merriënboer, D. Bahdanau, and Y. Bengio. On the properties of neural machine translation: Encoder-decoder approaches. arXiv preprint arXiv:1409.1259, 2014. [21] S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural computation, 9(8):1735–1780, 1997. [22] J. Chung, C. Gulcehre, K. Cho, and Y. Bengio. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv preprint arXiv:1412.3555, 2014. [23] S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, pages 448–456, 2015. [24] W. Wu. 100 prisoners and a lightbulb. Technical report, OCF, UC Berkeley, 2002. [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] M. Studdert-Kennedy. How did language go discrete? In M. Tallerman, editor, Language Origins: Perspectives on Evolution, chapter 3. Oxford University Press, 2005. 9 | 2016 | 456 |
6,390 | Understanding the Effective Receptive Field in Deep Convolutional Neural Networks Wenjie Luo∗ Yujia Li∗ Raquel Urtasun Richard Zemel Department of Computer Science University of Toronto {wenjie, yujiali, urtasun, zemel}@cs.toronto.edu Abstract We study characteristics of receptive fields of units in deep convolutional networks. The receptive field size is a crucial issue in many visual tasks, as the output must respond to large enough areas in the image to capture information about large objects. We introduce the notion of an effective receptive field, and show that it both has a Gaussian distribution and only occupies a fraction of the full theoretical receptive field. We analyze the effective receptive field in several architecture designs, and the effect of nonlinear activations, dropout, sub-sampling and skip connections on it. This leads to suggestions for ways to address its tendency to be too small. 1 Introduction Deep convolutional neural networks (CNNs) have achieved great success in a wide range of problems in the last few years. In this paper we focus on their application to computer vision: where they are the driving force behind the significant improvement of the state-of-the-art for many tasks recently, including image recognition [10, 8], object detection [17, 2], semantic segmentation [12, 1], image captioning [20], and many more. One of the basic concepts in deep CNNs is the receptive field, or field of view, of a unit in a certain layer in the network. Unlike in fully connected networks, where the value of each unit depends on the entire input to the network, a unit in convolutional networks only depends on a region of the input. This region in the input is the receptive field for that unit. The concept of receptive field is important for understanding and diagnosing how deep CNNs work. Since anywhere in an input image outside the receptive field of a unit does not affect the value of that unit, it is necessary to carefully control the receptive field, to ensure that it covers the entire relevant image region. In many tasks, especially dense prediction tasks like semantic image segmentation, stereo and optical flow estimation, where we make a prediction for each single pixel in the input image, it is critical for each output pixel to have a big receptive field, such that no important information is left out when making the prediction. The receptive field size of a unit can be increased in a number of ways. One option is to stack more layers to make the network deeper, which increases the receptive field size linearly by theory, as each extra layer increases the receptive field size by the kernel size. Sub-sampling on the other hand increases the receptive field size multiplicatively. Modern deep CNN architectures like the VGG networks [18] and Residual Networks [8, 6] use a combination of these techniques. In this paper, we carefully study the receptive field of deep CNNs, focusing on problems in which there are many output unites. In particular, we discover that not all pixels in a receptive field contribute equally to an output unit’s response. Intuitively it is easy to see that pixels at the center of a receptive ∗denotes equal contribution 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. field have a much larger impact on an output. In the forward pass, central pixels can propagate information to the output through many different paths, while the pixels in the outer area of the receptive field have very few paths to propagate its impact. In the backward pass, gradients from an output unit are propagated across all the paths, and therefore the central pixels have a much larger magnitude for the gradient from that output. This observation leads us to study further the distribution of impact within a receptive field on the output. Surprisingly, we can prove that in many cases the distribution of impact in a receptive field distributes as a Gaussian. Note that in earlier work [20] this Gaussian assumption about a receptive field is used without justification. This result further leads to some intriguing findings, in particular that the effective area in the receptive field, which we call the effective receptive field, only occupies a fraction of the theoretical receptive field, since Gaussian distributions generally decay quickly from the center. The theory we develop for effective receptive field also correlates well with some empirical observations. One such empirical observation is that the currently commonly used random initializations lead some deep CNNs to start with a small effective receptive field, which then grows during training. This potentially indicates a bad initialization bias. Below we present the theory in Section 2 and some empirical observations in Section 3, which aim at understanding the effective receptive field for deep CNNs. We discuss a few potential ways to increase the effective receptive field size in Section 4. 2 Properties of Effective Receptive Fields We want to mathematically characterize how much each input pixel in a receptive field can impact the output of a unit n layers up the network, and study how the impact distributes within the receptive field of that output unit. To simplify notation we consider only a single channel on each layer, but similar results can be easily derived for convolutional layers with more input and output channels. Assume the pixels on each layer are indexed by (i, j), with their center at (0, 0). Denote the (i, j)th pixel on the pth layer as xp i,j, with x0 i,j as the input to the network, and yi,j = xn i,j as the output on the nth layer. We want to measure how much each x0 i,j contributes to y0,0. We define the effective receptive field (ERF) of this central output unit as region containing any input pixel with a non-negligible impact on that unit. The measure of impact we use in this paper is the partial derivative ∂y0,0/∂x0 i,j. It measures how much y0,0 changes as x0 i,j changes by a small amount; it is therefore a natural measure of the importance of x0 i,j with respect to y0,0. However, this measure depends not only on the weights of the network, but are in most cases also input-dependent, so most of our results will be presented in terms of expectations over input distribution. The partial derivative ∂y0,0/∂x0 i,j can be computed with back-propagation. In the standard setting, back-propagation propagates the error gradient with respect to a certain loss function. Assuming we have an arbitrary loss l, by the chain rule we have ∂l ∂x0 i,j = P i′,j′ ∂l ∂yi′,j′ ∂yi′,j′ ∂x0 i,j . Then to get the quantity ∂y0,0/∂x0 i,j, we can set the error gradient ∂l/∂y0,0 = 1 and ∂l/∂yi,j = 0 for all i ̸= 0 and j ̸= 0, then propagate this gradient from there back down the network. The resulting ∂l/∂x0 i,j equals the desired ∂y0,0/∂x0 i,j. Here we use the back-propagation process without an explicit loss function, and the process can be easily implemented with standard neural network tools. In the following we first consider linear networks, where this derivative does not depend on the input and is purely a function of the network weights and (i, j), which clearly shows how the impact of the pixels in the receptive field distributes. Then we move forward to consider more modern architecture designs and discuss the effect of nonlinear activations, dropout, sub-sampling, dilation convolution and skip connections on the ERF. 2.1 The simplest case: a stack of convolutional layers of weights all equal to one Consider the case of n convolutional layers using k × k kernels with stride one, one single channel on each layer and no nonlinearity, stacked into a deep linear CNN. In this analysis we ignore the biases on all layers. We begin by analyzing convolution kernels with weights all equal to one. 2 Denote g(i, j, p) = ∂l/∂xp i,j as the gradient on the pth layer, and let g(i, j, n) = ∂l/∂yi,j. Then g(, , 0) is the desired gradient image of the input. The back-propagation process effectively convolves g(, , p) with the k × k kernel to get g(, , p −1) for each p. In this special case, the kernel is a k × k matrix of 1’s, so the 2D convolution can be decomposed into the product of two 1D convolutions. We therefore focus exclusively on the 1D case. We have the initial gradient signal u(t) and kernel v(t) formally defined as u(t) = δ(t), v(t) = k−1 X m=0 δ(t −m), where δ(t) = 1, t = 0 0, t ̸= 0 (1) and t = 0, 1, −1, 2, −2, ... indexes the pixels. The gradient signal on the input pixels is simply o = u ∗v ∗· · · ∗v, convolving u with n such v’s. To compute this convolution, we can use the Discrete Time Fourier Transform to convert the signals into the Fourier domain, and obtain U(ω) = ∞ X t=−∞ u(t)e−jωt = 1, V (ω) = ∞ X t=−∞ v(t)e−jωt = k−1 X m=0 e−jωm (2) Applying the convolution theorem, we have the Fourier transform of o is F(o) = F(u ∗v ∗· · · ∗v)(ω) = U(ω) · V (ω)n = k−1 X m=0 e−jωm !n (3) Next, we need to apply the inverse Fourier transform to get back o(t): o(t) = 1 2π Z π −π k−1 X m=0 e−jωm !n ejωtdω (4) 1 2π Z π −π e−jωsejωtdω = 1, s = t 0, s ̸= t (5) We can see that o(t) is simply the coefficient of e−jωt in the expansion of Pk−1 m=0 e−jωmn . Case k = 2: Now let’s consider the simplest nontrivial case of k = 2, where Pk−1 m=0 e−jωmn = (1 + e−jω)n. The coefficient for e−jωt is then the standard binomial coefficient n t , so o(t) = n t . It is quite well known that binomial coefficients distributes with respect to t like a Gaussian as n becomes large (see for example [13]), which means the scale of the coefficients decays as a squared exponential as t deviates from the center. When multiplying two 1D Gaussian together, we get a 2D Gaussian, therefore in this case, the gradient on the input plane is distributed like a 2D Gaussian. Case k > 2: In this case the coefficients are known as “extended binomial coefficients” or “polynomial coefficients”, and they too distribute like Gaussian, see for example [3, 16]. This is included as a special case for the more general case presented later in Section 2.3. 2.2 Random weights Now let’s consider the case of random weights. In general, we have g(i, j, p −1) = k−1 X a=0 k−1 X b=0 wp a,bg(i + a, i + b, p) (6) with pixel indices properly shifted for clarity, and wp a,b is the convolution weight at (a, b) in the convolution kernel on layer p. At each layer, the initial weights are independently drawn from a fixed distribution with zero mean and variance C. We assume that the gradients g are independent from the weights. This assumption is in general not true if the network contains nonlinearities, but for linear networks these assumptions hold. As Ew[wp a,b] = 0, we can then compute the expectation Ew,input[g(i, j, p −1)] = k−1 X a=0 k−1 X b=0 Ew[wp a,b]Einput[g(i + a, i + b, p)] = 0, ∀p (7) 3 Here the expectation is taken over w distribution as well as the input data distribution. The variance is more interesting, as Var[g(i, j, p−1)] = k−1 X a=0 k−1 X b=0 Var[wp a,b]Var[g(i+a, i+b, p)] = C k−1 X a=0 k−1 X b=0 Var[g(i+a, i+b, p)] (8) This is equivalent to convolving the gradient variance image Var[g(, , p)] with a k × k convolution kernel full of 1’s, and then multiplying by C to get Var[g(, , p −1)]. Based on this we can apply exactly the same analysis as in Section 2.1 on the gradient variance images. The conclusions carry over easily that Var[g(., ., 0)] has a Gaussian shape, with only a slight change of having an extra Cn constant factor multiplier on the variance gradient images, which does not affect the relative distribution within a receptive field. 2.3 Non-uniform kernels More generally, each pixel in the kernel window can have different weights, or as in the random weight case, they may have different variances. Let’s again consider the 1D case, u(t) = δ(t) as before, and the kernel signal v(t) = Pk−1 m=0 w(m)δ(t −m), where w(m) is the weight for the mth pixel in the kernel. Without loss of generality, we can assume the weights are normalized, i.e. P m w(m) = 1. Applying the Fourier transform and convolution theorem as before, we get U(ω) · V (ω) · · · V (ω) = k−1 X m=0 w(m)e−jωm !n (9) the space domain signal o(t) is again the coefficient of e−jωt in the expansion; the only difference is that the e−jωm terms are weighted by w(m). These coefficients turn out to be well studied in the combinatorics literature, see for example [3] and the references therein for more details. In [3], it was shown that if w(m) are normalized, then o(t) exactly equals to the probability p(Sn = t), where Sn = Pn i=1 Xi and Xi’s are i.i.d. multinomial variables distributed according to w(m)’s, i.e. p(Xi = m) = w(m). Notice the analysis there requires that w(m) > 0. But we can reduce to variance analysis for the random weight case, where the variances are always nonnegative while the weights can be negative. The analysis for negative w(m) is more difficult and is left to future work. However empirically we found the implications of the analysis in this section still applies reasonably well to networks with negative weights. From the central limit theorem point of view, as n →∞, the distribution of √n( 1 nSn −E[X]) converges to Gaussian N(0, Var[X]) in distribution. This means, for a given n large enough, Sn is going to be roughly Gaussian with mean nE[X] and variance nVar[X]. As o(t) = p(Sn = t), this further implies that o(t) also has a Gaussian shape. When w(m)’s are normalized, this Gaussian has the following mean and variance: E[Sn] = n k−1 X m=0 mw(m), Var[Sn] = n k−1 X m=0 m2w(m) − k−1 X m=0 mw(m) !2 (10) This indicates that o(t) decays from the center of the receptive field squared exponentially according to the Gaussian distribution. The rate of decay is related to the variance of this Gaussian. If we take one standard deviation as the effective receptive field (ERF) size which is roughly the radius of the ERF, then this size is p Var[Sn] = p nVar[Xi] = O(√n). On the other hand, as we stack more convolutional layers, the theoretical receptive field grows linearly, therefore relative to the theoretical receptive field, the ERF actually shrinks at a rate of O(1/√n), which we found surprising. In the simple case of uniform weighting, we can further see that the ERF size grows linearly with kernel size k. As w(m) = 1/k, we have p Var[Sn] = √n v u u t k−1 X m=0 m2 k − k−1 X m=0 m k !2 = r n(k2 −1) 12 = O(k√n) (11) 4 Remarks: The result derived in this section, i.e., the distribution of impact within a receptive field in deep CNNs converges to Gaussian, holds under the following conditions: (1) all layers in the CNN use the same set of convolution weights. This is in general not true, however, when we apply the analysis of variance, the weight variance on all layers are usually the same up to a constant factor. (2) The convergence derived is convergence “in distribution”, as implied by the central limit theorem. This means that the cumulative probability distribution function converges to that of a Gaussian, but at any single point in space the probability can deviate from the Gaussian. (3) The convergence result states that √n( 1 nSn−E[X]) →N(0, Var[X]), hence Sn approaches N(nE[X], nVar[X]), however the convergence of Sn here is not well defined as N(nE[X], nVar[X]) is not a fixed distribution, but instead it changes with n. Additionally, the distribution of Sn can deviate from Gaussian on a finite set. But the overall shape of the distribution is still roughly Gaussian. 2.4 Nonlinear activation functions Nonlinear activation functions are an integral part of every neural network. We use σ to represent an arbitrary nonlinear activation function. During the forward pass, on each layer the pixels are first passed through σ and then convolved with the convolution kernel to compute the next layer. This ordering of operations is a little non-standard but equivalent to the more usual ordering of convolving first and passing through nonlinearity, and it makes the analysis slightly easier. The backward pass in this case becomes g(i, j, p −1) = σp i,j ′ k−1 X a=0 k−1 X b=0 wp a,bg(i + a, i + b, p) (12) where we abused notation a bit and use σp i,j ′ to represent the gradient of the activation function for pixel (i, j) on layer p. For ReLU nonlinearities, σp i,j ′ = I[xp i,j > 0] where I[.] is the indicator function. We have to make some extra assumptions about the activations xp i,j to advance the analysis, in addition to the assumption that it has zero mean and unit variance. A standard assumption is that xp i,j has a symmetric distribution around 0 [7]. If we make an extra simplifying assumption that the gradients σ′ are independent from the weights and g in the upper layers, we can simplify the variance as Var[g(i, j, p −1)] = E[σp i,j ′2] P a P b Var[wp a,b]Var[g(i + a, i + b, p)], and E[σp i,j ′2] = Var[σp i,j ′] = 1/4 is a constant factor. Following the variance analysis we can again reduce this case to the uniform weight case. Sigmoid and Tanh nonlinearities are harder to analyze. Here we only use the observation that when the network is initialized the weights are usually small and therefore these nonlinearities will be in the linear region, and the linear analysis applies. However, as the weights grow bigger during training their effect becomes hard to analyze. 2.5 Dropout, Subsampling, Dilated Convolution and Skip-Connections Here we consider the effect of some standard CNN approaches on the effective receptive field. Dropout is a popular technique to prevent overfitting; we show that dropout does not change the Gaussian ERF shape. Subsampling and dilated convolutions turn out to be effective ways to increase receptive field size quickly. Skip-connections on the other hand make ERFs smaller. We present the analysis for all these cases in the Appendix. 3 Experiments In this section, we empirically study the ERF for various deep CNN architectures. We first use artificially constructed CNN models to verify the theoretical results in our analysis. We then present our observations on how the ERF changes during the training of deep CNNs on real datasets. For all ERF studies, we place a gradient signal of 1 at the center of the output plane and 0 everywhere else, and then back-propagate this gradient through the network to get input gradients. 3.1 Verifying theoretical results We first verify our theoretical results in artificially constructed deep CNNs. For computing the ERF we use random inputs, and for all the random weight networks we followed [7, 5] for proper random initialization. In this section, we verify the following results: 5 5 layers, theoretical RF size=11 10 layers, theoretical RF size=21 Uniform Random Random + ReLU Uniform Random Random + ReLU 20 layers, theoretical RF size=41 40 layers, theoretical RF size=81 Uniform Random Random + ReLU Uniform Random Random + ReLU Figure 1: Comparing the effect of number of layers, random weight initialization and nonlinear activation on the ERF. Kernel size is fixed at 3 × 3 for all the networks here. Uniform: convolutional kernel weights are all ones, no nonlinearity; Random: random kernel weights, no nonlinearity; Random + ReLU: random kernel weights, ReLU nonlinearity. ERFs are Gaussian distributed: As shown in Fig. 1, we can observe perfect Gaussian shapes for uniformly and randomly weighted convolution kernels without nonlinear activations, and near Gaussian shapes for randomly weighted kernels with nonlinearity. ReLU Tanh Sigmoid Adding the ReLU nonlinearity makes the distribution a bit less Gaussian, as the ERF distribution depends on the input as well. Another reason is that ReLU units output exactly zero for half of its inputs and it is very easy to get a zero output for the center pixel on the output plane, which means no path from the receptive field can reach the output, hence the gradient is all zero. Here the ERFs are averaged over 20 runs with different random seed. The figures on the right shows the ERF for networks with 20 layers of random weights, with different nonlinearities. Here the results are averaged both across 100 runs with different random weights as well as different random inputs. In this setting the receptive fields are a lot more Gaussian-like. √n absolute growth and 1/√n relative shrinkage: In Fig. 2, we show the change of ERF size and the relative ratio of ERF over theoretical RF w.r.t number of convolution layers. The best fitting line for ERF size gives slope of 0.56 in log domain, while the line for ERF ratio gives slope of -0.43. This indicates ERF size is growing linearly w.r.t √ N and ERF ratio is shrinking linearly w.r.t. 1 √ N . Note here we use 2 standard deviations as our measurement for ERF size, i.e. any pixel with value greater than 1 −95.45% of center point is considered as in ERF. The ERF size is represented by the square root of number of pixels within ERF, while the theoretical RF size is the side length of the square in which all pixel has a non-zero impact on the output pixel, no matter how small. All experiments here are averaged over 20 runs. Subsampling & dilated convolution increases receptive field: The figure on the right shows the effect of subsampling and dilated convolution. The reference baseline is a convnet with 15 dense convolution layers. Its ERF is shown in the left-most figure. We then replace 3 of the 15 convolutional layers with stride-2 convolution to get the ERF for the ‘Subsample’ figure, Conv-Only Subsample Dilation and replace them with dilated convolution with factor 2,4 and 8 for the ‘Dilation’ figure. As we see, both of them are able to increase the effect receptive field significantly. Note the ‘Dilation’ figure shows a rectangular ERF shape typical for dilated convolutions. 3.2 How the ERF evolves during training In this part, we take a look at how the ERF of units in the top-most convolutional layers of a classification CNN and a semantic segmentation CNN evolve during training. For both tasks, we adopt the ResNet architecture which makes extensive use of skip-connections. As the analysis shows, the ERF of this network should be significantly smaller than the theoretical receptive field. This is indeed what we have observed initially. Intriguingly, as the networks learns, the ERF gets bigger, and at the end of training is significantly larger than the initial ERF. 6 Figure 2: Absolute growth (left) and relative shrink (right) for ERF CIFAR 10 CamVid Before Training After Training Before Training After Training Figure 3: Comparison of ERF before and after training for models trained on CIFAR-10 classification and CamVid semantic segmentation tasks. CIFAR-10 receptive fields are visualized in the image space of 32 × 32. For the classification task we trained a ResNet with 17 residual blocks on the CIFAR-10 dataset. At the end of training this network reached a test accuracy of 89%. Note that in this experiment we did not use pooling or downsampling, and exclusively focus on architectures with skip-connections. The accuracy of the network is not state-of-the-art but still quite high. In Fig. 3 we show the effective receptive field on the 32×32 image space at the beginning of training (with randomly initialized weights) and at the end of training when it reaches best validation accuracy. Note that the theoretical receptive field of our network is actually 74 × 74, bigger than the image size, but the ERF is still not able to fully fill the image. Comparing the results before and after training, we see that the effective receptive field has grown significantly. For the semantic segmentation task we used the CamVid dataset for urban scene segmentation. We trained a “front-end” model [21] which is a purely convolutional network that predicts the output at a slightly lower resolution. This network plays the same role as the VGG network does in many previous works [12]. We trained a ResNet with 16 residual blocks interleaved with 4 subsampling operations each with a factor of 2. Due to these subsampling operations the output is 1/16 of the input size. For this model, the theoretical receptive field of the top convolutional layer units is quite big at 505 × 505. However, as shown in Fig. 3, the ERF only gets a fraction of that with a diameter of 100 at the beginning of training. Again we observe that during training the ERF size increases and at the end it reaches almost a diameter around 150. 4 Reduce the Gaussian Damage The above analysis shows that the ERF only takes a small portion of the theoretical receptive field, which is undesirable for tasks that require a large receptive field. New Initialization. One simple way to increase the effective receptive field is to manipulate the initial weights. We propose a new random weight initialization scheme that makes the weights at the center of the convolution kernel to have a smaller scale, and the weights on the outside to be larger; this diffuses the concentration on the center out to the periphery. Practically, we can initialize the network with any initialization method, then scale the weights according to a distribution that has a lower scale at the center and higher scale on the outside. 7 In the extreme case, we can optimize the w(m)’s to maximize the ERF size or equivalently the variance in Eq. 10. Solving this optimization problem leads to the solution that put weights equally at the 4 corners of the convolution kernel while leaving everywhere else 0. However, using this solution to do random weight initialization is too aggressive, and leaving a lot of weights to 0 makes learning slow. A softer version of this idea usually works better. We have trained a CNN for the CIFAR-10 classification task with this initialization method, with several random seeds. In a few cases we get a 30% speed-up of training compared to the more standard initializations [5, 7]. But overall the benefit of this method is not always significant. We note that no matter what we do to change w(m), the effective receptive field is still distributed like a Gaussian so the above proposal only solves the problem partially. Architectural changes. A potentially better approach is to make architectural changes to the CNNs, which may change the ERF in more fundamental ways. For example, instead of connecting each unit in a CNN to a local rectangular convolution window, we can sparsely connect each unit to a larger area in the lower layer using the same number of connections. Dilated convolution [21] belongs to this category, but we may push even further and use sparse connections that are not grid-like. 5 Discussion Connection to biological neural networks. In our analysis we have established that the effective receptive field in deep CNNs actually grows a lot slower than we used to think. This indicates that a lot of local information is still preserved even after many convolution layers. This finding contradicts some long-held relevant notions in deep biological networks. A popular characterization of mammalian visual systems involves a split into "what" and "where" pathways [19]. Progressing along the what or where pathway, there is a gradual shift in the nature of connectivity: receptive field sizes increase, and spatial organization becomes looser until there is no obvious retinotopic organization; the loss of retinotopy means that single neurons respond to objects such as faces anywhere in the visual field [9]. However, if the ERF is smaller than the RF, this suggests that representations may retain position information, and also raises an interesting question concerning changes in the size of these fields during development. A second relevant effect of our analysis is that it suggests that convolutional networks may automatically create a form of foveal representation. The fovea of the human retina extracts high-resolution information from an image only in the neighborhood of the central pixel. Sub-fields of equal resolution are arranged such that their size increases with the distance from the center of the fixation. At the periphery of the retina, lower-resolution information is extracted, from larger regions of the image. Some neural networks have explicitly constructed representations of this form [11]. However, because convolutional networks form Gaussian receptive fields, the underlying representations will naturally have this character. Connection to previous work on CNNs. While receptive fields in CNNs have not been studied extensively, [7, 5] conduct similar analyses, in terms of computing how the variance evolves through the networks. They developed a good initialization scheme for convolution layers following the principle that variance should not change much when going through the network. Researchers have also utilized visualizations in order to understand how neural networks work. [14] showed the importance of using natural-image priors and also what an activation of the convolutional layer would represent. [22] used deconvolutional nets to show the relation of pixels in the image and the neurons that are firing. [23] did empirical study involving receptive field and used it as a cue for localization. There are also visualization studies using gradient ascent techniques [4] that generate interesting images, such as [15]. These all focus on the unit activations, or feature map, instead of the effective receptive field which we investigate here. 6 Conclusion In this paper, we carefully studied the receptive fields in deep CNNs, and established a few surprising results about the effective receptive field size. In particular, we have shown that the distribution of impact within the receptive field is asymptotically Gaussian, and the effective receptive field only takes up a fraction of the full theoretical receptive field. Empirical results echoed the theory we established. We believe this is just the start of the study of effective receptive field, which provides a new angle to understand deep CNNs. In the future we hope to study more about what factors impact effective receptive field in practice and how we can gain more control over them. 8 References [1] Vijay Badrinarayanan, Ankur Handa, and Roberto Cipolla. Segnet: A deep convolutional encoder-decoder architecture for robust semantic pixel-wise labelling. arXiv preprint arXiv:1505.07293, 2015. [2] Xiaozhi Chen, Kaustav Kundu, Yukun Zhu, Andrew Berneshawi, Huimin Ma, Sanja Fidler, and Raquel Urtasun. 3d object proposals for accurate object class detection. In NIPS, 2015. [3] Steffen Eger. Restricted weighted integer compositions and extended binomial coefficients. Journal of Integer Sequences, 16(13.1):3, 2013. [4] Dumitru Erhan, Yoshua Bengio, Aaron Courville, and Pascal Vincent. Visualizing higher-layer features of a deep network. University of Montreal, 1341, 2009. [5] Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In AISTATS, pages 249–256, 2010. [6] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. arXiv preprint arXiv:1512.03385, 2015. [7] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In ICCV, pages 1026–1034, 2015. [8] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. arXiv preprint arXiv:1603.05027, 2016. [9] Nancy Kanwisher, Josh McDermott, and Marvin M Chun. The fusiform face area: a module in human extrastriate cortex specialized for face perception. The Journal of Neuroscience, 17(11):4302–4311, 1997. [10] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, pages 1097–1105, 2012. [11] Hugo Larochelle and Geoffrey E Hinton. Learning to combine foveal glimpses with a third-order boltzmann machine. In NIPS, pages 1243–1251, 2010. [12] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In CVPR, pages 3431–3440, 2015. [13] L Lovsz, J Pelikn, and K Vesztergombi. Discrete mathematics: elementary and beyond, 2003. [14] Aravindh Mahendran and Andrea Vedaldi. Understanding deep image representations by inverting them. In CVPR, pages 5188–5196. IEEE, 2015. [15] Alexander Mordvintsev, Christopher Olah, and Mike Tyka. Inceptionism: Going deeper into neural networks. Google Research Blog. Retrieved June, 20, 2015. [16] Thorsten Neuschel. A note on extended binomial coefficients. Journal of Integer Sequences, 17(2):3, 2014. [17] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In NIPS, pages 91–99, 2015. [18] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014. [19] Leslie G Ungerleider and James V Haxby. ‘what’and ‘where’in the human brain. Current opinion in neurobiology, 4(2):157–165, 1994. [20] Kelvin Xu, Jimmy Ba, Ryan Kiros, Aaron Courville, Ruslan Salakhutdinov, Richard Zemel, and Yoshua Bengio. Show, attend and tell: Neural image caption generation with visual attention. arXiv preprint arXiv:1502.03044, 2015. [21] Fisher Yu and Vladlen Koltun. Multi-scale context aggregation by dilated convolutions. arXiv preprint arXiv:1511.07122, 2015. [22] Matthew D Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. In ECCV, pages 818–833. Springer, 2014. [23] Bolei Zhou, Aditya Khosla, Agata Lapedriza, Aude Oliva, and Antonio Torralba. Object detectors emerge in deep scene cnns. arXiv preprint arXiv:1412.6856, 2014. 9 | 2016 | 457 |
6,391 | Barzilai-Borwein Step Size for Stochastic Gradient Descent Conghui Tan The Chinese University of Hong Kong chtan@se.cuhk.edu.hk Shiqian Ma The Chinese University of Hong Kong sqma@se.cuhk.edu.hk Yu-Hong Dai Chinese Academy of Sciences, Beijing, China dyh@lsec.cc.ac.cn Yuqiu Qian The University of Hong Kong qyq79@connect.hku.hk Abstract One of the major issues in stochastic gradient descent (SGD) methods is how to choose an appropriate step size while running the algorithm. Since the traditional line search technique does not apply for stochastic optimization methods, the common practice in SGD is either to use a diminishing step size, or to tune a step size by hand, which can be time consuming in practice. In this paper, we propose to use the Barzilai-Borwein (BB) method to automatically compute step sizes for SGD and its variant: stochastic variance reduced gradient (SVRG) method, which leads to two algorithms: SGD-BB and SVRG-BB. We prove that SVRG-BB converges linearly for strongly convex objective functions. As a by-product, we prove the linear convergence result of SVRG with Option I proposed in [10], whose convergence result has been missing in the literature. Numerical experiments on standard data sets show that the performance of SGD-BB and SVRG-BB is comparable to and sometimes even better than SGD and SVRG with best-tuned step sizes, and is superior to some advanced SGD variants. 1 Introduction The following optimization problem, which minimizes the sum of cost functions over samples from a finite training set, appears frequently in machine learning: min F(x) ≡1 n n X i=1 fi(x), (1) where n is the sample size, and each fi : Rd →R is the cost function corresponding to the i-th sample data. Throughout this paper, we assume that each fi is convex and differentiable, and the function F is strongly convex. Problem (1) is challenging when n is extremely large so that computing F(x) and ∇F(x) for given x is prohibited. Stochastic gradient descent (SGD) method and its variants have been the main approaches for solving (1). In the t-th iteration of SGD, a random training sample it is chosen from {1, 2, . . . , n} and the iterate xt is updated by xt+1 = xt −ηt∇fit(xt), (2) where ∇fit(xt) denotes the gradient of the it-th component function at xt, and ηt > 0 is the step size (a.k.a. learning rate). In (2), it is usually assumed that ∇fit is an unbiased estimation to ∇F, i.e., E[∇fit(xt) | xt] = ∇F(xt). (3) 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. However, it is known that the total number of gradient evaluations of SGD depends on the variance of the stochastic gradients and it is of sublinear convergence rate for strongly convex and smooth problem (1). As a result, many works along this line have been focusing on designing variants of SGD that can reduce the variance and improve the complexity. Some popular methods include the stochastic average gradient (SAG) method [16], the SAGA method [7], the stochastic dual coordinate ascent (SDCA) method [17], and the stochastic variance reduced gradient (SVRG) method [10]. These methods are proven to converge linearly on strongly convex problems. As pointed out by Le Roux et al. [16], one important issue regarding to stochastic algorithms that has not been fully addressed in the literature, is how to choose an appropriate step size ηt while running the algorithm. In classical gradient descent method, the step size is usually obtained by employing line search techniques. However, line search is computationally prohibited in stochastic gradient methods because one only has sub-sampled information of function value and gradient. As a result, for SGD and its variants used in practice, people usually use a diminishing step size ηt, or use a best-tuned fixed step size. Neither of these two approaches can be efficient. Some recent works that discuss the choice of step size in SGD are summarized as follows. AdaGrad [8] scales the gradient by the square root of the accumulated magnitudes of the gradients in the past iterations, but this still requires to decide a fixed step size η. [16] suggests a line search technique on the component function fik(x) selected in each iteration, to estimate step size for SAG. [12] suggests performing line search for an estimated function, which is evaluated by a Gaussian process with samples fit(xt). [13] suggests to generate the step sizes by a given function with an unknown parameter, and to use the online SGD to update this unknown parameter. Our contributions in this paper are in several folds. (i) We propose to use the Barzilai-Borwein (BB) method to compute the step size for SGD and SVRG. The two new methods are named as SGD-BB and SVRG-BB, respectively. The per-iteration computational cost of SGD-BB and SVRG-BB is almost the same as SGD and SVRG, respectively. (ii) We prove the linear convergence of SVRG-BB for strongly convex function. As a by-product, we show the linear convergence of SVRG with Option I (SVRG-I) proposed in [10]. Note that in [10] only convergence of SVRG with Option II (SVRG-II) was given, and the proof for SVRG-I has been missing in the literature. However, SVRG-I is numerically a better choice than SVRG-II, as demonstrated in [10]. (iii) We conduct numerical experiments for SGD-BB and SVRG-BB on solving logistic regression and SVM problems. The numerical results show that SGD-BB and SVRG-BB are comparable to and sometimes even better than SGD and SVRG with best-tuned step sizes. We also compare SGD-BB with some advanced SGD variants, and demonstrate that our method is superior. The rest of this paper is organized as follows. In Section 2 we briefly introduce the BB method in the deterministic setting. In Section 3 we propose our SVRG-BB method, and prove its linear convergence for strongly convex function. As a by-product, we also prove the linear convergence of SVRG-I. In Section 4 we propose our SGD-BB method. A smoothing technique is also implemented to improve the performance of SGD-BB. Finally, we conduct some numerical experiments for SVRG-BB and SGD-BB in Section 5. 2 The Barzilai-Borwein Step Size The BB method, proposed by Barzilai and Borwein in [2], has been proven to be very successful in solving nonlinear optimization problems. The key idea behind the BB method is motivated by quasi-Newton methods. Suppose we want to solve the unconstrained minimization problem min x f(x), (4) where f is differentiable. A typical iteration of quasi-Newton methods for solving (4) is: xt+1 = xt −B−1 t ∇f(xt), (5) where Bt is an approximation of the Hessian matrix of f at the current iterate xt. The most important feature of Bt is that it must satisfy the so-called secant equation: Btst = yt, where st = xt −xt−1 and yt = ∇f(xt) −∇f(xt−1) for t ≥1. It is noted that in (5) one needs to solve a linear system, which may be time consuming when Bt is large and dense. 2 One way to alleviate this burden is to use the BB method, which replaces Bt by a scalar matrix (1/ηt)I. However, one cannot choose a scalar ηt such that the secant equation holds with Bt = (1/ηt)I. Instead, one can find ηt such that the residual of the secant equation, i.e., ∥(1/ηt)st −yt∥2 2, is minimized, which leads to the following choice of ηt: ηt = ∥st∥2 2/ s⊤ t yt . (6) Therefore, a typical iteration of the BB method for solving (4) is xt+1 = xt −ηt∇f(xt), (7) where ηt is computed by (6). For convergence analysis, generalizations and variants of the BB method, we refer the interested readers to [14, 15, 6, 9, 4, 5, 3] and references therein. Recently, BB method has been successfully applied for solving problems arising from emerging applications, such as compressed sensing [21], sparse reconstruction [20] and image processing [19]. 3 Barzilai-Borwein Step Size for SVRG We see from (7) and (6) that the BB method does not need any parameter and the step size is computed while running the algorithm. This has been the main motivation for us to work out a black-box stochastic gradient descent method that can compute the step size automatically without requiring any parameters. In this section, we propose to incorporate the BB step size to SVRG, which leads to the SVRG-BB method. 3.1 SVRG-BB Method Stochastic variance reduced gradient (SVRG) is a variant of SGD proposed in [10], which utilizes a variance reduction technique to alleviate the impact of the random samplings of the gradients. SVRG computes the full gradient ∇F(x) of (1) in every m iterations, where m is a pre-given integer, and the full gradient is then used for generating stochastic gradients with lower variance in the next m iterations (the next epoch). In SVRG, the step size η needs to be provided by the user. According to [10], the choice of η depends on the Lipschitz constant of F, which is usually difficult to estimate in practice. Our SVRG-BB algorithm is described in Algorithm 1. The only difference between SVRG and SVRG-BB is that in the latter we use BB method to compute the step size ηk, instead of using a prefixed η as in SVRG. Algorithm 1 SVRG with BB step size (SVRG-BB) Parameters: update frequency m, initial point ˜x0, initial step size η0 (only used in the first epoch) for k = 0, 1, · · · do gk = 1 n Pn i=1 ∇fi(˜xk) if k > 0 then ηk = 1 m · ∥˜xk −˜xk−1∥2 2/(˜xk −˜xk−1)⊤(gk −gk−1) (△) end if x0 = ˜xk for t = 0, · · · , m −1 do Randomly pick it ∈{1, . . . , n} xt+1 = xt −ηk(∇fit(xt) −∇fit(˜xk) + gk) end for Option I: ˜xk+1 = xm Option II: ˜xk+1 = xt for randomly chosen t ∈{1, . . . , m} end for Remark 1. A few remarks are in demand for the SVRG-BB algorithm. (i) If we always set ηk = η in SVRG-BB instead of using (△), then it reduces to the original SVRG. (ii) One may notice that ηk is equal to the step size computed by the BB formula (6) divided by m. This is because in the inner loop for updating xt, m unbiased gradient estimators are added to x0 to 3 get xm. (iii) For the first epoch of SVRG-BB, a step size η0 needs to be specified. However, we observed from our numerical experiments that the performance of SVRG-BB is not sensitive to the choice of η0. (iv) The BB step size can also be naturally incorporated to other SVRG variants, such as SVRG with batching [1]. 3.2 Linear Convergence Analysis In this section, we analyze the linear convergence of SVRG-BB (Algorithm 1) for solving (1) with strongly convex objective F(x), and as a by-product, our analysis also proves the linear convergence of SVRG-I. The proofs in this section are provided in the supplementary materials. The following assumption is made throughout this section. Assumption 1. We assume that (3) holds for any xt. We assume that the objective function F(x) is µ-strongly convex, i.e., F(y) ≥F(x) + ∇F(x)⊤(y −x) + µ 2 ∥x −y∥2 2, ∀x, y ∈Rd. We also assume that the gradient of each component function fi(x) is L-Lipschitz continuous, i.e., ∥∇fi(x) −∇fi(y)∥2 ≤L∥x −y∥2, ∀x, y ∈Rd. Under this assumption, it is easy to see that ∇F(x) is also L-Lipschitz continuous. We first provide the following lemma, which reveals the relationship between the distances of two consecutive iterates to the optimal point. Lemma 1. Define αk := (1 −2ηkµ(1 −ηkL))m + 4ηkL2 µ(1 −ηkL). (8) For both SVRG-I and SVRG-BB, we have the following inequality for the k-th epoch: E ∥˜xk+1 −x∗∥2 2 < αk∥˜xk −x∗∥2 2, where x∗is the optimal solution to (1). The linear convergence of SVRG-I follows immediately. Corollary 1. In SVRG-I, if m and η are chosen such that α := (1 −2ηµ(1 −ηL))m + 4ηL2 µ(1 −ηL) < 1, (9) then SVRG-I converges linearly in expectation: E ∥˜xk −x∗∥2 2 < αk∥˜x0 −x∗∥2 2. Remark 2. We now give some remarks on this convergence result. (i) To the best of our knowledge, this is the first time that the linear convergence of SVRG-I is established. (ii) The convergence result given in Corollary 1 is for the iterates ˜xk, while the one given in [10] is for the objective function values F(˜xk). The following theorem establishes the linear convergence of SVRG-BB (Algorithm 1). Theorem 1. Denote θ = (1 −e−2µ/L)/2. Note that θ ∈(0, 1/2). In SVRG-BB, if m is chosen such that m > max 2 log(1 −2θ) + 2µ/L, 4L2 θµ2 + L µ , (10) then SVRG-BB (Algorithm 1) converges linearly in expectation: E ∥˜xk −x∗∥2 2 < (1 −θ)k∥˜x0 −x∗∥2 2. 4 4 Barzilai-Borwein Step Size for SGD In this section, we propose to incorporate the BB method to SGD (2). The BB method does not apply to SGD directly, because SGD never computes the full gradient ∇F(x). One may suggest to use ∇fit+1(xt+1) −∇fit(xt) to estimate ∇F(xt+1) −∇F(xt) when computing the BB step size using formula (6). However, this approach does not work well because of the variance of the stochastic gradients. The recent work by Sopyła and Drozda [18] suggested several variants of this idea to compute an estimated BB step size using the stochastic gradients. However, these ideas lack theoretical justifications and the numerical results in [18] show that these approaches are inferior to some existing methods. The SGD-BB algorithm we propose in this paper works in the following manner. We call every m iterations of SGD as one epoch. Following the idea of SVRG-BB, SGD-BB also uses the same step size computed by the BB formula in every epoch. Our SGD-BB algorithm is described as in Algorithm 2. Algorithm 2 SGD with BB step size (SGD-BB) Parameters: update frequency m, initial step sizes η0 and η1 (only used in the first two epochs), weighting parameter β ∈(0, 1), initial point ˜x0 for k = 0, 1, · · · do if k > 0 then ηk = 1 m · ∥˜xk −˜xk−1∥2 2/|(˜xk −˜xk−1)⊤(ˆgk −ˆgk−1)| end if x0 = ˜xk ˆgk+1 = 0 for t = 0, · · · , m −1 do Randomly pick it ∈{1, . . . , n} xt+1 = xt −ηk∇fit(xt) (∗) ˆgk+1 = β∇fit(xt) + (1 −β)ˆgk+1 end for ˜xk+1 = xm end for Remark 3. We have a few remarks about SGD-BB (Algorithm 2). (i) SGD-BB takes a convex combination of the m stochastic gradients in one epoch as an estimation of the full gradient with parameter β. The performance of SGD-BB on different problems is not sensitive to the choice of β. For example, setting β = 10/m worked well for all test problems in our experiments. (ii) Note that for computing ηk in Algorithm 2, we actually take the absolute value for the BB formula (6). This is because that unlike SVRG-BB, ˆgk in Algorithm 2 is not an exact full gradient. As a result, the step size generated by (6) can be negative. This can be seen from the following argument. Consider a simple case in which β = 1/m, approximately we have ˆgk = 1 m m−1 X t=0 ∇fit(xt). (11) It is easy to see that ˜xk −˜xk−1 = −mηk−1ˆgk. By substituting this equality into the equation for computing ηk in Algorithm 2, we have ηk =(1/m) · ∥˜xk −˜xk−1∥2/|(˜xk −˜xk−1)⊤(ˆgk −ˆgk−1)| = ηk−1 1 −ˆg⊤ k ˆgk−1/∥ˆgk∥2 2 . (12) Without taking the absolute value, the denominator of (12) is ˆg⊤ k ˆgk−1/∥ˆgk∥2 2 −1, which is usually negative in stochastic settings. (iii) Moreover, from (12) we have the following observations. If ˆg⊤ k ˆgk−1 < 0, then ηk is smaller than ηk−1. This is reasonable because ˆg⊤ k ˆgk−1 < 0 indicates that the step size is too large and we need to shrink it. If ˆg⊤ k ˆgk−1 > 0, then it indicates that we should be more aggressive to take larger step size. Hence, the way we compute ηk in Algorithm 2 is in a sense to dynamically adjust the step size, by 5 evaluating whether we are moving the iterates along the right direction. This kind of idea can be traced back to [11]. Note that SGD-BB requires the averaged gradients in two epochs to compute the BB step size. Therefore, we need to specify the step sizes η0 and η1 for the first two epochs. From our numerical experiments, we found that the performance of SGD-BB is not sensitive to choices of η0 and η1. 4.1 Smoothing Technique for the Step Sizes Due to the randomness of the stochastic gradients, the step size computed in SGD-BB may vibrate drastically sometimes and this may cause instability of the algorithm. Inspired by [13], we propose the following smoothing technique to stabilize the step size. It is known that in order to guarantee the convergence of SGD, the step sizes are required to be diminishing. Similar as in [13], we assume that the step sizes are in the form of C/φ(k), where C > 0 is an unknown constant that needs to be estimated, φ(k) is a pre-specified function that controls the decreasing rate of the step size, and a typical choice of function φ is φ(k) = k + 1. In the k-th epoch of Algorithm 2, we have all the previous step sizes η2, η3, . . . , ηk generated by the BB method, while the step sizes generated by the function C/φ(k) are given by C/φ(2), C/φ(3), . . . , C/φ(k). In order to ensure that these two sets of step sizes are close to each other, we solve the following optimization problem to determine the unknown parameter C: ˆCk := argmin C k X j=2 log C φ(j) −log ηj 2 . (13) Here we take the logarithms of the step sizes to ensure that the estimation is not dominated by those ηj’s with large magnitudes. It is easy to verify that the solution to (13) is given by ˆCk = Qk j=2 [ηjφ(j)]1/(k−1). Therefore, the smoothed step size for the k-th epoch of Algorithm 2 is: ˜ηk = ˆCk/φ(k) = k Y j=2 [ηjφ(j)]1/(k−1) /φ(k). (14) That is, we replace the ηk in equation (∗) of Algorithm 2 by ˜ηk in (14). In practice, we do not need to store all the ηj’s and ˆCk can be computed recursively by ˆCk = ˆC(k−2)/(k−1) k−1 · [ηkφ(k)]1/(k−1). 4.2 Incorporating BB Step Size to SGD Variants The BB step size and the smoothing technique we used in SGD-BB (Algorithm 2) can also be used in other variants of SGD, because these methods only require the gradient estimations, which are accessible in all SGD variants. For example, when replacing the stochastic gradient in Algorithm 2 by the averaged gradients in SAG method, we obtain SAG with BB step size (denoted as SAG-BB). Because SAG does not need diminishing step sizes to ensure convergence, in the smoothing technique we just choose φ(k) ≡1. The details of SAG-BB are given in the supplementary material. 5 Numerical Experiments In this section, we conduct numerical experiments to demonstrate the efficacy of our SVRG-BB (Algorithm 1) and SGD-BB (Algorithm 2) algorithms. In particular, we apply SVRG-BB and SGDBB to solve two standard testing problems in machine learning: logistic regression with ℓ2-norm regularization (LR), and the squared hinge loss SVM with ℓ2-norm regularization (SVM): (LR) min x F(x) = 1 n n X i=1 log 1 + exp(−bia⊤ i x) + λ 2 ∥x∥2 2, (15) (SVM) min x F(x) = 1 n n X i=1 [1 −bia⊤ i x]+ 2 + λ 2 ∥x∥2 2, (16) 6 where ai ∈Rd and bi ∈{±1} are the feature vector and class label of the i-th sample, respectively, and λ > 0 is a weighting parameter. We tested SVRG-BB and SGD-BB on three standard real data sets, which were downloaded from the LIBSVM website1. Detailed information of the data sets are given in Table 1. Table 1: Data and model information of the experiments Dataset n d model λ rcv1.binary 20,242 47,236 LR 10−5 w8a 49,749 300 LR 10−4 ijcnn1 49,990 22 SVM 10−4 5.1 Numerical Results of SVRG-BB (a) Sub-optimality on rcv1.binary (b) Sub-optimality on w8a (c) Sub-optimality on ijcnn1 (d) Step sizes on rcv1.binary (e) Step sizes on w8a (f) Step sizes on ijcnn1 Figure 1: Comparison of SVRG-BB and SVRG with fixed step sizes on different problems. The dashed lines stand for SVRG with different fixed step sizes ηk given in the legend. The solid lines stand for SVRG-BB with different η0; for example, the solid lines in sub-figures (a) and (d) correspond to SVRG-BB with η0 = 10, 1, 0.1, respectively. In this section, we compare SVRG-BB (Algorithm 1) and SVRG with fixed step size for solving (15) and (16). We used the best-tuned step size for SVRG, and three different initial step sizes η0 for SVRG-BB. For both SVRG-BB and SVRG, we set m = 2n as suggested in [10]. The comparison results of SVRG-BB and SVRG are shown in Figure 1. In all sub-figures, the x-axis denotes the number of epochs k, i.e., the number of outer loops in Algorithm 1. In Figures 1(a), 1(b) and 1(c), the y-axis denotes the sub-optimality F(˜xk) −F(x∗), and in Figures 1(d), 1(e) and 1(f), the y-axis denotes the corresponding step sizes ηk. x∗is obtained by running SVRG with the best-tuned step size until it converges. In all sub-figures, the dashed lines correspond to SVRG with fixed step sizes given in the legends of the figures. Moreover, the dashed lines in black color always represent SVRG with best-tuned step size, and the green and red lines use a relatively larger and smaller fixed step sizes respectively. The solid lines correspond to SVRG-BB with different initial step sizes η0. It can be seen from Figures 1(a), 1(b) and 1(c) that, SVRG-BB can always achieve the same level of sub-optimality as SVRG with the best-tuned step size. Although SVRG-BB needs slightly more epochs compared with SVRG with the best-tuned step size, it clearly outperforms SVRG with the 1www.csie.ntu.edu.tw/~cjlin/libsvmtools/. 7 other two choices of step sizes. Moreover, from Figures 1(d), 1(e) and 1(f) we see that the step sizes computed by SVRG-BB converge to the best-tuned step sizes after about 10 to 15 epochs. From Figure 1 we also see that SVRG-BB is not sensitive to the choice of η0. Therefore, SVRG-BB has very promising potential in practice because it generates the best step sizes automatically while running the algorithm. 5.2 Numerical Results of SGD-BB (a) Sub-optimality on rcv1.binary (b) Sub-optimality on w8a (c) Sub-optimality on ijcnn1 (d) Step sizes on rcv1.binary (e) Step sizes on w8a (f) Step sizes on ijcnn1 Figure 2: Comparison of SGD-BB and SGD. The dashed lines correspond to SGD with diminishing step sizes in the form η/(k + 1) with different constants η. The solid lines stand for SGD-BB with different initial step sizes η0. In this section, we compare SGD-BB with smoothing technique (Algorithm 2) with SGD for solving (15) and (16). We set m = n, β = 10/m and η1 = η0 in our experiments. We used φ(k) = k + 1 when applying the smoothing technique. Since SGD requires diminishing step size to converge, we tested SGD with diminishing step size in the form η/(k + 1) with different constants η. The comparison results are shown in Figure 2. Similar as Figure 1, the dashed line with black color represents SGD with the best-tuned η, and the green and red dashed lines correspond to the other two choices of η; the solid lines represent SGD-BB with different η0. From Figures 2(a), 2(b) and 2(c) we can see that SGD-BB gives comparable or even better suboptimality than SGD with best-tuned diminishing step size, and SGD-BB is significantly better than SGD with the other two choices of step size. From Figures 2(d), 2(e) and 2(f) we see that after only a few epochs, the step sizes generated by SGD-BB approximately coincide with the best-tuned ones. It can also be seen that after only a few epochs, the step sizes are stabilized by the smoothing technique and they approximately follow the same decreasing trend as the best-tuned diminishing step sizes. 5.3 Comparison with Other Methods We also compared our algorithms with many existing related methods. Experimental results also demonstrated the superiority of our methods. The results are given in the supplementary materials. Acknowledgements Research of Shiqian Ma was supported in part by the Hong Kong Research Grants Council General Research Fund (Grant 14205314). Research of Yu-Hong Dai was supported by the Chinese NSF (Nos. 11631013 and 11331012) and the National 973 Program of China (No. 2015CB856000). 8 References [1] R. Babanezhad, M. O. Ahmed, A. Virani, M. Schmidt, K. Koneˇcn`y, and S. Sallinen. Stop wasting my gradients: Practical SVRG. In Advances in Neural Information Processing Systems, pages 2242–2250, 2015. [2] J. Barzilai and J. M. Borwein. Two-point step size gradient methods. IMA Journal of Numerical Analysis, 8(1):141–148, 1988. [3] Y.-H. Dai. A new analysis on the Barzilai-Borwein gradient method. Journal of Operations Research Society of China, 1(2):187–198, 2013. [4] Y.-H. Dai and R. Fletcher. Projected Barzilai-Borwein methods for large-scale box-constrained quadratic programming. Numerische Mathematik, 100(1):21–47, 2005. [5] Y.-H. Dai, W. W. Hager, K. Schittkowski, and H. Zhang. The cyclic Barzilai-Borwein method for unconstrained optimization. IMA Journal of Numerical Analysis, 26(3):604–627, 2006. [6] Y.-H. Dai and L. Liao. R-linear convergence of the Barzilai and Borwein gradient method. IMA Journal of Numerical Analysis, 22:1–10, 2002. [7] 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. [8] J. Duchi, E. Hazan, and Y. Singer. Adaptive subgradient methods for online learning and stochastic optimization. The Journal of Machine Learning Research, 12:2121–2159, 2011. [9] R. Fletcher. On the Barzilai-Borwein method. In Optimization and control with applications, pages 235–256. Springer, 2005. [10] R. Johnson and T. Zhang. Accelerating stochastic gradient descent using predictive variance reduction. In Advances in Neural Information Processing Systems, pages 315–323, 2013. [11] H. Kesten. Accelerated stochastic approximation. The Annals of Mathematical Statistics, 29(1):41–59, 1958. [12] M. Mahsereci and P. Hennig. Probabilistic line searches for stochastic optimization. arXiv preprint arXiv:1502.02846, 2015. [13] P. Y. Massé and Y. Ollivier. Speed learning on the fly. arXiv preprint arXiv:1511.02540, 2015. [14] M. Raydan. On the Barzilai and Borwein choice of steplength for the gradient method. IMA Journal of Numerical Analysis, 13(3):321–326, 1993. [15] M. Raydan. The Barzilai and Borwein gradient method for the large scale unconstrained minimization problem. SIAM Journal on Optimization, 7(1):26–33, 1997. [16] R. L. Roux, M. Schmidt, and F. Bach. A stochastic gradient method with an exponential convergence rate for finite training sets. In Advances in Neural Information Processing Systems, pages 2663–2671, 2012. [17] S. Shalev-Shwartz and T. Zhang. Stochastic dual coordinate ascent methods for regularized loss minimization. Jornal of Machine Learning Research, 14:567–599, 2013. [18] K. Sopyła and P. Drozda. Stochastic gradient descent with Barzilai-Borwein update step for svm. Information Sciences, 316:218–233, 2015. [19] Y. Wang and S. Ma. Projected Barzilai-Borwein methods for large scale nonnegative image restorations. Inverse Problems in Science and Engineering, 15(6):559–583, 2007. [20] Z. Wen, W. Yin, D. Goldfarb, and Y. Zhang. A fast algorithm for sparse reconstruction based on shrinkage, subspace optimization, and continuation. SIAM J. SCI. COMPUT, 32(4):1832–1857, 2010. [21] S. J. Wright, R. D. Nowak, and M. A. T. Figueiredo. Sparse reconstruction by separable approximation. IEEE Transactions on Signal Processing, 57(7):2479–2493, 2009. 9 | 2016 | 458 |
6,392 | The Power of Optimization from Samples Eric Balkanski Harvard University ericbalkanski@g.harvard.edu Aviad Rubinstein University of California, Berkeley aviad@eecs.berkeley.edu Yaron Singer Harvard University yaron@seas.harvard.edu Abstract We consider the problem of optimization from samples of monotone submodular functions with bounded curvature. In numerous applications, the function optimized is not known a priori, but instead learned from data. What are the guarantees we have when optimizing functions from sampled data? In this paper we show that for any monotone submodular function with curvature c there is a (1 −c)/(1 + c −c2) approximation algorithm for maximization under cardinality constraints when polynomially-many samples are drawn from the uniform distribution over feasible sets. Moreover, we show that this algorithm is optimal. That is, for any c < 1, there exists a submodular function with curvature c for which no algorithm can achieve a better approximation. The curvature assumption is crucial as for general monotone submodular functions no algorithm can obtain a constant-factor approximation for maximization under a cardinality constraint when observing polynomially-many samples drawn from any distribution over feasible sets, even when the function is statistically learnable. 1 Introduction Traditionally, machine learning is concerned with predictions: assuming data is generated from some model, the goal is to predict the behavior of the model on data similar to that observed. In many cases however, we harness machine learning to make decisions: given observations from a model the goal is to find its optimum, rather than predict its behavior. Some examples include: • Ranking in information retrieval: In ranking the goal is to select k 2 N documents that are most relevant for a given query. The underlying model is a function which maps a set of documents and a given query to its relevance score. Typically we do not to have access to the scoring function, and thus learn it from data. In the learning to rank framework, for example, the input consists of observations of document-query pairs and their relevance score. The goal is to construct a scoring function of query-document pairs so that given a query we can decide on the k most relevant documents. • Optimal tagging: The problem of optimal tagging consists of picking k tags for some new content to maximize incoming traffic. The model is a function which captures the way in which users navigate through content given their tags. Since the algorithm designer cannot know the behavior of every online user, the model is learned from observations on user navigation in order to make a decision on which k tags maximize incoming traffic. • Influence in networks: In influence maximization the goal is to identify a subset of individuals who can spread information in a manner that generates a large cascade. The underlying 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. assumption is that there is a model of influence that governs the way in which individuals forward information from one to another. Since the model of influence is not known, it is learned from data. The observed data is pairs of a subset of nodes who initiated a cascade and the total number of individuals influenced. The decision is the optimal set of influencers. In the interest of maintaining theoretical guarantees on the decisions, we often assume that the generative model has some structure which is amenable to optimization. When the decision variables are discrete quantities a natural structure for the model is submodularity. A function f : 2N ! R defined over a ground set N = {e1, . . . , en} of elements is submodular if it exhibits a diminishing marginal returns property, i.e., fS(e) ≥fT (e) for all sets S ✓T ✓N and element e 62 T where fS(e) = f(S [ e) −f(S) is the marginal contribution of element e to set S ✓N. This diminishing returns property encapsulates numerous applications in machine learning and data mining and is particularly appealing due to its theoretical guarantees on optimization (see related work below). The guarantees on optimization of submodular functions apply to the case in which the algorithm designer has access to some succinct description of the function, or alternatively some idealized value oracle which allows querying for function values of any given set. In numerous settings such as in the above examples, we do not have access to the function or its value oracle, but rather learn the function from observed data. If the function learned from data is submodular we can optimize it and obtain a solution with provable guarantees on the learned model. But how do the guarantees of this solution on the learned model relate to its guarantees on the generative model? If we obtain an approximate optimum on the learned model which turns out to be far from the optimum of the submodular function we aim to optimize, the provable guarantees at hand do not apply. Optimization from samples. For concreteness, suppose that the generative model is a monotone submodular function f : 2N ! R and we wish to find a solution to maxS:|S|k f(S). To formalize the concept of observations in standard learning-theoretic terms, we can assume that we observe samples of sets drawn from some distribution D and their function values, i.e. {(Si, f(Si))}m i=1. In terms of learnability, under some assumptions about the distribution and the function, submodular functions are statistically learnable (see discussion about PMAC learnability). In terms of approximation guarantees for optimization, a simple greedy algorithm obtains a 1 −1/e-approximation. Recent work shows that optimization from samples is generally impossible [4], even for models that are learnable and optimizable. In particular, even for maximizing coverage functions, which are a special case of submodular functions and widely used in practice, no algorithm can obtain a constant factor approximation using fewer than exponentially many samples of feasible solutions drawn from any distribution. In practice however, the functions we aim to optimize may be better behaved. An important property of submodular functions that has been heavily explored recently is that of curvature. Informally, the curvature is a measure of how far the function is to being modular. A function f is modular if f(S) = P e2S f(e), and has curvature c 2 [0, 1] if fS(e) ≥(1 −c)f(e) for any S ✓N. Curvature plays an important role since the hard instances of submodular optimization often occur only when the curvature is unbounded, i.e., c close to 1. The hardness results for optimization from samples are no different, and apply when the curvature is unbounded. What are the guarantees for optimization from samples of submodular functions with bounded curvature? In this paper we study the power of optimization from samples when the curvature is bounded. Our main result shows that for any monotone submodular function with curvature c there is an algorithm which observes polynomially-many samples from the uniform distribution over feasible sets and obtains an approximation ratio of (1 −c)/(1 + c −c2) −o(1). Furthermore, we show that this bound is tight. For any c < 1, there exist monotone submodular functions with curvature c for which no algorithm can obtain an approximation better than (1 −c)/(1 + c −c2) + o(1) given polynomially many samples. We also perform experiments on synthetic hard instances of monotone submodular functions that convey some interpretation of our results. For the case of modular functions a 1 −o(1) algorithm can be obtained and as a consequence leads to a (1 −c)2 algorithm for submodular functions with bounded curvature [4]. The goal of this work is to exploit the curvature property to obtain the optimal algorithm for optimization from samples. 2 A high-level overview of the techniques. The algorithm estimates the expected marginal contribution of each element to a random set. It then returns the (approximately) best set between the set of elements with the highest estimates and a random set. The curvature property is used to bound the differences between the marginal contribution of each element to: (1) a random set, (2) the set of elements with highest (estimated) marginal contributions to a random set, and (3) the optimal set. A key observation in the analysis is that if the difference between (1) and (3) is large, then a random set has large value (in expectation). To obtain our matching inapproximability result, we construct an instance where, after viewing polynomially many samples, the elements of the optimal set cannot be distinguished from a much larger set of elements that have high marginal contribution to a random set, but low marginal contribution when combined with each other. The main challenge is constructing the optimal elements such that they have lower marginal contribution to a random set than to the other optimal elements. This requires carefully defining the way different types of elements interact with each other, while maintaining the global properties of monotonicity, submodularity, and bounded curvature. 1.1 Related work Submodular maximization. In the traditional value oracle model, an algorithm may adaptively query polynomially many sets Si and obtain via a black-box their values f(Si). It is well known that in this model, the greedy algorithm obtains a 1 −1/e approximation for a wide range of constraints including cardinality constraints [23], and that no algorithm can do better [6]. Submodular optimization is an essential tool for problems in machine learning and data mining such as sensor placement [20, 12], information retrieval [28, 14], optimal tagging [24], influence maximization [19, 13], information summarization [21, 22], and vision [17, 18]. Learning. A recent line of work focuses on learning submodular functions from samples [3, 8, 2, 10, 11, 1, 9]. The standard model to learn submodular functions is ↵-PMAC learnability introduced by Balcan and Harvey [3] which generalizes the well known PAC learnability framework from Valiant [26]. Informally, a function is PAC or PMAC learnable if given polynomially samples, it is possible to construct a function that is likely to mimic the function for which the samples are coming form. Monotone submodular functions are ↵-PMAC learnable from samples coming from a product distribution for some constant ↵and under some assumptions [3]. Curvature. In the value oracle model, the greedy algorithm is a (1 −e−c)/c approximation algorithm for cardinality constraints [5]. Recently, Sviridenko et al. [25] improved this approximation to 1 −c/e with variants of the continuous greedy and local search algorithms. Submodular optimization and curvature have also been studied for more general constraints [27, 15] and submodular minimization [16]. The curvature assumption has applications in problems such as maximum entropy sampling [25], column-subset selection [25], and submodular welfare [27]. 2 Optimization from samples We precisely define the framework of optimization from samples. A sample (S, f(S)) of function f(·) is a set and its value. As with the PMAC-learning framework, the samples (Si, f(Si)) are such that the sets Si are drawn i.i.d. from a distribution D. As with the standard optimization framework, the goal is to return a set S satisfying some constraint M ✓2N such that f(S) is an ↵-approximation to the optimal solution f(S?) with S? 2 M. A class of functions F is ↵-optimizable from samples under constraint M and over distribution D if for all functions f(·) 2 F there exists an algorithm which, given polynomially many samples (Si, f(Si)), returns with high probability over the samples a set S 2 M such that f(S) ≥↵· max T 2M f(T). In the unconstrained case, a random set achieves a 1/4-approximation for general (not necessarily monotone) submodular functions [7]. We focus on the constrained case and consider a simple cardinality constraint M, i.e., M = {S : |S| k}. To avoid trivialities in the framework, it is important to fix a distribution D. We consider the distribution D to be the uniform distribution over all feasible sets, i.e., all sets of size at most k. 3 We are interested in functions that are both learnable and optimizable. It is already known that there exists classes of functions, such as coverage and submodular, that are both learnable and optimizable but not optimizable from samples for M and D defined above. This paper studies optimization from samples under some additional assumption: curvature. We assume that the curvature c of the function is known to the algorithm designer. In the appendix, we show an impossibility result for learning the curvature of a function from samples. 3 An optimal algorithm We design a (1−c)/(1+c−c2)−o(1)-optimization from samples algorithm for monotone submodular functions with curvature c. In the next section, we show that this approximation ratio is tight. The main contribution is improving over the (1 −c)2 −o(1) approximation algorithm from [4] to obtain a tight bound on the approximation. The algorithm. Algorithm 1 first estimates the expected marginal contribution of each element ei to a uniformly random set of size k −1, which we denote by R for the remaining of this section. These expected marginal contributions ER[fR(ei)] are estimated with ˆvi. The estimates ˆvi are the differences between the average value avg(Sk,i) := (P T 2Sk,i f(T))/|Sk,i| of the collection Sk,i of samples of size k containing ei and the average value of the collection Sk−1,i−1 of samples of size k −1 not containing ei. We then wish to return the best set between the random set R and the set S consisting of the k elements with the largest estimates ˆvi. Since we do not know the value of S, we lower bound it with ˆvS using the curvature property. We estimate the expected value ER[f(R)] of R with ˆvR, which is the average value of the collection Sk−1 of all samples of size k −1. Finally, we compare the values of S and R using ˆvS and ˆvR to return the best of these two sets. Algorithm 1 A tight (1 −c)/(1 + c −c2) −o(1)-optimization from samples algorithm for monotone submodular functions with curvature c Input: S = {Si : (Si, f(Si)) is a sample} 1: ˆvi avg(Sk,i) −avg(Sk−1,i−1) 2: S argmax|T |=k P i2T ˆvi 3: ˆvS (1 −c) P ei2S ˆvi a lower bound on the value of f(S) 4: ˆvR avg(Sk−1) an estimate of the value of a random set R 5: if ˆvS ≥ˆvR then 6: return S 7: else 8: return R 9: end if The analysis. Without loss of generality, let S = {e1, . . . , ek} be the set defined in Line 2 of the algorithm and define Si to be the first i elements in S, i.e., Si := {e1, . . . , ei}. Similarly, for the optimal solution S?, we have S? = {e? 1, . . . , e? k} and S? i := {e? 1, . . . , e? i }. We abuse notation and denote by f(R) and fR(e) the expected values ER[f(R)] and ER[fR(e)] where the randomization is over the random set R of size k −1. At a high level, the curvature property is used to bound the loss from f(S) to P ik fR(ei) and from P ik fR(e? i ) to f(S?). By the algorithm, P ik fR(ei) is greater than P ik fR(e? i ). When bounding the loss from P ik fR(e? i ) to f(S?), a key observation is that if this loss is large, then it must be the case that R has a high expected value. This observation is formalized in our analysis by bounding this loss in terms of f(R) and motivates Algorithm 1 returning the best of R and S. Lemma 1 is the main part of the analysis and gives an approximation for S. The approximation guarantee for Algorithm 1 (formalized as Theorem 1) follows by finding the worst-case ratios of f(R) and f(S). Lemma 1. Let S be the set defined in Algorithm 1 and f(·) be a monotone submodular function with curvature c, then f(S) ≥(1 −o(1))ˆvS ≥ ✓ (1 −c) ✓ 1 −c · f(R) f(S?) ◆ −o(1) ◆ f(S?). 4 Proof. First, observe that f(S) = X ik fSi−1(ei) ≥(1 −c) X ik f(ei) ≥(1 −c) X ik fR(ei) where the first inequality is by curvature and the second is by monotonicity. We now claim that w.h.p. and with a sufficiently large polynomial number of samples the estimates of the marginal contribution of an element are precise, fR(ei) + f(S?) n2 ≥ˆvi ≥fR(ei) −f(S?) n2 and defer the proof to the appendix. Thus f(S) ≥(1 −c) P ik ˆvi −f(S?)/n ≥ˆvS −f(S?)/n. Next, by the definition of S in the algorithm, we get ˆvS 1 −c = X ik ˆvi ≥ X ik ˆv? i ≥ X ik fR(e? i ) −f(S?) n . It is possible to obtain a 1 −c loss between P ik fR(e? i ) and f(S?) with a similar argument as in the first part. The key idea to improve this loss is to use the curvature property on the elements in R instead of on the elements e? i 2 S?. By curvature, we have that fS?(R) ≥(1 −c)f(R). We now wish to relate fS?(R) and P ik fR(e? i ). Note that f(S?)+fS?(R) = f(R[S?) = f(R)+fR(S?) by the definition of marginal contribution and P ik fR(e? i ) ≥fR(S?) by submodularity. We get P ik fR(e? i ) ≥f(S?) + fS?(R) −f(R) by combining the previous equation and inequality. By the previous curvature observation, we conclude that X ik fR(e? i ) ≥f(S?) + (1 −c)f(R) −f(R) = ✓ 1 −c · f(R) f(S?) ◆ f(S?). Combining Lemma 1 and the fact that we obtain value at least max{f(R), (1 −c) Pk i=1 ˆvi}, we obtain the main result of this section. Theorem 1. Let f(·) be a monotone submodular function with curvature c. Then Algorithm 1 is a (1 −c)/(1 + c −c2) −o(1) optimization from samples algorithm. Proof. In the appendix, we show that the estimate ˆvR of f(R) is precise, the estimate is such that f(R) + f(S?)/n2 ≥ˆvR ≥f(R) −f(S?)/n2. In addition, by the first inequality in Lemma 1, f(S) ≥(1 −o(1))ˆvS. So by the algorithm and the second inequality in Lemma 1, the approximation obtained by the set returned is at least (1 −o(1)) · max ⇢f(R) f(S?), ˆvS f(S?) & ≥(1 −o(1)) · max ⇢f(R) f(S?), (1 −c) ✓ 1 −c · f(R) f(S?) ◆& . Let x := f(R)/f(S⇤), the best of f(R)/f(S?) and (1−c) (1 −c · f(R)/f(S?))−o(1) is minimized when x = (1 −c)(1 −cx), or when x = (1 −c)/(1 + c −c2). Thus, the approximation obtained is at least (1 −c)/(1 + c −c2) −o(1). 4 Hardness We show that the approximation obtained by Algorithm 1 is tight. For every c < 1, there exists monotone submodular functions that cannot be (1 −c)/(1 + c −c2)-optimized from samples. This impossibility result is information theoretic, we show that with high probability the samples do not contain the right information to obtain a better approximation. Technical overview. To obtain a tight bound, all the losses from Algorithm 1 must be tight. We need to obtain a 1 −cf(R)/f(S?) gap between the contribution of optimal elements to a random set P ik fR(e? i ) and the value f(S?). This gap implies that as a set grows with additional random elements, the contribution of optimal elements must decrease. The main difficulty is in obtaining this decrease while maintaining random sets of small value, submodularity, and the curvature. 5 0 0 function value log n set size s g(s,0) b(s) 1/(1+c-c2) loss: 1-c loss: g(s,sP ≥ k – 2log n) Figure 1: The symmetric functions g(sG, sP ) and b(sB). The ground set of elements is partitioned into three parts: the good elements G, the bad elements B, and the poor elements P. In relation to the analysis of the algorithm, the optimal solution S? is G, the set S consists mostly of elements in B, and a random set consists mostly of elements in P. The values of the good, bad, and poor elements are given by the good, bad, and poor functions g(·), b(·), and p(·) to be later defined and the functions f(·) we construct for the impossibility result are: f G(S) := g(S \ G, S \ P) + b(S \ B) + p(S \ P). The value of the good function is also dependent on the poor elements to obtain the decrease in marginal contribution of good elements mentioned above. The proof of the hardness result (Theorem 2) starts with concentration bounds in Lemma 2 to show that w.h.p. every sample contains a small number of good and bad elements and a large number of poor elements. Using these concentration bounds, Lemma 3 gives two conditions on the functions g(·), b(·), and p(·) to obtain the desired result. Informally, the first condition is that good and bad elements cannot be distinguished while the second is that G has larger value than a set with a small number of good elements. We then construct these functions and show that they satisfy the two conditions in Lemma 4. Finally, Lemma 5 shows that f(·) is monotone submodular with curvature c. Theorem 2. For every c < 1, there exists a hypothesis class of monotone submodular functions with curvature c that is not (1 −c)/(1 + c −c2) + o(1) optimizable from samples. The remaining of this section is devoted to the proof of Theorem 2. Let ✏> 0 be some small constant. The set of poor elements P is fixed and has size n −n2/3−✏. The good elements G are then a uniformly random subset of P C of size k := n1/3, the remaining elements B are the bad elements. The following concentration bound is used to show that elements in G and B cannot be distinguished. The proof is deferred to the appendix. Lemma 2. All samples S are such that |S \ (G [ B)| log n and |S \ P| ≥k −2 log n w.h.p.. We now give two conditions on the good, bad, and poor functions to obtain an impossibility result based on the above concentration bounds. The first condition ensures that good and bad elements cannot be distinguished. The second condition quantifies the gap between the value of k good elements and a set with a small number of good elements. We denote by sG the number of good elements in a set S, i.e., sG := |S \ G| and define similarly sB and sP . The good, bad, and, poor functions are symmetric, meaning they each have equal value over sets of equal size, and we abuse the notation with g(sG, sP ) = g(S \ G, S \ P) and similarly for b(sB) and p(sP ). Figure 1 is a simplified illustration of these two conditions. Lemma 3. Consider sets S and S0, and assume g(·), b(·), and p(·) are such that 1. g(sG, sP ) + b(sB) = g(s0 G, s0 P ) + b(s0 B) if • sG + sB = s0 G + s0 B log n and sP , s0 P ≥k −2 log n, 2. g(sG, sP ) + b(sB) + p(sP ) < ↵· g(k, 0) if • sG n✏and sG + sB + sP k then the hypothesis class of functions F = {f G(·) : G ✓P C, |G| = k} is not ↵-optimizable from samples. 6 Proof. By Lemma 2, for any two samples S and S0, sG + sB log n, s0 G + s0 B log n and sP , s0 P ≥k −2 log n with high probability. If sG + sB = s0 G + s0 B, then by the first assumption, g(sG, sP ) + b(sB) = g(s0 G, s0 P ) + b(s0 B). Recall that G is a uniformly random subset of the fixed set P C and that B consists of the remaining elements in P C. Thus, w.h.p., the value f G(S) of all samples S is independent of which random subset G is. In other words, no algorithm can distinguish good elements from bad elements with polynomially many samples. Let T be the set returned by the algorithm. Since any decision of the algorithm is independent from G, the expected number of good elements in T is tG k · |G|/|G [ B| = k2/n2/3−✏= n✏. Thus, EG ⇥ f G(T) ⇤ = g(tG, tP ) + b(tB) + p(tP ) g(n✏, tP ) + b(tB) + p(tP ) < ↵· g(k, 0) where the first inequality is by the submodularity and monotonicity properties of the good elements G for f G(·) and the second inequality is by the second condition of the lemma. By expectations, the set S returned by the algorithm is therefore not an ↵-approximation to the solution G for at least one function f G(·) 2 F and F is not ↵-optimizable from samples. Constructing g(·), b(·), p(·). The goal is now to construct g(·), b(·) and p(·) that satisfy the above conditions. We start with the good and bad function: g(sG, sP ) = ( sG · ⇣ 1 − ⇣ 1 − 1 1+c−c2 ⌘ · sP · 1 k−2 log n ⌘ if sp k −2 log n sG · 1 1+c−c2 otherwise b(sB) = ( sB · 1 1+c−c2 if sB log n (sB −log n) · 1−c 1+c−c2 + log n · 1 1+c−c2 otherwise These functions exactly exhibit the losses from the analysis of the algorithm in the case where the algorithm returns bad elements. As illustrated in Figure 1, there is a 1 −c loss between the contribution 1/(1 + c −c2) of a bad element to a random set and its contribution (1 −c)/(1 + c −c2) to a set with at least log n bad elements. There is also a 1/(1 + c −c2) loss between the contribution 1 of a good element to a set with no poor elements and its contribution 1/(1 + c −c2) to a random set. We add a function p(sP ) to f G(·) so that it is monotone increasing when adding poor elements. p(sP ) = (sp · 1−c 1+c−c2 · k k−2 log n if sP k −2 log n ⇣ (sp −(k −2 log n)) (1−c)2 1+c−c2 + (k −2 log n) 1−c 1+c−c2 ⌘ k k−2 log n otherwise The next two lemmas show that theses function satisfy Lemma 3 and that f G(·) is monotone submodular with curvature c, which concludes the proof of Theorem 2. Lemma 4. The functions g(·), b(·), and p(·) defined above satisfy the conditions of Lemma 3 with ↵= (1 −c)/(1 + c −c2) + o(1). Proof. We start with the first condition. Assume sG + sB = s0 G + s0 B log n and sP , s0 P ≥ k −2 log n. Then, g(sG, sP ) + b(sB) = (sG + sB) · 1 1 + c −c2 = (s0 G + s0 B) · 1 1 + c −c2 = g(s0 G, s0 P ) + b(s0 B). For the second condition, assume sG n✏and sG + sB + sP k. It is without loss to assume that sB + sP ≥k −n✏, then f G(S) (1 + o(1)) · (sB + sP ) · 1 −c 1 + c −c2 k · ✓ 1 −c 1 + c −c2 + o(1) ◆ . We conclude by noting that g(k, 0) = k. Lemma 5. The function f G(·) is a monotone submodular function with curvature c. Proof. We show that the marginal contributions are positive (monotonicity), decreasing (submodularity), but not by more than a 1 −c factor (curvature), i.e., that fS(e) ≥fT (e) ≥(1 −c)fS(e) ≥0 for all S ✓T and e 62 T. Let e be a good element, then f G S (e) = (⇣ 1 − ⇣ 1 − 1 1+c−c2 ⌘ · sP · 1 k−2 log n ⌘ if sp k −2 log n 1 1+c−c2 otherwise. 7 Since sP tP for S ✓T, we obtain fS(e) ≥fT (e) ≥0. It is also easy to see that we get fT (e) ≥ 1 1+c−c2 ≥(1 −c) ≥(1 −c)fS(e). For bad elements, f G S (e) = ( 1 1+c−c2 if sB log n 1−c 1+c−c2 otherwise. Thus, fS(e) ≥fT (e) ≥(1 −c)fS(e) ≥0 for all S ✓T and e 62 T. Finally, for poor elements, f G S (e) = 8 < : − ⇣ 1 − 1 1+c−c2 ⌘ · sG · 1 k−2 log n + 1−c 1+c−c2 · k k−2 log n if sP k −2 log n (1−c)2 1+c−c2 k k−2 log n otherwise. Since sG k, 1 −c 1 + c −c2 · k k −2 log n ≥f G S (e) ≥ (1 −c)2 1 + c −c2 k k −2 log n. Consider S ✓T, then sG tG, and fS(e) ≥fT (e) ≥(1 −c)fS(e) ≥0. 5 Experiments Figure 2: The objective f(·) as a function of the cardinality constraint k. We perform simulations on simple synthetic functions. These experiments are meant to complement the theoretical analysis by conveying some interpretations of the bounds obtained. The synthetic functions are a simplification of the construction for the impossibility result. The motivation for these functions is to obtain hard instances that are challenging for the algorithm. More precisely, the function considered is f(S) = ⇢|S \ (G [ B)| if |S \ B| 10 |S \ G| + |S \ B| · (1 −c) −10c otherwise, where G and B are fixed sets of size 102 and 103 respectively. The ground set N contains 105 elements. It is easy to verify that f(·) has curvature c. This function is hard to optimize since the elements in G and B cannot be distinguished from samples. Figure 3: The approximation as a function of the curvature 1 −c when k = 100. We consider several benchmarks. The first is the value obtained by the learn then optimize approach where we first learn the function and then optimize the learned function. Equivalently, this is a random set of size k, since the learned function is a constant with the algorithm from [3]. We also compare our algorithm to the value of the best sample observed. The solution returned by the greedy algorithm is an upper bound and is a solution obtainable only in the full information setting. The results are summarized in Figure 2 and 3. In Figure 2, the value of greedy, best sample, and random set do not change for different curvatures c since w.h.p. they pick at most 10 elements from B. For curvature c = 0, when the function is modular, our algorithm performs as well as the greedy algorithm, which is optimal. As the curvature increases, the solution obtained by our algorithm worsens, but still significantly outperforms the best sample and a random set. The power of our algorithm is that it is capable to distinguish elements in G [ B from the other elements. 8 References [1] Balcan, M. (2015). Learning submodular functions with applications to multi-agent systems. In AAMAS. [2] Balcan, M., Constantin, F., Iwata, S., and Wang, L. (2012). Learning valuation functions. In COLT. [3] Balcan, M. and Harvey, N. J. A. (2011). Learning submodular functions. In STOC. [4] Balkanski, E., Rubinstein, A., and Singer, Y. (2015). The limitations of optimization from samples. arXiv preprint arXiv:1512.06238. [5] Conforti, M. and Cornuéjols, G. (1984). Submodular set functions, matroids and the greedy algorithm: tight worst-case bounds and some generalizations of the rado-edmonds theorem. Discrete applied mathematics. [6] Feige, U. (1998). A threshold of ln n for approximating set cover. JACM. [7] Feige, U., Mirrokni, V. S., and Vondrak, J. (2011). Maximizing non-monotone submodular functions. SIAM Journal on Computing. [8] Feldman, V. and Kothari, P. (2014). Learning coverage functions and private release of marginals. In COLT. [9] Feldman, V., Kothari, P., and Vondrák, J. (2013). Representation, approximation and learning of submodular functions using low-rank decision trees. In COLT. [10] Feldman, V. and Vondrák, J. (2013). Optimal bounds on approximation of submodular and XOS functions by juntas. In FOCS. [11] Feldman, V. and Vondrák, J. (2015). Tight bounds on low-degree spectral concentration of submodular and XOS functions. CoRR. [12] Golovin, D., Faulkner, M., and Krause, A. (2010). Online distributed sensor selection. In IPSN. [13] Gomez Rodriguez, M., Leskovec, J., and Krause, A. (2010). Inferring networks of diffusion and influence. In SIGKDD. [14] Hang, L. (2011). A short introduction to learning to rank. IEICE. [15] Iyer, R. K. and Bilmes, J. A. (2013). Submodular optimization with submodular cover and submodular knapsack constraints. In NIPS. [16] Iyer, R. K., Jegelka, S., and Bilmes, J. A. (2013). Curvature and optimal algorithms for learning and minimizing submodular functions. In NIPS. [17] Jegelka, S. and Bilmes, J. (2011a). Submodularity beyond submodular energies: coupling edges in graph cuts. In CVPR. [18] Jegelka, S. and Bilmes, J. A. (2011b). Approximation bounds for inference using cooperative cuts. In ICML. [19] Kempe, D., Kleinberg, J., and Tardos, É. (2003). Maximizing the spread of influence through a social network. In SIGKDD. [20] Leskovec, J., Krause, A., Guestrin, C., Faloutsos, C., VanBriesen, J., and Glance, N. (2007). Cost-effective outbreak detection in networks. In SIGKDD. [21] Lin, H. and Bilmes, J. (2011a). A class of submodular functions for document summarization. In NAACL HLT. [22] Lin, H. and Bilmes, J. A. (2011b). Optimal selection of limited vocabulary speech corpora. In INTERSPEECH. [23] Nemhauser, G. L., Wolsey, L. A., and Fisher, M. L. (1978). An analysis of approximations for maximizing submodular set functions ii. Math. Programming Study 8. [24] Rosenfeld, N. and Globerson, A. (2016). Optimal Tagging with Markov Chain Optimization. arXiv preprint arXiv:1605.04719. [25] Sviridenko, M., Vondrák, J., and Ward, J. (2015). Optimal approximation for submodular and supermodular optimization with bounded curvature. In SODA. [26] Valiant, L. G. (1984). A Theory of the Learnable. Commun. ACM. [27] Vondrák, J. (2010). Submodularity and curvature: the optimal algorithm. RIMS. [28] Yue, Y. and Joachims, T. (2008). Predicting diverse subsets using structural svms. In ICML. 9 | 2016 | 459 |
6,393 | Learning brain regions via large-scale online structured sparse dictionary-learning Elvis Dohmatob, Arthur Mensch, Gael Varoquaux, Bertrand Thirion firstname.lastname@inria.fr Parietal Team, INRIA / CEA, Neurospin, Université Paris-Saclay, France Abstract We propose a multivariate online dictionary-learning method for obtaining decompositions of brain images with structured and sparse components (aka atoms). Sparsity is to be understood in the usual sense: the dictionary atoms are constrained to contain mostly zeros. This is imposed via an ℓ1-norm constraint. By "structured", we mean that the atoms are piece-wise smooth and compact, thus making up blobs, as opposed to scattered patterns of activation. We propose to use a Sobolev (Laplacian) penalty to impose this type of structure. Combining the two penalties, we obtain decompositions that properly delineate brain structures from functional images. This non-trivially extends the online dictionary-learning work of Mairal et al. (2010), at the price of only a factor of 2 or 3 on the overall running time. Just like the Mairal et al. (2010) reference method, the online nature of our proposed algorithm allows it to scale to arbitrarily sized datasets. Preliminary xperiments on brain data show that our proposed method extracts structured and denoised dictionaries that are more intepretable and better capture inter-subject variability in small medium, and large-scale regimes alike, compared to state-of-the-art models. 1 Introduction In neuro-imaging, inter-subject variability is often handled as a statistical residual and discarded. Yet there is evidence that it displays structure and contains important information. Univariate models are ineffective both computationally and statistically due to the large number of voxels compared to the number of subjects. Likewise, statistical analysis of weak effects on medical images often relies on defining regions of interests (ROIs). For instance, pharmacology with Positron Emission Tomography (PET) often studies metabolic processes in specific organ sub-parts that are defined from anatomy. Population-level tests of tissue properties, such as diffusion, or simply their density, are performed on ROIs adapted to the spatial impact of the pathology of interest. Also, in functional brain imaging, e.g function magnetic resonance imaging (fMRI), ROIs must be adapted to the cognitive process under study, and are often defined by the very activation elicited by a closely related process [18]. ROIs can boost statistical power by reducing multiple comparisons that plague image-based statistical testing. If they are defined to match spatially the differences to detect, they can also improve the signal-to-noise ratio by averaging related signals. However, the crux of the problem is how to define these ROIs in a principled way. Indeed, standard approaches to region definition imply a segmentation step. Segmenting structures in individual statistical maps, as in fMRI, typically yields meaningful units, but is limited by the noise inherent to these maps. Relying on a different imaging modality hits cross-modality correspondence problems. Sketch of our contributions. In this manuscript, we propose to use the variability of the statistical maps across the population to define regions. This idea is reminiscent of clustering approaches, that have been employed to define spatial units for quantitative analysis of information as diverse as brain fiber tracking, brain activity, brain structure, or even imaging-genetics. See [21, 14] and references therein. The key idea is to group together features –voxels of an image, vertices on a mesh, fiber tracts– 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. based on the quantity of interest, to create regions –or fiber bundles– for statistical analysis. However, unlike clustering that models each observation as an instance of a cluster, we use a model closer to the signal, where each observation is a linear mixture of several signals. The model is closer to mode finding, as in a principal component analysis (PCA), or an independent component analysis (ICA), often used in brain imaging to extract functional units [5]. Yet, an important constraint is that the modes should be sparse and spatially-localized. For this purpose, the problem can be reformulated as a linear decomposition problem like ICA/PCA, with appropriate spatial and sparse penalties [25, 1]. We propose a multivariate online dictionary-learning method for obtaining decompositions with structured and sparse components (aka atoms). Sparsity is to be understood in the usual sense: the atoms contain mostly zeros. This is imposed via an ℓ1 penalty on the atoms. By "structured", we mean that the atoms are piece-wise smooth and compact, thus making up blobs, as opposed to scattered patterns of activation. We impose this type of structure via a Laplacian penalty on the dictionary atoms. Combining the two penalties, we therefore obtain decompositions that are closer to known functional organization of the brain. This non-trivially extends the online dictionary-learning work [16], with only a factor of 2 or 3 on the running time. By means of experiments on a large public dataset, we show the improvements brought by the spatial regularization with respect to traditional ℓ1-regularized dictionary learning. We also provide a concise study of the impact of hyper-parameter selection on this problem and describe the optimality regime, based on relevant criteria (reproducibility, captured variability, explanatory power in prediction problems). 2 Smooth Sparse Online Dictionary-Learning (Smooth-SODL) Consider a stack X ∈Rn×p of n subject-level brain images X1, X2, . . . , Xn each of shape n1 × n2 × n3, seen as p-dimensional row vectors –with p = n1 × n2 × n3, the number of voxels. These could be images of fMRI activity patterns like statistical parametric maps of brain activation, raw pre-registered (into a common coordinate space) fMRI time-series, PET images, etc. We would like to decompose these images as a mixture of k ≤min(n, p) component maps (aka latent factors or dictionary atoms) V1, . . . , Vk ∈Rp×1 and modulation coefficients U1, . . . , Un ∈Rk×1 called codes (one k-dimensional code per sample point), i.e Xi ≈VUi, for i = 1, 2, . . . , n (1) where V := [V1| . . . |Vk] ∈Rp×k, an unknown dictionary to be estimated. Typically, p ∼105 – 106 (in full-brain high-resolution fMRI) and n ∼102 – 105 (for example, in considering all the 500 subjects and all the about functional tasks of the Human Connectome Project dataset [20]). Our work handles the extreme case where both n and p are large (massive-data setting). It is reasonable then to only consider under-complete dictionaries: k ≤min(n, p). Typically, we use k ∼50 or 100 components. It should be noted that online optimization is not only crucial in the case where n/p is big; it is relevant whenever n is large, leading to prohibitive memory issues irrespective of how big or small p is. As explained in section 1, we want the component maps (aka dictionary atoms) Vj to be sparse and spatially smooth. A principled way to achieve such a goal is to impose a boundedness constraint on ℓ1-like norms of these maps to achieve sparsity and simultaneously impose smoothness by penalizing their Laplacian. Thus, we propose the following penalized dictionary-learning model min V∈Rp×k lim n→∞ 1 n n X i=1 min Ui∈Rk 1 2∥Xi −VUi∥2 2 + 1 2α∥Ui∥2 2 ! + γ k X j=1 ΩLap(Vj). subject to V1, . . . , Vk ∈C (2) The ingredients in the model can be broken down as follows: • Each of the terms maxUi∈Rk 1 2∥Xi −VUi∥2 2 measures how well the current dictionary V explains data Xi from subject i. The Ridge penalty term φ(Ui) ≡1 2α∥Ui∥2 2 on the codes amounts to assuming that the energy of the decomposition is spread across the different samples. In the context of a specific neuro-imaging problem, if there are good grounds to assume that each sample / subject should be sparsely encoded across only a few atoms of the dictionary, then we can use the ℓ1 penalty φ(Ui) := α∥Ui∥1 as in [16]. We note that in 2 contrast to the ℓ1 penalty, the Ridge leads to stable codes. The parameter α > 0 controls the amount of penalization on the codes. • The constraint set C is a sparsity-inducing compact simple (mainly in the sense that the Euclidean projection onto C should be easy to comput) convex subset of Rp like an ℓ1-ball Bp,ℓ1(τ) or a simplex Sp(τ), defined respectively as Bp,ℓ1(τ) := {v ∈Rp s.t |v1| + . . . + |vp| ≤τ} , and Sp(τ) := Bp,ℓ1(τ) ∩Rp +. (3) Other choices (e.g ElasticNet ball) are of course possible. The radius parameter τ > 0 controls the amount of sparsity: smaller values lead to sparser atoms. • Finally, ΩLap is the 3D Laplacian regularization functional defined by ΩLap(v) := 1 2 p X k=1 (∇xv)2 k + (∇yv)2 k + (∇zv)2 k = 1 2vT ∆v ≥0, ∀v ∈Rp, (4) ∇x being the discrete spatial gradient operator along the x-axis (a p-by-p matrix), ∇y along the y-axis, etc., and ∆:= ∇T ∇is the p-by-p matrix representing the discrete Laplacian operator. This penalty is meant to impose blobs. The regularization parameter γ ≥0 controls how much regularization we impose on the atoms, compared to the reconstruction error. The above formulation, which we dub Smooth Sparse Online Dictionary-Learning (Smooth-SODL) is inspired by, and generalizes the standard online dictionary-learning framework of [16] –henceforth referred to as Sparse Online Dictionary-Learning (SODL)– with corresponds to the special case γ = 0. 3 Estimating the model 3.1 Algorithms The objective function in problem (2) is separately convex and block-separable w.r.t each of U and V but is not jointly convex in (U, V). Also, it is continuously differentiable on the constraint set, which is compact and convex. Thus by classical results (e.g Bertsekas [6]), the problem can be solved via Block-Coordinate Descent (BCD) [16]. Reasoning along the lines of [15], we derive that the BCD iterates are as given in Alg. 1 in which, for each incoming sample point Xt, the loading vector Ut is computing by solving a ridge regression problem (5) with the current dictionary Vt held fixed, and the dictionary atoms are then updated sequentially via Alg. 2. A crucial advantage of using a BCD scheme is that it is parameter free: there is not step size to tune. The resulting algorithm Alg. 1, is adapted from [16]. It relies on Alg. 2 for performing the structured dictionary updates, the details of which are discussed below. Algorithm 1 Online algorithm for the dictionary-learning problem (2) Require: Regularization parameters α, γ > 0; initial dictionary V ∈Rp×k, number of passes / iterations T on the data. 1: A0 ←0 ∈Rk×k, B0 ←0 ∈Rp×k (historical “sufficient statistics”) 2: for t = 1 to T do 3: Empirically draw a sample point Xt at random. 4: Code update: Ridge-regression (via SVD of current dictionary V) Ut ←argminu∈Rk 1 2∥Xt −Vu∥2 2 + 1 2α∥u∥2 2. (5) 5: Rank-1 updates: At ←At−1 + UtUT t , Bt ←Bt−1 + XtUT t 6: BCD dictionary update: Compute update for dictionary V using Alg. 2. 7: end for Update of the codes: Ridge-coding. The Ridge sub-problem for updating the codes Ut = (VT V + αI)−1VT Xt (6) 3 is computed via an SVD of the current dictionary V. For α ≈0, Ut reduces to the orthogonal projection of Xt onto the image of the current dictionary V. As in [16], we speed up the overall algorithm by sampling mini-batches of η samples Xt, . . . , Xη and compute the corresponding codes U1, U2, ..., Uη at once. We typically use we use mini-batches of size η = 20. BCD dictionary update for the dictionary atoms. Let us define time-varying matrices At := Pt i=1 UiUT i ∈Rk×k and Bt := Pt i=1 XiUT i ∈Rp×k, where t = 1, 2, . . . denotes time. We fix the matrix of codes U, and for each j, consider the update of the jth dictionary atom, with all the other atoms Vk̸=j kept fixed. The update for the atom Vj can then be written as Vj = argminv∈C,V=[V1|...|v|...|Vk] t X i=1 1 2∥Xi −VUi∥2 2 ! + γtΩLap(v) = argminv∈C Fγ(At[j,j]/t)−1(v, Vj + At[j, j]−1(Bj t −VAj t) | {z } refer to [16] for the details ), (7) where F˜γ(v, a) ≡1 2∥v −a∥2 2 + ˜γΩLap(v) = 1 2∥v −a∥2 2 + 1 2 ˜γvT ∆v. Algorithm 2 BCD dictionary update with Laplacian prior Require: V = [V1| . . . |Vk] ∈Rp×k (input dictionary), 1: A = [A1| . . . |Ak] ∈Rk×k, Bt = [B1 t| . . . |Bk t ] ∈Rp×k (history) 2: while stopping criteria not met, do 3: for j = 1 to r do 4: Fix the code U and all atoms k ̸= j of the dictionary V and then update Vj as follows Vj ←argminv∈C Fγ(At[j,j]/t)−1(v, Vj + At[j, j]−1(Bj t −VAj)) (8) (See below for details on the derivation and the resolution of this problem) 5: end for 6: end while Problem (7) is the compactly-constrained minimization of the 1-strongly-convex quadratic functions F˜γ(., a) : Rp →R defined above. This problem can further be identified with a denoising instance (i.e in which the design matrix / deconvolution operator is the identity operator) of the GraphNet model [11, 13]. Fast first-order methods like FISTA [4] with optimal rates O(L/√ϵ) are available1 for solving such problems to arbitrary precision ϵ > 0. One computes the Lipschitz constant to be LF˜γ(.,a) ≡1 + ˜γLΩLap = 1 + 4D˜γ, where as before, D is the number of spatial dimensions (D = 3 for volumic images). One should also mention that under certain circumstances, it is possible to perform the dictionary updates in the Fourier domain, via FFT. This alternative approach is detailed in the supplementary materials. Finally, one notes that, since constraints in problem (2) are separable in the dictionary atoms Vj, the BCD dictionary-update algorithm Alg. 2 is guaranteed to converge to a global optimum, at each iteration [6, 16]. How difficult is the dictionary update for our proposed model ? A favorable property of the vanilla dictionary-learning [16] is that the BCD dictionary updates amount to Euclidean projections onto the constraint set C, which can be easily computed for a variety of choices (simplexes, closed convex balls, etc.). One may then ask: do we retain a comparable algorithmic simplicity even with the additional Laplacian terms ΩLap(Vj) ? YES!: empirically, we found that 1 or 2 iterations of FISTA [4] are sufficient to reach an accuracy of 10−6 in problem (7), which is sufficient to obtain a good decomposition in the overall algorithm. However, choosing γ “too large” will provably cause the dictionary updates to eventually take forever to run. Indeed, the Lipschitz constant in problem (7) is Lt = 1 + 4Dγ(At[j, j]/t)−1, which will blow-up (leading to arbitrarily small step-sizes) unless γ is chosen so that γ = γt = O max 1≤j≤k At[j, j] = O max 1≤j≤k t X i=1 ∥Uj∥2 2/t ! = O(∥At∥∞,∞/t). (9) 1For example, see [8, 24], implemented as part of the Nilearn open-source library Python library [2]. 4 Finally, the Euclidean projections onto the ℓ1 ball C can be computed exactly in linear-time O(p) (see for example [7, 9]). The dictionary atoms j are repeatedly cycled and problem (7) solved. All in all, in practice we observe that a single iteration is sufficient for the dictionary update sub-routine in Alg. 2 to converge to a qualitatively good dictionary. Convergence of the overall algorithm. The Convergence of our algorithm (to a local optimum) is guaranteed since all hypotheses of [16] are satisfied. For example, assumption (A) is satisfied because fMRI data are naturally compactly supported. Assumption (C) is satisfied since the ridge-regression problem (5) has a unique solution. More details are provided in the supplementary materials. 3.2 Practical considerations 0 102 103 104 105 106 107 108 γ 2−3 2−2 2−1 20 21 22 23 24 τ 6% 12% 18% 24% 30% 36% 42% 48% 54% explained variance 0 102 103 104 105 106 107 108 γ 0 20 40 60 80 100 120 140 normalized sparsity Figure 1: Influence of model parameters. In the experiments, α was chosen according to (10). Left: Percentage explained variance of the decomposition, measured on left-out data split. Right: Average normalized sparsity of the dictionary atoms. Hyper-parameter tuning. Parameterselection in dictionary-learning is known to be a difficult unsolved problem [16, 15], and our proposed model (2) is not an exception to this rule. We did an extensive study of the quality of estimated dictionary varies with the model hyper-parameters (α, γ, τ). The data experimental setup is described in Section 5. The results are presented in Fig. 1. We make the following observations: Taking the sparsity parameter τ in (2) too large leads to dense atoms that perfectly explain the data but are not very intepretable. Taking it too small leads to overly sparse maps that barely explain the data. This normalized sparsity metric (small is better, ceteris paribus) is defined as the mean ratio ∥Vj∥1/∥Vj∥2 over the dictionary atoms. Concerning the α parameter, inspired by [26], we have found the following time-varying data-adaptive choice for the α parameter to work very well in practice: α = αt ∼t−1/2. (10) Likewise, care must be taken in selecting the Laplacian regularization parameter γ. Indeed taking it too small amounts to doing vanilla dictionary-learning model [16]. Taking it too large can lead to degenerate maps, as the spatial regularization then dominates the reconstruction error (data fidelity) term. We find that there is a safe range of the parameter pair (γ, τ) in which a good compromise between the sparsity of the dictionary (thus its intepretability) and its explanation power of the data can be reached. See Fig. 1. K-fold cross-validation with explained variance metric was retained as a good strategy for setting the Laplacian regularization γ parameter and the sparsity parameter τ. Initialization of the dictionary. Problem (2) is non-convex jointly in (U, V), and so initialization might be a crucial issue. However, in our experiments, we have observed that even randomly initialized dictionaries eventually produce sensible results that do not jitter much across different runs of the same experiment. 4 Related works While there exist algorithms for online sparse dictionary-learning that are very efficient in large-scale settings (for example [16], or more recently [17]) imposing spatial structure introduces couplings in the corresponding optimization problem [8]. So far, spatially-structured decompositions have been solved by very slow alternated optimization [25, 1]. Notably, structured priors such as TV-ℓ1 [3] minimization, were used by [1] to extract data-driven state-of-the-art atlases of brain function. However, alternated minimization is very slow, and large-scale medical imaging has shifted to online solvers for dictionary-learning like [16] and [17]. These do not readily integrate structured penalties. As a result, the use of structured decompositions has been limited so far, by the computational cost of the resulting algorithms. Our approach instead uses a Laplacian penalty to impose spatial structure at 5 a very minor cost and adapts the online-learning dictionary-learning framework [16], resulting in a fast and scalable structured decomposition. Second, the approach in [1] though very novel, is mostly heuristic. In contrast, our method enjoys the same convergence guarantees and comparable numerical complexity as the basic unstructured online dictionary-learning [16]. Finally, one should also mention [23] that introduced an online group-level functional brain mapping strategy for differentiating regions reflecting the variety of brain network configurations observed in a the population, by learning a sparse-representation of these in the spirit of [16]. 5 Experiments Setup. Our experiments were done on task fMRI data from 500 subjects from the HCP –Human Connectome Project– dataset [20]. These task fMRI data were acquired in an attempt to assess major domains that are thought to sample the diversity of neural systems of interest in functional connectomics. We studied the activation maps related to a task that involves language (story understanding) and mathematics (mental computation). This particular task is expected to outline number, attentional and language networks, but the variability modes observed in the population cover even wider cognitive systems. For the experiments, mass-univariate General Linear Models (GLMs) [10] for n = 500 subjects were estimated for the Math vs Story contrast (language protocol), and the corresponding full-brain Z-score maps each containing p = 2.6 × 105 voxels, were used as the input data X ∈Rn×p, and we sought a decomposition into a dictionary of k = 40 atoms (components). The input data X were shuffled and then split into two groups of the same size. Models compared and metrics. We compared our proposed Smooth-SODL model (2) against both the Canonical ICA –CanICA [22], a single-batch multi-subject PCA/ICA-based method, and the standard SODL (sparse online dictionary-learning) [16]. While the CanICA model accounts for subject-to-subject differences, one of its major limitations is that it does not model spatial variability across subjects. Thus we estimated the CanICA components on smoothed data: isotropic FWHM of 6mm, a necessary preprocessing step for such methods. In contrast, we did not perform pre-smoothing for the SODL of Smooth-SODL models. The different models were compared across a variety of qualitative and quantitative metrics: visual quality of the dictionaries obtained, explained variance, stability of the dictionary atoms, their reproducibility, performance of the dictionaries in predicting behavioral scores (IQ, picture vocabulary, reading proficiency, etc.) shipped with the HCP data [20]. For both SODL [16] and our proposed Smooth-SODL model, the constraint set for the dictionary atoms was taken to be a simplex C := Sp(τ) (see section 2 for definition). The results of these experiments are presented in Fig. 2 and Tab. 1. 6 Results Running time. On the computational side, the vanilla dictionary-learning SODL algorithm [16] with a batch size of η = 20 took about 110s (≈1.7 minutes) to run, whilst with the same batch size, our proposed Smooth-SODL model (2) implemented in Alg. 1 took 340s (≈5.6 minutes), which is slightly less than 3 times slower than SODL. Finally, CanICA [22] for this experiment took 530s (≈8.8 minutes) to run, which is about 5 times slower than the SODL model and 1.6 times slower than our proposed Smooth-SODL (2) model. All experiments were run on a single CPU of laptop. Qualitative assessment of dictionaries. As can be seen in Fig. 2(a), all methods recover dictionary atoms that represent known functional brain organization; notably the dictionaries all contain the well-known executive control and attention networks, at least in part. Vanilla dictionary-learning leverages the denoising properties of the ℓ1 sparsity constraint, but the voxel clusters are not very structured. For, example most blobs are surrounded with a thick ring of very small nonzero values. In contrast, our proposed regularization model leverages both sparse and structured dictionary atoms, that are more spatially structured and less noisy. In contrast to both SODL and Smooth-SODL, CanICA [22] is an ICA-based method that enforces no notion of sparsity whatsoever. The result are therefore dense and noisy dictionary atoms that explain the data very well (Fig. 2(b) but which are completely unintepretable. In a futile attempt to remedy the situation, in practice such PCA/ICA-based methods (including FSL’s MELODIC tool [19]) are hard-thresholded in order to see information. For CanICA, the hard-thresholded version has been 6 (a) Qualitative comparison of the estimated dictionaries. Each column represents an atom of the estimated dictionary, where atoms from the different models (the rows of the plots) have been matched via a Hungarian algorithm. Here, we only show a limited number of the most “intepretable” atoms. Notice how the major structures in each atom are reproducible across the different models. Maps corresponding to hard-thresholded CanICA [22] components have also been included, and have been called tCanICA. In contrast, the maps from the SODL [16] and our proposed Smooth-SODL (2) have not been thresholded. 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% explained variance Smooth-SODL(γ = 104) Smooth-SODL(γ = 103) SODL tCanICA CanICA PCA (b) Mean explained variance of the different models on both training data and test (left-out) data. N.B.: Bold bars represent performance on test set while faint bars in the background represent performance on train set. Picture vocab. English reading Penn. Matrix Test Strength Endurance Picture seq. mem. Dexterity 0.0 0.1 0.2 0.3 0.4 R2-score Smooth-SODL(γ = 104) Smooth-SODL(γ = 103) SODL tCanICA CanICA PCA RAW (c) Predicting behavioral variables of the HCP [20] dataset using subject-level Z-maps. N.B.: Bold bars represent performance on test set while faint bars in the background represent performance on train set. Figure 2: Main results. Benchmarking our proposed Smooth-SODL (2) model against competing state-of-the-art methods like SODL (sparse online dictionary-learning) [16] and CanICA [22]. named tCanICA in Fig. 2. That notwithstanding, notice how the major structures (parietal lobes, sulci, etc.) in each atom are reproducible across the different models. Stability-fidelity trade-offs. PCA/ICA-based methods like CanICA [22] and MELODIC [19] are the optimal linear decomposition method to maximize explained variance on a dataset. On the training set, CanICA [22] out-performs all others algorithms with about 66% (resp. 50% for SODL [16] and 58% for Smooth-SODL) of explained variance on the training set, and 60% (resp. 49% for SODL and 55% for Smooth-SODL) on left-out (test) data. See Fig. 2(b). However, as noted in the above paragraph, such methods lead to dictionaries that are hardly intepretable and thus the user must recourse to some kind of post-processing hard-thresholding step, which destroys the estimated model. More so, assessing the stability of the dictionaries, measured by mean correlation between corresponding atoms, across different splits of the data, CanICA [22] scores a meager 0.1, whilst the hard-thresholded version tCanICA obtains 0.2, compared to 0.4 for Smooth-SODL and 0.1 for SODL. 7 Is spatial regularization really needed ? As rightly pointed out by one of the reviewers, one does not need spatial regularization if data are abundant (like in the HCP). So we computed learning curves of mean explained variance (EV) on test data, as a function of the amount training data seen by both Smooth-SODL and SODL [16] (Table 1). In the beginning of the curve, our proposed spatially regularized Smooth-SODL model starts offwith more than 31% explained variance (computed on 241 subjects), after having pooled only 17 subjects. In contrast, the vanilla SODL model [16] scores a meager 2% explained variance; this corresponds to a 14-fold gain of Smooth-SODL over SODL. As more and more data are pooled, both models explain more variance, the gap between Smooth-SODL and SODL reduces, and both models perform comparably asymptotically. Nb. subjects pooled mean EV for vanilla SODL Smooth-SODL (2) gain factor 17 2% 31% 13.8 92 37% 50% 1.35 167 47% 54% 1.15 241 49% 55% 1.11 Table 1: Learning-curve for boost in explained variance of our proposed Smooth-SODL model over the reference SODL model. Note the reduction in the explained variance gain as more data are pooled. Thus our proposed Smooth-SODL method extracts structured denoised dictionaries that better capture inter-subject variability in small, medium, and large-scale regimes alike. Prediction of behavioral variables. If Smooth-SODL captures the patterns of inter-subject variability, then it should be possible to predict cognitive scores y like picture vocabulary, reading proficiency, math aptitude, etc. (the behavioral variables are explained in the HCP wiki [12]) by projecting new subjects’ data into this learned low-dimensional space (via solving the ridge problem (5) for each sample Xt), without loss of performance compared with using the raw Z-values values X. Let RAW refer to the direct prediction of targets y from X, using the top 2000 most voxels most correlated with the target variable. Results of for the comparison are shown in Fig. 2(c). Only variables predicted with a a positive mean (across the different methods and across subjects) R-score are reported. We see that the RAW model, as expected over-fits drastically, scoring an R2 of 0.3 on training data and only 0.14 on test data. Overall, for this metric CanICA performs best than all the other models in predicting the different behavioral variables on test data. However, our proposed Smooth-SODL model outperforms both SODL [16] and tCanICA, the thresholded version of CanICA. 7 Concluding remarks To extract structured functionally discriminating patterns from massive brain data (i.e data-driven atlases), we have extended the online dictionary-learning framework first developed in [16], to learn structured regions representative of brain organization. To this end, we have successfully augmented [16] with a Laplacian penalty on the component maps, while conserving the low numerical complexity of the latter. Through experiments, we have shown that the resultant model –Smooth-SODL model (2)– extracts structured and denoised dictionaries that are more intepretable and better capture inter-subject variability in small medium, and large-scale regimes alike, compared to state-of-the-art models. We believe such online multivariate online methods shall become the de facto way to do dimensionality reduction and ROI extraction in the future. Implementation. The authors’ implementation of the proposed Smooth-SODL (2) model will soon be made available as part of the Nilearn package [2]. Acknowledgment. This work has been funded by EU FP7/2007-2013 under grant agreement no. 604102, Human Brain Project (HBP) and the iConnectome Digiteo. We would also like to thank the Human Connectome Projection for making their wonderful data publicly available. 8 References [1] A. Abraham et al. “Extracting brain regions from rest fMRI with Total-Variation constrained dictionary learning”. In: MICCAI. 2013. [2] A. Abraham et al. “Machine learning for neuroimaging with scikit-learn”. In: Frontiers in Neuroinformatics (2014). [3] L. Baldassarre, J. Mourao-Miranda, and M. Pontil. “Structured sparsity models for brain decoding from fMRI data”. In: PRNI. 2012. [4] A. Beck and M. Teboulle. “A Fast Iterative Shrinkage-Thresholding Algorithm for Linear Inverse Problems”. In: SIAM J. Imaging Sci. 2 (2009). [5] C. F. Beckmann and S. M. Smith. “Probabilistic independent component analysis for functional magnetic resonance imaging”. In: Trans Med. Im. 23 (2004). [6] D. P. Bertsekas. Nonlinear programming. Athena Scientific, 1999. [7] L. Condat. “Fast projection onto the simplex and the ℓ1 ball”. In: Math. Program. (2014). [8] E. Dohmatob et al. “Benchmarking solvers for TV-l1 least-squares and logistic regression in brain imaging”. In: PRNI. IEEE. 2014. [9] J. Duchi et al. “Efficient projections onto the l 1-ball for learning in high dimensions”. In: ICML. ACM. 2008. [10] K. J. Friston et al. “Statistical Parametric Maps in Functional Imaging: A General Linear Approach”. In: Hum Brain Mapp (1995). [11] L. Grosenick et al. “Interpretable whole-brain prediction analysis with GraphNet”. In: NeuroImage 72 (2013). [12] HCP wiki. https://wiki.humanconnectome.org/display/PublicData/HCP+Data+ Dictionary+Public-+500+Subject+Release. Accessed: 2010-09-30. [13] M. Hebiri and S. van de Geer. “The Smooth-Lasso and other ℓ1 + ℓ2-penalized methods”. In: Electron. J. Stat. 5 (2011). [14] D. P. Hibar et al. “Genetic clustering on the hippocampal surface for genome-wide association studies”. In: MICCAI. 2013. [15] R. Jenatton, G. Obozinski, and F. Bach. “Structured sparse principal component analysis”. In: AISTATS. 2010. [16] J. Mairal et al. “Online learning for matrix factorization and sparse coding”. In: Journal of Machine Learning Research 11 (2010). [17] A. Mensch et al. “Dictionary Learning for Massive Matrix Factorization”. In: ICML. ACM. 2016. [18] R. Saxe, M. Brett, and N. Kanwisher. “Divide and conquer: a defense of functional localizers”. In: Neuroimage 30 (2006). [19] S. M. Smith et al. “Advances in functional and structural MR image analysis and implementation as FSL”. In: Neuroimage 23 (2004). [20] D. van Essen et al. “The Human Connectome Project: A data acquisition perspective”. In: NeuroImage 62 (2012). [21] E. Varol and C. Davatzikos. “Supervised block sparse dictionary learning for simultaneous clustering and classification in computational anatomy.” eng. In: Med Image Comput Comput Assist Interv 17 (2014). [22] G. Varoquaux et al. “A group model for stable multi-subject ICA on fMRI datasets”. In: Neuroimage 51 (2010). [23] G. Varoquaux et al. “Cohort-level brain mapping: learning cognitive atoms to single out specialized regions”. In: IPMI. 2013. [24] G. Varoquaux et al. “FAASTA: A fast solver for total-variation regularization of ill-conditioned problems with application to brain imaging”. In: arXiv:1512.06999 (2015). [25] G. Varoquaux et al. “Multi-subject dictionary learning to segment an atlas of brain spontaneous activity”. In: Inf Proc Med Imag. 2011. [26] Y. Ying and D.-X. Zhou. “Online regularized classification algorithms”. In: IEEE Trans. Inf. Theory 52 (2006). 9 | 2016 | 46 |
6,394 | New Liftable Classes for First-Order Probabilistic Inference Seyed Mehran Kazemi The University of British Columbia smkazemi@cs.ubc.ca Angelika Kimmig KU Leuven angelika.kimmig@cs.kuleuven.be Guy Van den Broeck University of California, Los Angeles guyvdb@cs.ucla.edu David Poole The University of British Columbia poole@cs.ubc.ca Abstract Statistical relational models provide compact encodings of probabilistic dependencies in relational domains, but result in highly intractable graphical models. The goal of lifted inference is to carry out probabilistic inference without needing to reason about each individual separately, by instead treating exchangeable, undistinguished objects as a whole. In this paper, we study the domain recursion inference rule, which, despite its central role in early theoretical results on domain-lifted inference, has later been believed redundant. We show that this rule is more powerful than expected, and in fact significantly extends the range of models for which lifted inference runs in time polynomial in the number of individuals in the domain. This includes an open problem called S4, the symmetric transitivity model, and a first-order logic encoding of the birthday paradox. We further identify new classes S 2FO2 and S 2RU of domain-liftable theories, which respectively subsume FO2 and recursively unary theories, the largest classes of domain-liftable theories known so far, and show that using domain recursion can achieve exponential speedup even in theories that cannot fully be lifted with the existing set of inference rules. 1 Introduction Statistical relational learning (SRL) [8] aims at unifying logic and probability for reasoning and learning in noisy domains, described in terms of individuals (or objects), and the relationships between them. Statistical relational models [10], or template-based models [18] extend Bayesian and Markov networks with individuals and relations, and compactly describe probabilistic dependencies among them. These models encode exchangeability among the objects: individuals that we have the same information about are treated similarly. A key challenge with SRL models is the fact that they represent highly intractable, densely connected graphical models, typically with millions of random variables. The aim of lifted inference [23] is to carry out probabilistic inference without needing to reason about each individual separately, by instead treating exchangeable, undistinguished objects as a whole. Over the past decade, a large number of lifted inference rules have been proposed [5, 9, 11, 14, 20, 22, 28, 30], often providing exponential speedups for specific SRL models. These basic exact inference techniques have applications in (tractable) lifted learning [32], where the main task is to efficiently compute partition functions, and in variational and over-symmetric approximations [29, 33]. Moreover, they provided the foundation for a rich literature on approximate lifted inference and learning [1, 4, 13, 17, 19, 21, 25, 34]. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. The theoretical study of lifted inference began with the complexity notion of domain-lifted inference [31] (a concept similar to data complexity in databases). Inference is domain-lifted when it runs in time polynomial in the number of individuals in the domain. By identifying liftable classes of models, guaranteeing domain-lifted inference, one can characterize the theoretical power of the various inference rules. For example, the class FO2, encoding dependencies among pairs of individuals (i.e., two logical variables), is liftable [30]. Kazemi and Poole [15] introduce a liftable class called recursively unary, capturing hierarchical simplification rules. Beame et al. [3] identify liftable classes of probabilistic database queries. Such results elevate the specific inference rules and examples to a general principle, and bring lifted inference in line with complexity and database theory [3]. This paper studies the domain recursion inference rule, which applies the principle of induction on the domain size. The rule makes one individual A in the domain explicit. Afterwards, the other inference rules simplify the SRL model up to the point where it becomes identical to the original model, except the domain size has decreased. Domain recursion was introduced by Van den Broeck [31] and was central to the proof that FO2 is liftable. However, later work showed that simpler rules suffice to capture FO2 [27], and the domain recursion rule was forgotten. We show that domain recursion is more powerful than expected, and can lift models that are otherwise not amenable to domain-lifted inference. This includes an open problem by Beame et al. [3], asking for an inference rule for a logical sentence called S4. It also includes the symmetric transitivity model, and an encoding of the birthday paradox in first-order logic. There previously did not exist any efficient algorithm to compute the partition function of these SRL models, and we obtain exponential speedups. Next, we prove that domain recursion supports its own large classes of liftable models S 2FO2 subsuming FO2, and S 2RU subsuming recursive unary1. All existing exact lifted inference algorithms (e.g., [11, 15, 28]) resort to grounding the theories in S 2FO2 or S 2RU that are not in FO2 or recursively unary, and require time exponential in the domain size. These results will be established using the weighted first-order model counting (WFOMC) formulation of SRL models [28]. WFOMC is close to classical first-order logic, and it can encode many other SRL models, including Markov logic [24], parfactor graphs [23], some probabilistic programs [7], relational Bayesian networks [12], and probabilistic databases [26]. It is a basic specification language that simplifies the development of lifted inference algorithms [3, 11, 28]. 2 Background and Notation A population is a set of constants denoting individuals (or objects). A logical variable (LV) is typed with a population. We represent LVs with lower-case letters, constants with upper-case letters, the population associated with a LV x with ∆x, and its cardinality with |∆x|. That is, a population ∆x is a set of constants {X1, . . . , Xn}, and we use x ∈∆x as a shorthand for instantiating x with one of the Xi. A parametrized random variable (PRV) is of the form F(t1, . . . , tk) where F is a predicate symbol and each ti is a LV or a constant. A unary PRV contains exactly one LV and a binary PRV contains exactly two LVs. A grounding of a PRV is obtained by replacing each of its LVs x by one of the individuals in ∆x. A literal is a PRV or its negation. A formula ϕ is a literal, a disjunction ϕ1 ∨ϕ2 of formulas, a conjunction ϕ1 ∧ϕ2 of formulas, or a quantified formula ∀x ∈∆x : ϕ(x) or ∃x ∈∆x : ϕ(x) where x appears in ϕ(x). A sentence is a formula with all LVs quantified. A clause is a disjunction of literals. A theory is a set of sentences. A theory is clausal if all its sentences are clauses. An interpretation is an assignment of values to all ground PRVs in a theory. An interpretation I is a model of a theory T, I |= T, if given its value assignments, all sentences in T evaluate to True. Let F(T) be the set of predicate symbols in theory T, and Φ : F(T) →R and Φ : F(T) →R be two functions that map each predicate F to weights. These functions associate a weight with assigning True or False to ground PRVs F(C1, . . . , Ck). For an interpretation I of T, let ψT rue be the set of ground PRVs assigned True, and ψF alse the ones assigned False. The weight of I is given by ω(I) = Q F(C1,...,Ck)∈ψT rue Φ(F) · Q F(C1,...,Ck)∈ψF alse Φ(F). Given a theory T and two functions Φ and Φ, the weighted first-order model count (WFOMC) of the theory given Φ and Φ is: WFOMC(T|Φ, Φ) = P I|=T ω(I). 1All proofs can be found in the extended version of the paper at: https://arxiv.org/abs/1610.08445 2 In this paper, we assume that all theories are clausal and do not contain existential quantifiers. The latter can be achieved using the Skolemization procedure of Van den Broeck et al. [30], which efficiently transforms a theory T with existential quantifiers into a theory T ′ without existential quantifiers that has the same weighted model count. That is, our theories are sets of finite-domain, function-free first-order clauses whose LVs are all universally quantified (and typed with a population). Furthermore, when a clause mentions two LVs x1 and x2 with the same population ∆x, or a LV x with population ∆x and a constant C ∈∆x, we assume they refer to different individuals.2 Example 1. Consider the theory ∀x ∈∆x : ¬Smokes(x) ∨Cancer(x) having only one clause and assume ∆x = {A, B}. The assignment Smokes(A) = True, Smokes(B) = False, Cancer(A) = True, Cancer(B) = True is a model. Assuming Φ(Smokes) = 0.2, Φ(Cancer) = 0.8, Φ(Smokes) = 0.5 and Φ(Cancer) = 1.2, the weight of this model is 0.2 · 0.5 · 0.8 · 0.8. This theory has eight other models. The WFOMC can be calculated by summing the weights of all nine models. 2.1 Converting Inference for SRL Models into WFOMC For many SRL models, (lifted) inference can be converted into a WFOMC problem. As an example, consider a Markov logic network (MLN) [24] with weighted formulae (w1 : F1, . . . , wk : Fk). For every weighted formula wi : Fi of this MLN, let theory T have a sentence Auxi(x, . . . ) ⇔Fi such that Auxi is a predicate having all LVs appearing in Fi. Assuming Φ(Auxi) = exp(wi), and Φ and Φ are 1 for the other predicates, the partition function of the MLN is equal to WFOMC(T). 2.2 Calculating the WFOMC of a Theory We now describe a set of rules R that can be applied to a theory to find its WFOMC efficiently; for more details, readers are directed to [28], [22] or [11]. We use the following theory T with two clauses and four PRVs (S(x, m), R(x, m), T(x) and Q(x)) as our running example: ∀x ∈∆x, m ∈∆m : Q(x) ∨R(x, m) ∨S(x, m) ∀x ∈∆x, m ∈∆m : S(x, m) ∨T(x) Lifted Decomposition Assume we ground x in T. Then the clauses mentioning an arbitrary Xi ∈∆x are ∀m ∈∆m : Q(Xi) ∨R(Xi, m) ∨S(Xi, m) and ∀m ∈∆m : S(Xi, m) ∨T(Xi). These clauses are totally disconnected from clauses mentioning Xj ∈∆x (j ̸= i), and are the same up to renaming Xi to Xj. Given the exchangeability of the individuals, we can calculate the WFOMC of only the clauses mentioning Xi and raise the result to the power of the number of connected components (|∆x|). Assuming T1 is the theory that results from substituting x with Xi, WFOMC(T) = WFOMC(T1)|∆x|. Case-Analysis The WFOMC of T1 can be computed by a case analysis over different assignments of values to a ground PRV, e.g., Q(Xi). Let T2 and T3 represent T1 ∧Q(Xi) and T1 ∧¬Q(Xi) respectively. Then, WFOMC(T1) = WFOMC(T2) + WFOMC(T3). We follow the process for T3 (the process for T2 will be similar) having clauses ¬Q(Xi), ∀m ∈∆m : Q(Xi) ∨R(Xi, m) ∨ S(Xi, m) and ∀m ∈∆m : S(Xi, m) ∨T(Xi). Unit Propagation When a clause in the theory has only one literal, we can propagate the effect of this clause through the theory and remove it3. In T3, ¬Q(Xi) is a unit clause. Having this unit clause, we can simplify the second clause and get the theory T4 having clauses ∀m ∈∆m : R(Xi, m) ∨S(Xi, m) and ∀m ∈∆m : S(Xi, m) ∨T(Xi). Lifted Case-Analysis Case-analysis can be done for PRVs having one logical variable in a lifted way. Consider the S(Xi, m) in T4. Due to the exchangeability of the individuals, we do not have to consider all possible assignments to all ground PRVs of S(Xi, m), but only the ones where the number of individuals M ∈∆m for which S(Xi, M) is True (or equivalently False) is different. This means considering |∆m| + 1 cases suffices, corresponding to S(Xi, M) being True for exactly j = 0, . . . , |∆m| individuals. Note that we must multiply by |∆m| j to account for the number 2Equivalently, we can disjoin x1 = x2 or x = C to the clause. 3Note that unit propagation may remove clauses and random variables from the theory. To account for them, smoothing multiplies the WFOMC by 2#rv, where #rv represents the number of removed variables. 3 of ways one can select j out of |∆m| individuals. Let T4j represent T4 with two more clauses: ∀m ∈∆mT : S(Xi, m) and ∀m ∈∆mF : ¬S(Xi, m), where ∆mT represents the j individuals in ∆m for which S(Xi, M) is True, and ∆mF represents the other |∆m| −j individuals. Then WFOMC(T4) = P|∆m| j=0 |∆m| j WFOMC(T4j). Shattering In T4j, the individuals in ∆m are no longer exchangeable: we know different things about those in ∆mT and those in ∆mF . We need to shatter every clause having individuals coming from ∆m to make the theory exchangeable. To do so, the clause ∀m ∈∆m : R(Xi, m)∨S(Xi, m) in T4j must be shattered to ∀m ∈∆mT : R(Xi, m)∨S(Xi, m) and ∀m ∈∆mF : R(Xi, m)∨S(Xi, m) (and similarly for the other formulae). The shattered theory T5j after unit propagation will have clauses ∀m ∈∆mF : R(Xi, m) and ∀m ∈∆mF : T(Xi). Decomposition, Caching, and Grounding In T5j, the two clauses have different PRVs, i.e., they are disconnected. In such cases, we apply decomposition, i.e., find the WFOMC of each connected component separately and return the product. The WFOMC of the theory can be found by continuing to apply the above rules. In all the above steps, after finding the WFOMC of each (sub-)theory, we store the results in a cache so we can reuse them if the same WFOMC is required again. By following these steps, one can find the WFOMC of many theories in polynomial time. However, if we reach a point where none of the above rules are applicable, we ground one of the populations which makes the process exponential in the number of individuals. 2.3 Domain-Liftability The following notions allow us to study the power of a set of lifted inference rules. Definition 1. A theory is domain-liftable [31] if calculating its WFOMC is polynomial in |∆x1|, |∆x2|, . . . , |∆xk| where x1, x2, . . . , xk represent the LVs in the theory. A class C of theories is domain-liftable if ∀T ∈C, T is domain-liftable. So far, two main classes of domain-liftable theories have been recognized: FO2 [30, 31] and recursively unary [15, 22]. Definition 2. A theory is in FO2 if all its clauses have up to two LVs. Definition 3. A theory T is recursively unary (RU) if for every theory T ′ resulting from applying rules in R except for lifted case analysis to T, until no more rules apply, there exists some unary PRV in T ′ and a generic case of lifted case-analysis on this unary PRV is itself RU. Note that the time needed to check whether a theory is in FO2 or RU is independent of the domain sizes in the theory. For FO2, the membership check can be done in time linear in the size of the theory, whereas for RU, only a worst-case exponential procedure is known. Thus, FO2 currently offers a faster membership check than RU, but as we show later, RU subsumes FO2. This gives rise to a trade-off between fast membership checking and modeling power for, e.g., lifted learning purposes. 3 The Domain Recursion Rule Van den Broeck [31] considered another rule called domain recursion in the set of rules for calculating the WFOMC of a theory. The intuition behind domain recursion is that it modifies a domain ∆x by making one element explicit: ∆x = ∆x′ ∪{A} with A ̸∈∆x′. Next, clauses are rewritten in terms of ∆x′ and A while removing ∆x from the theory entirely. Then, by applying standard rules in R on this modified theory, the problem is reduced to a WFOMC problem on a theory identical to the original one, except that ∆x is replaced by the smaller domain ∆x′. This lets us compute WFOMC using dynamic programming. We refer to R extended with the domain recursion rule as RD. Example 2. Suppose we have a theory whose only clause is ∀x, y ∈∆p : ¬Friend(x, y) ∨ Friend(y, x), stating if x is friends with y, y is also friends with x. One way to calculate the WFOMC of this theory is by grounding only one individual in ∆p and then using R. Let A be an individual in ∆p and let ∆p′ = ∆p −{A}. We can (using domain recursion) rewrite the theory as: ∀x ∈∆p′ : ¬Friend(x, A) ∨Friend(A, x), ∀y ∈∆p′ : ¬Friend(A, y) ∨Friend(y, A), and ∀x, y ∈∆p′ : ¬Friend(x, y) ∨Friend(y, x). Lifted case-analysis on Friend(p′, A) and Friend(A, p′), 4 shattering and unit propagation give ∀x, y ∈∆p′ : ¬Friend(x, y) ∨Friend(y, x). This theory is equivalent to our initial theory, with the only difference being that the population of people has decreased by one. By keeping a cache of the values of each sub-theory, one can verify that this process finds the WFOMC of the above theory in polynomial time. Note that the theory in Example 2 is in FO2 and as proved in [27], its WFOMC can be computed without using the domain recursion rule4. This proof has caused the domain recursion rule to be forgotten in the lifted inference community. In the next section, we revive this rule and identify a class of theories that are only domain-liftable when using the domain recursion rule. 4 Domain Recursion Makes More Theories Domain-Liftable In this section, we show three example theories that are not domain-liftable when using R, yet become domain-liftable with domain recursion. S4 Clause: Beame et al. [3] identified a clause (S4) with four binary PRVs having the same predicate and proved that, even though the rules R in Section 2.2 cannot calculate the WFOMC of that clause, there is a polynomial-time algorithm for finding its WFOMC. They concluded that this set of rules R for finding the WFOMC of theories does not suffice, asking for new rules to compute their theory. We prove that adding domain recursion to the set achieves this goal. Proposition 1. The theory consisting of the S4 clause ∀x1, x2 ∈∆x, y1, y2 ∈∆y : S(x1, y1) ∨ ¬S(x2, y1) ∨S(x2, y2) ∨¬S(x1, y2) is domain-liftable using RD. Symmetric Transitivity: Domain-liftable calculation of WFOMC for the transitivity formula is a long-standing open problem. Symmetric transitivity is easier as its model count corresponds to the Bell number, but solving it using general-purpose rules has been an open problem. Consider clauses ∀x, y, z ∈∆p : ¬F(x, y) ∨¬F(y, z) ∨F(x, z) and ∀x, y ∈∆p : ¬F(x, y) ∨F(y, x) defining a symmetric transitivity relation. For example, ∆p may indicate the population of people and F may indicate friendship. Proposition 2. The symmetric-transitivity theory is domain-liftable using RD. Birthday Paradox: The birthday paradox problem [2] is to compute the probability that in a set of n randomly chosen people, two of them have the same birthday. A first-order encoding of this problem requires computing the WFOMC for a theory with clauses ∀p ∈∆p, ∃d ∈∆d : Born(p, d), ∀p ∈∆p, d1, d2 ∈∆d : ¬Born(p, d1) ∨¬Born(p, d2), and ∀p1, p2 ∈∆p, d ∈∆d : ¬Born(p1, d) ∨ ¬Born(p2, d), where ∆p and ∆d represent the population of people and days. The first two clauses impose the condition that every person is born in exactly one day, and the third clause states the “no two people are born on the same day” query. Proposition 3. The birthday-paradox theory is domain-liftable using RD. 5 New Domain-Liftable Classes: S 2FO2 and S 2RU In this section, we identify new domain-liftable classes, enabled by the domain recursion rule. Definition 4. Let α(S) be a clausal theory that uses a single binary predicate S, such that each clause has exactly two different literals of S. Let α = α(S1)∧α(S2)∧· · ·∧α(Sn) where the Si are different binary predicates. Let β be a theory where all clauses contain at most one Si literal, and the clauses that contain an Si literal contain no other literals with more than one LV. Then, S 2FO2 and S 2RU are the classes of theories of the form α ∧β where β ∈FO2 and β ∈RU respectively. Theorem 1. S 2FO2 and S 2RU are domain-liftable using RD. Proof. The case where α = ∅is trivial. Let α = α(S1) ∧α(S2) ∧· · · ∧α(Sn). Once we remove all PRVs having none or one LV by (lifted) case-analysis, the remaining clauses can be divided into n + 1 components: the i-th component in the first n components only contains Si literals, and the 4This can be done by realizing that the theory is disconnected in the grounding for every pair (A, B) of individuals and applying the lifted case-analysis. 5 (n + 1)-th component contains no Si literals. These components are disconnected from each other, so we can consider each of them separately. The (n + 1)-th component comes from clauses in β and is domain-liftable by definition. The following two Lemmas prove that the clauses in the other components are also domain-liftable. The proofs of both lemmas rely on domain recursion. Lemma 1. A clausal theory α(S) with only one predicate S where all clauses have exactly two different literals of S is domain-liftable. Lemma 2. Suppose {∆p1, ∆p2, . . . , ∆pn} are mutually exclusive subsets of ∆x and {∆q1, ∆q2, . . . , ∆qm} are mutually exclusive subsets of ∆y. We can add any unit clause of the form ∀pi ∈∆pi, qj ∈∆qj : S(pi, qj) or ∀pi ∈∆pi, qj ∈∆qj : ¬S(pi, qj) to the theory α(S) in Lemma 1 and the theory is still domain-liftable. Therefore, theories in S 2FO2 and S 2RU are domain-liftable. It can be easily verified that membership checking for S 2FO2 and S 2RU is not harder than for FO2 and RU, respectively. Example 3. Suppose we have a set ∆j of jobs and a set ∆v of volunteers. Every volunteer must be assigned to at most one job, and every job requires no more than one person. If the job involves working with gas, the assigned volunteer must be a non-smoker. And we know that smokers are most probably friends with each other. Then we will have the following first-order theory: ∀v1, v2 ∈∆v, j ∈∆j : ¬Assigned(v1, j) ∨¬Assigned(v2, j) ∀v ∈∆v, j1, j2 ∈∆j : ¬Assigned(v, j1) ∨¬Assigned(v, j2) ∀v ∈∆v, j ∈∆j : InvolvesGas(j) ∧Assigned(v, j) ⇒¬Smokes(v) ∀v1, v2 ∈∆v : Aux(v1, v2) ⇔(Smokes(v1) ∧Friends(v1, v2) ⇒Smokes(v2)) Predicate Aux is added to capture the probability assigned to the last rule (as in MLNs). This theory is not in FO2, not in RU, and is not domain-liftable using R. However, the first two clauses are of the form described in Lemma 1, the third and fourth are in FO2 (and also in RU), and the third clause, which contains Assigned(v, j), has no other PRVs with more than one LV. Therefore, this theory is in S 2FO2 (and also in S 2RU ) and domain-liftable based on Theorem 1. Example 4. Consider the birthday paradox introduced in Section 4. After Skolemization [30] for removing the existential quantifier, the theory contains ∀p ∈∆p, ∀d ∈∆d : S(p) ∨¬Born(p, d), ∀p ∈∆p, d1, d2 ∈∆d : ¬Born(p, d1) ∨¬Born(p, d2), and ∀p1, p2 ∈∆p, d ∈∆d : ¬Born(p1, d) ∨ ¬Born(p2, d), where S is the Skolem predicate. This theory is not in FO2, not in RU, and is not domain-liftable using R. However, the last two clauses belong to clauses in Lemma 1, the first one is in FO2 (and also in RU) and has no PRVs with more than one LV other than Born. Therefore, this theory is in S 2FO2 (and also in S 2RU ) and domain-liftable based on Theorem 1. Proposition 4. FO2 ⊂RU, FO2 ⊂S 2FO2, FO2 ⊂S 2RU , RU ⊂S 2RU , S 2FO2 ⊂S 2RU . Proof. Let T ∈FO2 and T ′ be any of the theories resulting from exhaustively applying rules in R except lifted case analysis on T. If T initially contains a unary PRV with predicate S, either it is still unary in T ′ or lifted decomposition has replaced the LV with a constant. In the first case, we can follow a generic branch of lifted case-analysis on S, and in the second case, either T ′ is empty or all binary PRVs in T have become unary in T ′ due to applying the lifted decomposition and we can follow a generic branch of lifted case-analysis for any of these PRVs. The generic branch in both cases is in FO2 and the same procedure can be followed until all theories become empty. If T initially contains only binary PRVs, lifted decomposition applies as the grounding of T is disconnected for each pair of individuals, and after lifted decomposition all PRVs have no LVs. Applying case analysis on all PRVs gives empty theories. Therefore, T ∈RU. The theory ∀x, y, z ∈∆p : F(x, y) ∨F(y, z) ∨F(x, y, z) is an example of a RU theory that is not in FO2, showing RU ̸⊂FO2. FO2 and RU are special cases of S 2FO2 and S 2RU respectively, where α = ∅, showing FO2 ⊂S 2FO2 and RU ⊂S 2RU . However, Example 3 is both in S 2FO2 and S 2RU but is not in FO2 and not in RU, showing S 2FO2 ̸⊂FO2 and S 2RU ̸⊂RU. Since FO2 ⊂RU and the class of added α(S) clauses are the same, S 2FO2 ⊂S 2RU . 6 0.001 0.01 0.1 1 10 100 1000 1 10 100 Time in seconds Population size WFOMC-v3.0 Domain Recursion 0.001 0.01 0.1 1 10 100 1000 1 10 100 Time in seconds Population size WFOMC-v3.0 Domain Recursion 0.001 0.01 0.1 1 10 100 1000 3 30 300 3000 Time in seconds Population size WFOMC-v3.0 Domain Recursion (a) (b) (c) Figure 1: Run-times for calculating the WFOMC of (a) the theory in Example 3, (b) the S4 clause, and (c) symmetric transitivity, using the WFOMC-v3.0 software (which only uses R) and comparing it to the case where we use the domain recursion rule, referred to as Domain Recursion in the diagrams. 6 Experiments and Results In order to see the effect of using domain recursion in practice, we find the WFOMC of three theories with and without using the domain recursion rule: (a) the theory in Example 3, (b) the S4 clause, and (c) the symmetric-transitivity theory. We implemented the domain recursion rule in C++ and compiled the codes using the g++ compiler. We compare our results with the WFOMC-v3.0 software5. Since this software requires domain-liftable input theories, for the first theory we grounded the jobs, for the second we grounded ∆x, and for the third we grounded ∆p. For each of these three theories, assuming |∆x| = n for all LVs x in the theory, we varied n and plotted the run-time as a function of n. All experiments were done on a 2.8GH core with 4GB RAM under MacOSX. The run-times are reported in seconds. We allowed a maximum of 1000 seconds for each run. Obtained results can be viewed in Fig. 1. These results are consistent with our theory and indicate the clear advantage of using the domain recursion rule in practice. In Fig. 1(a), the slope of the diagram for domain recursion is approximately 4 which indicates the degree of the polynomial for the time complexity. Similar analysis can be done for the results on the S4 clause and the symmetrictransitivity clauses represented in Fig. 1(b), (c). The slope of the diagram in these two diagrams is around 5 and 2 respectively, indicating that the time complexity for finding their WFOMC are n5 and n2 respectively, where n is the size of the population. 7 Discussion We can categorize theories with respect to the domain recursion rule as: (1) theories proved to be domain-liftable using domain recursion (e.g., S4, symmetric transitivity, and theories in S 2FO2), (2) theories that are domain-liftable using domain recursion, but we have not identified them yet as such, and (3) theories that are not domain-liftable even when using domain recursion. We leave discovering and characterizing the theories in category 2 and 3 as future work. But here we show that even though the theories in category 3 are not domain-liftable using domain recursion, this rule may still result in exponential speedups for these theories. Consider the (non-symmetric) transitivity rule: ∀x, y, z ∈∆p : ¬Friend(x, y) ∨¬Friend(y, z) ∨ Friend(x, z). Since none of the rules in R apply to the above theory, the existing lifted inference engines ground ∆p and calculate the weighted model count (WMC) of the ground theory. By grounding ∆p, these engines lose great amounts of symmetry. Suppose ∆p = {A, B, C} and assume we select Friend(A, B) and Friend(A, C) as the first two random variables for case-analysis. Due to the exchangeability of the individuals, the case where Friend(A, B) and Friend(A, C) are assigned to True and False respectively has the same WMC as the case where they are assigned to False and True. However, the current engines fail to exploit this symmetry as they consider grounded individuals non-exchangeable. By applying domain recursion to the above theory instead of fully grounding it, one can exploit the symmetries of the theory. Suppose ∆p′ = ∆p −{P}. Then we can rewrite the theory as follows: ∀y, z ∈∆p′ : ¬Friend(P, y) ∨¬Friend(y, z) ∨Friend(P, z) 5Available at: https://dtai.cs.kuleuven.be/software/wfomc 7 ∀x, z ∈∆p′ : ¬Friend(x, P) ∨¬Friend(P, z) ∨Friend(x, z) ∀x, y ∈∆p′ : ¬Friend(x, y) ∨¬Friend(y, P) ∨Friend(x, P) ∀x, y, z ∈∆p′ : ¬Friend(x, y) ∨¬Friend(y, z) ∨Friend(x, z) Now if we apply lifted case analysis on Friend(P, y) (or equivalently on Friend(P, z)), we do not get back the same theory with reduced population and calculating the WFOMC is still exponential. However, we only generate one branch for the case where Friend(P, y) is True only once. This branch covers both the symmetric cases mentioned above. Exploiting these symmetries reduces the time-complexity exponentially. This suggests that for any given theory, when the rules in R are not applicable one may want to try the domain recursion rule before giving up and resorting to grounding a population. 8 Conclusion We identified new classes of domain-liftable theories called S 2FO2 and S 2RU by reviving the domain recursion rule. We also demonstrated how this rule is useful for theories outside these classes. Our work opens up a future research direction for identifying and characterizing larger classes of theories that are domain-liftable using domain recursion. It also helps us get closer to finding a dichotomy between the theories that are domain-liftable and those that are not, similar to the dichotomy result of Dalvi and Suciu [6] for query answering in probabilistic databases. It has been shown [15, 16] that compiling the WFOMC rules into low-level programs (e.g., C++ programs) offers a (approx.) 175x speedup compared to other approaches. While compiling the previously known rules to low-level programs was straightforward, compiling the domain recursion rule to low-level programs without using recursion might be tricky as it relies on the population size of the logical variables. A future research direction would be finding if the domain recursion rule can be efficiently compiled into low-level programs, and measuring the amount of speedup it offers. Acknowledgements. AK is supported by the Research Foundation Flanders (FWO). GVdB is partially supported by NSF (#IIS-1633857). References [1] Babak Ahmadi, Kristian Kersting, and Sriraam Natarajan. Lifted online training of relational models with stochastic gradient methods. In ECML PKDD, pages 585–600, 2012. [2] W. W. Rouse Ball. Other questions on probability. Mathematical Recreations and Essays, page 45, 1960. [3] Paul Beame, Guy Van den Broeck, Eric Gribkoff, and Dan Suciu. Symmetric weighted first-order model counting. In PODS, pages 313–328, 2015. [4] Hung Hai Bui, Tuyen N Huynh, Artificial Intelligence Center, and Sebastian Riedel. Automorphism groups of graphical models and lifted variational inference. In UAI, page 132, 2013. [5] Jaesik Choi, Rodrigo de Salvo Braz, and Hung H. Bui. Efficient methods for lifted inference with aggregate factors. In AAAI, 2011. [6] Nilesh Dalvi and Dan Suciu. Efficient query evaluation on probabilistic databases. The VLDB Journal, 16(4):523–544, 2007. [7] Luc De Raedt, Angelika Kimmig, and Hannu Toivonen. ProbLog: A probabilistic Prolog and its application in link discovery. In IJCAI, volume 7, 2007. [8] Luc De Raedt, Kristian Kersting, Sriraam Natarajan, and David Poole. Statistical relational artificial intelligence: Logic, probability, and computation. Synthesis Lectures on Artificial Intelligence and Machine Learning, 10(2):1–189, 2016. [9] Rodrigo de Salvo Braz, Eyal Amir, and Dan Roth. Lifted first-order probabilistic inference. In IJCAI, pages 1319–1325, 2005. [10] Lise Getoor and Ben Taskar. Introduction to statistical relational learning. MIT press, 2007. [11] Vibhav Gogate and Pedro Domingos. Probabilistic theorem proving. In UAI, pages 256–265, 2011. 8 [12] Manfred Jaeger. Relational Bayesian networks. In UAI. Morgan Kaufmann Publishers Inc., 1997. [13] Yacine Jernite, Alexander M Rush, and David Sontag. A fast variational approach for learning Markov random field language models. In ICML, 2015. [14] Abhay Jha, Vibhav Gogate, Alexandra Meliou, and Dan Suciu. Lifted inference seen from the other side: The tractable features. In NIPS, pages 973–981, 2010. [15] Seyed Mehran Kazemi and David Poole. Knowledge compilation for lifted probabilistic inference: Compiling to a low-level language. In KR, 2016. [16] Seyed Mehran Kazemi and David Poole. Why is compiling lifted inference into a low-level language so effective? arXiv preprint arXiv:1606.04512, 2016. [17] Kristian Kersting, Babak Ahmadi, and Sriraam Natarajan. Counting belief propagation. In UAI, pages 277–284, 2009. [18] Daphne Koller and Nir Friedman. Probabilistic Graphical Models: Principles and Techniques. MIT Press, Cambridge, MA, 2009. [19] Timothy Kopp, Parag Singla, and Henry Kautz. Lifted symmetry detection and breaking for MAP inference. In NIPS, pages 1315–1323, 2015. [20] Brian Milch, Luke S. Zettlemoyer, Kristian Kersting, Michael Haimes, and Leslie Pack Kaelbling. Lifted probabilistic inference with counting formulae. In AAAI, pages 1062–1068, 2008. [21] Mathias Niepert. Markov chains on orbits of permutation groups. In UAI, 2012. [22] David Poole, Fahiem Bacchus, and Jacek Kisynski. Towards completely lifted search-based probabilistic inference. arXiv:1107.4035 [cs.AI], 2011. [23] David Poole. First-order probabilistic inference. In IJCAI, pages 985–991, 2003. [24] Matthew Richardson and Pedro Domingos. Markov logic networks. Machine Learning, 62:107–136, 2006. [25] Parag Singla and Pedro M Domingos. Lifted first-order belief propagation. In AAAI, volume 8, pages 1094–1099, 2008. [26] Dan Suciu, Dan Olteanu, Christopher Ré, and Christoph Koch. Probabilistic databases. Synthesis Lectures on Data Management, 3(2):1–180, 2011. [27] Nima Taghipour, Daan Fierens, Guy Van den Broeck, Jesse Davis, and Hendrik Blockeel. Completeness results for lifted variable elimination. In AISTATS, pages 572–580, 2013. [28] Guy Van den Broeck, Nima Taghipour, Wannes Meert, Jesse Davis, and Luc De Raedt. Lifted probabilistic inference by first-order knowledge compilation. In IJCAI, pages 2178–2185, 2011. [29] Guy Van den Broeck, Arthur Choi, and Adnan Darwiche. Lifted relax, compensate and then recover: From approximate to exact lifted probabilistic inference. In UAI, 2012. [30] Guy Van den Broeck, Wannes Meert, and Adnan Darwiche. Skolemization for weighted first-order model counting. In KR, 2014. [31] Guy Van den Broeck. On the completeness of first-order knowledge compilation for lifted probabilistic inference. In NIPS, pages 1386–1394, 2011. [32] Jan Van Haaren, Guy Van den Broeck, Wannes Meert, and Jesse Davis. Lifted generative learning of Markov logic networks. Machine Learning, pages 1–29, 2015. [33] Deepak Venugopal and Vibhav Gogate. Evidence-based clustering for scalable inference in Markov logic. In ECML PKDD, pages 258–273, 2014. [34] Deepak Venugopal and Vibhav G Gogate. Scaling-up importance sampling for Markov logic networks. In NIPS, pages 2978–2986, 2014. 9 | 2016 | 460 |
6,395 | Optimal Tagging with Markov Chain Optimization Nir Rosenfeld School of Computer Science and Engineering Hebrew University of Jerusalem nir.rosenfeld@mail.huji.ac.il Amir Globerson The Blavatnik School of Computer Science Tel Aviv University gamir@post.tau.ac.il Abstract Many information systems use tags and keywords to describe and annotate content. These allow for efficient organization and categorization of items, as well as facilitate relevant search queries. As such, the selected set of tags for an item can have a considerable effect on the volume of traffic that eventually reaches an item. In tagging systems where tags are exclusively chosen by an item’s owner, who in turn is interested in maximizing traffic, a principled approach for assigning tags can prove valuable. In this paper we introduce the problem of optimal tagging, where the task is to choose a subset of tags for a new item such that the probability of browsing users reaching that item is maximized. We formulate the problem by modeling traffic using a Markov chain, and asking how transitions in this chain should be modified to maximize traffic into a certain state of interest. The resulting optimization problem involves maximizing a certain function over subsets, under a cardinality constraint. We show that the optimization problem is NP-hard, but has a (1−1 e)-approximation via a simple greedy algorithm due to monotonicity and submodularity. Furthermore, the structure of the problem allows for an efficient computation of the greedy step. To demonstrate the effectiveness of our method, we perform experiments on three tagging datasets, and show that the greedy algorithm outperforms other baselines. 1 Introduction To allow for efficient navigation and search, modern information systems rely on the usage of nonhierarchical tags, keywords, or labels to describe items and content. These tags are then used either explicitly by users when searching for content, or implicitly by the system to recommend related items or to augment search results. Many online systems where users can create or upload content support tagging. Examples of such systems are media-sharing platforms, social bookmarking websites, and consumer to consumer auctioning services. While in some systems any user can tag any item, in many ad-hoc systems tags are exclusively set by the item’s owner alone. She, in turn, is free to select any set of tags or keywords which she believes best describe the item. Typically, the only concrete limitation is on the number of tags, words, or characters used. Tags are often chosen on a basis of their ability to best describe, classify, or categorize items and content. By choosing relevant tags, users aid in creating a more organized information system. However, content owners may have their own individual objective, such as maximizing the exposure of their items to other browsing users. This is true for many artists, artisans, content creators, and merchants whose services and items are provided online. This suggests that choosing tags should in fact be done strategically. For instance, for a user uploading a new song, tagging it as ‘Rock’ may be informative, but will probably only contribute marginally to the song’s traffic, as the competition for popularity under this tag can be fierce. On the other hand, choosing a unique or obscure tag may be appealing, but will not help much either. Strategic tagging 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. or keyword selection is clearly exhibited in search systems, where keywords are explicitly used for filtering and ordering search results or ad placements, and users have a clear incentive of maximizing an item’s exposure. Nonetheless, the selection process is typically heuristic. Recent years have seen an abundance of work on methods for user-specific tag recommendations [8, 10, 5]. Such methods aim to support collaborative tagging systems, where any user can tag any item in the repository. In contrast, in this paper we take a complementary perspective and focus on taxonomic tagging systems, where only the owner of an item can determine its tags. We formalize the task of optimal tagging and suggest an efficient, provably-approximate algorithm. While the problem is shown to be NP-hard, we prove that the objective is in fact monotone and submodular, which suggests a straightforward greedy (1 −1 e)-approximation algorithm [13]. We also show how the greedy step, which consists of solving a set of linear equations, can be greatly simplified. This results in a significant improvement of runtime. We begin by modeling a user browsing a tagged information system as a random walk. Items and tags act as states in a Markov chain, whose transition probabilities describe the probability of users transitioning between items and tags. Given a new item, our task is to choose a subset of k tags for this item. When an item is tagged, positive probabilities are assigned to transitioning both from the tag to the item and from the item to the tag. Our objective is to choose the subset of k tags which will maximize traffic to that item, namely the probability of a random walk reaching the item. Intuitively, tagging an item causes probability to flow from the tag to the item, on account of other items with this tag. Our goal is to take as much probability mass as possible from the system as a whole. Our method shares some similarities with other PageRank (PR, [2]) based methods, which optimize measures based on the stationary distribution [14, 4, 6, 15]. Here we argue that our approach, which focuses on maximizing the probability of a random walk reaching a new item’s state, is better suited to the task of optimal tagging. First, an item’s popularity should only increase when assigned a new tag. Since tagging an item creates bidirectional links, its stationary probability may undesirably decrease. Hence, optimizing the PR of an item will lead to an undesired non-monotone objective [1]. Second, PR considers a single Markov chain for all items, and is thus not item-centric. In contrast, our method considers a unique instance of the transition system for every item we consider. While an item-specific Personalized PR based objective can be constructed, it would consider random walks from a given state, not to it. Third, a stationary distribution does not always exist, and hence may require modifications of the Markov chain. Finally, optimizing PR is known to be hard. While some approximations exist, our method provides superior guarantees and potentially better runtime [16]. Although the Markov chain model we propose for optimal tagging is bipartite, our results apply to general Markov chains. We therefore first formulate a general problem in Sec. 3, where the task is to choose k states to link a new state to such that the probability of reaching that state is maximal. Then, in Sec. 4 we prove that this problem is NP-hard by a reduction from vertex cover. In Sec. 5 we prove that for a general Markov chain the optimal objective is both monotonically non-decreasing and submodular. Based on this, in Sec. 6 we suggest a basic greedy (1 −1 e)-approximation algorithm, and describe a method for significantly improving its runtime. In Sec. 7 we revisit the optimal tagging problem and show how to construct a bipartite Markov chain for a given tag-supporting information system. In Sec. 8 we present experimental results on three tagging datasets (musical artists in Last.fm, bookmarks in Delicious, and movies in Movielens) and show that our algorithm outperforms other baselines. Concluding remarks are given in Sec. 9. 2 Related Work One of the main roles of tags is to aid in the categorization and classification of content. An active line of research in tagging systems focuses on the task of tag recommendations, where the goal is to predict the tags a given user may assign an item. This task is applicable in collaborative tagging systems and folksonomies, where any user can tag any item. Methods for this task are based on random walks [8, 10] and tensor factorization [5]. While the goal in tag recommendation is also to output a set of tags, our task is very different in nature. Tag recommendation is a prediction task for item-user pairs, is based on ground-truth evaluation, and is applied in collaborative tagging systems. In contrast, ours is an item-centric optimization task for tag-based taxonomies, and is counterfactual in nature, as the selection of tags is assumed to affect future outcomes. 2 A line of work similar to ours is optimizing the PageRank of web pages in different settings. In [4] the authors consider the problem of computing the maximal and minimal PageRank value for a set of “fragile” links. The authors of [1] analyze the effects of additional outgoing links on the PageRank value. Perhaps the works most closely related to ours are [16, 14], where an approximation algorithm is given for the problem of maximizing the PageRank value by adding at most k incoming links. The authors prove that the probability of reaching a web page is submodular and monotone in a fashion similar to ours (but with a different parameterization), and use it as a proxy for PageRank. Our framework uses absorbing Markov chains, whose relation to submodular optimization has been explored in [6] for opinion maximization and in [12] for computing centrality measures in networks. Following the classic work of Nemhauser [13], submodular optimization is now a very active line of research. Many interesting optimization problems across diverse domains have been shown to be submodular. Examples include sensor placement [11] and social influence maximization [9]. 3 Problem Formulation Before presenting our approach to optimal tagging, we first describe a general combinatorial optimization task over Markov chains, of which optimal tagging is a special case. Consider a Markov chain over n + 1 states. Assume there is a state σ to which we would like to add k new incoming transitions, where w.l.o.g. σ = n+1. In the tagging problem, σ will be an item (e.g., song or product) and the incoming transitions will be from possible tags for the item, or from related items. The optimization problem is then to choose a subset S ⊆[n] of k states so as to maximize the probability of visiting σ at some point in time. Formally, let Xt ∈[n + 1] be the random variable corresponding to the state of the Markov chain at time t. Then the optimal tagging problem is: max S⊆[n], |S|≤k PS [Xt = σ for some t ≥0] (1) At first glance, it is not clear how to compute the objective function in Eq. (1). However, with a slight modification of the Markov chain, the objective function can be expressed as a simple function of the Markov chain parameters, as explained next. In general, σ may have outgoing edges, and random walks reaching σ may continue to other states afterward. Nonetheless, as we are only interested in the probability of reaching σ, the states visited after σ have no effect on our objective. Hence, the edges out of σ can be safely replaced with a single self-edge without affecting the probability of reaching σ. This essentially makes σ an absorbing state, and our task becomes to maximize the probability of the Markov chain being absorbed in σ. In the remainder of the paper we consider this equivalent formulation. When the Markov chain includes other absorbing states, optimizing over S can be intuitively thought of as trying to transfer as much probability mass from the competing absorbing states to σ, under a budget on the number of states that can be connected to σ.1 As we discuss in Section 7, having competing absorbing states arises naturally in optimal tagging. To fully specify the problem, we need the Markov chain parameters. Denote the initial distribution by π. For the transition probabilities, each node i will have two sets of transitions: one when it is allowed to transition to σ (i.e., i ∈S) and one when no transition is allowed. Using two distinct sets is necessary since in both cases outgoing probabilities must sum to one. We use qij to denote the transition probability from state i to j when transition from i to σ is not allowed, and q+ ij when it is. We also denote the corresponding transition matrices by Q and Q+. It is natural to assume that when adding a link from i to σ, transition into σ will become more likely, and transition to other states can only be less likely. Thus, we add the assumptions that: ∀i : 0 = qiσ ≤q+ iσ, ∀i , ∀j ̸= σ : q+ ij ≤qij (2) Given a subset S of states from which transitions to σ are allowed, we construct a new transition matrix, taking corresponding rows from Q and Q+. We denote this matrix by ρ(S), with ρij(S) = q+ ij i ∈S qij i /∈S (3) 1 In an ergodic chain with one absorbing state, all walks reach σ w.p. 1, and the problem becomes trivial. 3 4 NP-Hardness We now show that for a general Markov chain, the optimal tagging problem in Eq. (1) is NP-hard by a reduction from vertex cover. Given an undirected graph G = (V, E) with n nodes as input to the vertex cover problem, we construct an instance of optimal tagging such that there exists a vertex cover S ⊆V of size at most k iff the probability of reaching σ reaches some threshold. To construct the absorbing Markov chain, we create a transient state i for every node i ∈V , and add two absorbing states ∅and σ. We set the initial distribution to be uniform, and for some 0 < ϵ < 1 set the transitions for transient states i as follows: q+ ij = 1 j = σ 0 j ̸= σ , qij = 0 j = σ ϵ j = ∅ 1−ϵ deg(i) otherwise (4) Let U ⊆V of size k, and S(U) the set of states corresponding to the nodes in U. We claim that U is a vertex cover in G iff the probability of reaching σ when S(U) is chosen is 1 −(n−k) n ϵ. Assume U is a vertex cover. For every i ∈S(U), a walk starting in i will reach σ with probability 1 in one step. For every i ̸∈S(U), with probability ϵ a walk will reach ∅in one step, and with probability 1 −ϵ it will visit one of its neighbors j. Since U is a vertex cover, it will then reach σ in one step with probability 1. Hence, in total it will reach σ with probability 1 −ϵ. Overall, the probability of reaching σ is k+(n−k)(1−ϵ) n = 1 −(n−k) n ϵ as needed. Note that this is the maximal possible probability of reaching σ for any subset of V of size k. Assume now that U is not a vertex cover, then there exists an edge (i, j) ∈E such that both i ̸∈S(U) and j ̸∈S(U). A walk starting in i will reach ∅in one step with probability ϵ, and in two steps (via j) with probability ϵ· qij > 0. Hence, it will reach σ with probability strictly smaller than 1 −ϵ, and the overall probability of reaching ϵ will be strictly smaller than 1 −(n−k) n ϵ. 5 Proof of Monotonicity and Submodularity Denote by PS [A] the probability of event A when transitions from S to σ are allowed. We define: c(k) i (S) = PS [Xt = σ for some t ≤k|X0 = i] (5) ci(S) = PS [Xt = σ for some t|X0 = i] = limk→∞c(k) i (6) Using c(S) = (c1(S), . . . , cn(S)), the objective in Eq. (1) now becomes: max S⊆[n],|S|≤k f(S), f(S) = ⟨π, c(S)⟩= PS [Xt = σ for some t] (7) We now prove that f(S) is both monotonically non-decreasing and submodular. 5.1 Monotonicity When a link is created from i to σ, the probability of reaching σ directly from i increases. However, due to the renormalization constraints, the probability of reaching σ via longer paths may decrease. Trying to prove that for every random walk f is monotone and using additive closure is bound to fail. Nonetheless, our proof of monotonicity shows that the overall probability cannot decrease. Theorem 5.1. For every k ≥0 and i ∈[n], c(k) i is non-decreasing. Namely, for all S ⊆[n] and z ∈[n] \ S, it holds that c(k) i (S) ≤c(k) i (S ∪{z}). Proof. We prove by induction on k. For k = 0, as π is independent of S and z, we have: c0 i (S) = πσ1{i=σ} = c0 i (S ∪{z}) Assume now that the claim holds for some k ≥0. For any T ⊆[n], it holds that: c(k+1) i (T) = n X j=1 ρij(T)c(k) j (T) + ρiσ1{i∈T } (8) 4 We separate into cases. When i ̸= z, we have: i ∈S : c(k+1) i (S) = n X j=1 q+ ijc(k) j (S) + q+ iσ ≤ n X j=1 q+ ijc(k) j (S ∪z) + q+ iσ = c(k+1) i (S ∪z) (9) i ̸∈S : c(k+1) i (S) = n X j=1 qijc(k) j (S) ≤ n X j=1 qijc(k) j (S ∪z) = c(k+1) i (S ∪z) (10) using the inductive assumption and Eq. (8). When i = z, we have: c(k+1) i (S) ≤ n X j=1 qijc(k) j (S ∪z) = n X j=1 q+ ijc(k) j (S ∪z) + n X j=1 (qij −q+ ij)c(k) j (S ∪z) ≤ n X j=1 q+ ijc(k) j (S ∪z) + n X j=1 (qij −q+ ij) = n X j=1 q+ ijc(k) j (S ∪z) + q+ zσ = c(k+1) i (S ∪z) due to to qij ≥q+ ij, c ≤1, Pn j=1 qij = 1, and Pn j=1 q+ ij = 1 −q+ iσ. Corollary 5.2. ∀i ∈[n], ci(S) is non-decreasing, hence f(S) = ⟨π, c(S)⟩is non-decreasing. 5.2 Submodularity Submodularity captures the principle of diminishing returns. A function f(S) is submodular if: ∀X ⊆Y ⊆[n], z /∈X, f(X ∪{z}) −f(X) ≥f(Y ∪{z}) −f(Y ) In what follows we will use the following equivalent definition: ∀S ⊆[n], z1, z2 ∈[n] \ S, f(S ∪{z1}) + f(S ∪{z2}) ≥f(S ∪{z1, z2}) + f(S) (11) Using this formulation, we now show that f(S) as defined in Eq. (7) is submodular. Theorem 5.3. For every k ≥0 and i ∈[n], c(k) i (S) is a submodular function. Proof. We prove by induction on k. For k = 0, once again π is independent of S and hence c0 i is modular. Assume now that the claim holds for some k ≥0. For brevity we define: c(k) i = c(k) i (S), c(k) i,1 = c(k) i (S ∪{z1}), c(k) i,2 = c(k) i (S ∪{z2}), c(k) i,12 = c(k) i (S ∪{z1, z2}) We’d like to show that c(k+1) i,1 + c(k+1) i,2 ≥c(k+1) i,12 + c(k+1) i . For every j ∈[n], we’ll prove that: ρij(S ∪{z1})c(k) j,1 + ρij(S ∪{z2})c(k) j,2 ≥ρij(S ∪{z1, z2})c(k) j,12 + ρij(S)c(k) j (12) By summing over all j ∈[n] and adding ρiσ1{i∈T } we get Eq. (8) and conclude our proof. We separate into different cases for i. If i ∈S, then we have ρij(S ∪{z1, z2}) = ρij(S ∪{z1}) = ρij(S ∪{z2}) = ρij(S) = q+ ij. Similarly, if i /∈S ∪{z1, z2}, then all terms now equal qij. Eq. (12) then follows from the inductive assumption. Assume i = z1 (and analogously for i = z2). From the assumption in Eq. (2) we can write qij = (1 + α)q+ ij for some α ≥0. Then Eq. (12) becomes: q+ ijc(k) j,1 + (1 + α)q+ ijc(k) j,2 ≥q+ ijc(k) j,12 + (1 + α)q+ ijc(k) j (13) Divide by q+ ij > 0 if needed and reorder to get: c(k) j,1 + ck j,2 −c(k) j,12 −c(k) j + α(ck j,2 −c(k) j ) ≥0 (14) This indeed holds since the first term is non-negative from the inductive assumption, and the second term is non-negative because of monotonicity and α ≥0. Corollary 5.4. ∀i ∈[n], ci(S) is submodular, hence f(S) = ⟨π, c(S)⟩is submodular. 5 Algorithm 1 1: function SIMPLEGREEDYTAGOPT(Q, Q+, π, k) ▷See supp. for efficient implementation 2: Initialize S = ∅ 3: for i ←1 to k do 4: for z ∈[n] \ S do 5: c = I −A(S ∪{z}) \ b(S ∪{z}) ▷A, b are set by Q, Q+ using Eqs. (3), (15) 6: v(z) = ⟨π, c⟩ 7: S ←S ∪argmaxz v(z) 8: Return S 6 Optimization Maximizing submodular functions is hard in general. However, a classic result by Nemhauser [13] shows that a non-decreasing submodular set function, such as our f(S), can be efficiently optimized via a simple greedy algorithm, with a guaranteed (1 −1 e)-approximation of the optimum. The greedy algorithm initializes S = ∅, and then sequentially adds elements to S. For a given S, the algorithm iterates over all z ∈[n] \ S and computes f(S ∪{z}). Then, it adds the highest scoring z to S, and continues to the next step. We now discuss its implementation for our problem. Computing f(S) for a given S reduces to solving a set of linear equations. For transient states {1, . . . , n −r} and absorbing states {n −r + 1, . . . , n + 1 = σ}, the transition matrix ρ(S) becomes: ρ(S) = A(S) B(S) 0 I (15) where A(S) are the transition probabilities between transient states, B(S) are the transition probabilities from transient states to absorbing states, and I is the identity matrix. When clear from context we will drop the dependence of A, B on S. Note that ρ(S) has at least one absorbing state (namely σ). We denote by b the column of B corresponding to state σ (i.e., B’s rightmost column). We would like to calculate f(S). By Eq. (6), the probability of reaching σ given an initial state i is: ci(S) = ∞ X t=0 X j∈[n−r] PS [Xt = σ|Xt−1 = j] PS [Xt−1 = j|X0 = i] = ∞ X t=0 Atb ! i The above series has a closed form solution: ∞ X t=0 At = (I −A)−1 ⇒ c = (I −A)−1b Thus, c(S) is the solution of the set of linear equations, which readily gives us f(S): f(S) = ⟨π, c⟩ s.t. (I −A(S))c = b(S) (16) The greedy algorithm can thus be implemented by sequentially considering candidate sets S of increasing size, and for each z calculating f(S ∪{z}) by solving a set of linear equations (see Algorithm 1). Though parallelizable, this naïve implementation may be costly as it requires solving O(n2) sets of n −r linear equations, one for every addition of z to S. Fast submodular solvers [7] can reduce the number of f(S) evaluations by an order of magnitude. In addition, we now show how a significant speedup in computing f(S) itself can be achieved using certain properties of f(S). A standard method for solving the set of linear equations (I −A)c = b if to first compute an LUP decomposition for (I −A), namely find lower and upper diagonal matrices L, U and a permutation matrix P such that LU = P(I −A). Then, it suffices to solve Ly = Pb and Uc = y. Since L and U are diagonal, solving these equations can be performed efficiently. The costly operation is computing the decomposition in the first place. Recall that ρ(S) is composed of rows from Q+ corresponding to S and rows from Q corresponding to [n] \ S. This means that ρ(S) and ρ(S ∪{z}) differ only in one row, or equivalently, that ρ(S ∪{z}) can be obtained from ρ(S) by adding a rank-1 matrix. Given an LUP decomposition of ρ(S), we can 6 efficiently compute f(S ∪{z}) (and the corresponding decomposition) using efficient rank-1-update techniques such as Bartels-Golub-Reid [17], which are especially efficient for sparse matrices. As a result, it suffices to compute only a single LUP decomposition once at the beginning, and perform cheap updates at every step. We give an efficient implementation in the supp. material. 7 Optimal Tagging In this section we return to the task of optimal tagging and show how the Markov chain optimization framework described above can be applied. We use a random surfer model, where a browsing user hops between items and tags in a bipartite Markov chain. In its explicit form, our model captures the activity of browsing users whom, when viewing an item, are presented with the item’s tags and may choose to click on them (and similarly when viewing tags). In reality, many systems also include direct links between related items, often in the form of a ranked list of item recommendations. The relatedness of two items is in many cases, at least to some extent, based on their mutual tags. Our model captures this notion of similarity by indirect transitions via tag states. This allows us to encode tags as variables in the objective. Furthermore, adding direct transitions between items is straightforward as our results apply to general Markov chains. Note that in contrast to models for tag recommendation, we do not need to explicitly model users, as our setup defines only one distinct optimization task per item. In what follows we formalize the above notions. Consider a system of m items Ω= {ω1, . . . , ωm} and n tags T = {τ1, . . . , τn}. Each item ωi has a set of tags Ti ⊆T, and each tag τj has a set of items Ωj ⊆Ω. The items and tags constitute the states of a bipartite Markov chain, where users hop between items and tags. Specifically, the transition matrix ρ can have non-zero entries ρij and ρji for items ωi tagged by τj. To model the fact that browsing users eventually leave the system, we add a global absorbing state ∅and add transition probabilities ρi∅= ϵi > 0 for all items ωi. For simplicity we assume that ϵi = ϵ for all i, and that π can be non-zero only for tag states. In our setting, when a new item σ is uploaded, its owner may choose a set S ⊆T of at most k tags for σ. Her goal is to choose S such that the probability of an arbitrary browsing user reaching (or equivalently, being absorbed in) σ while browsing the system is maximal. As in the general case, the choice of S affects the transition matrix ρ(S). Denote by Pij the transition probability from item ωi to tag τj, by Rji(S) the transition probability from τj to ωi under S, and let rj(S) = Rjσ(S). Using Eq. (15), ρ can be written as: ρ(S) = A B 0 I2 , A = 0 R(S) P 0 , B = 0 r(S) 1· ϵ 0 , I2 = 1 0 0 1 where 0 and 1 are appropriately sized vectors or matrices. Since we are only interested in selecting tags, we may consider a chain that includes only the tag states, with the item states marginalized out. The transition matrix between tags is given by ρ2(S) = R(S)P. The transition probabilities from tags to σ remain r(S). Our objective of maximizing the probability of reaching σ under S is then: f(S) = ⟨π, c⟩ s.t. (I −R(S)P) c = r(S) (17) which is a special case of the general objective presented in Eq. (16), and hence can be optimized efficiently. In the supplementary material we prove that this special case is still NP-hard. 8 Experiments To demonstrate the effectiveness of our approach, we perform experiments on optimal tagging in data collected from Last.fm, Delicious, and Movielens by the HetRec 2011 workshop [3]. The datasets include all items (between 10,197 and 59,226) and tags (between 11,946 and 53,388) reached by crawling a set of about 2,000 users in each system, as well as some metadata. For each dataset, we first created a bipartite graph of items and tags. Next, we generated 100 different instances of our problem per dataset by expanding each of the 100 highest-degree tags and creating a Markov chain for their items and their tags. We discarded nodes with less than 10 edges. To create an interesting tag selection setup, for each item in each instance we augmented its true tags with up to 100 similar tags (based on [18]). These served as the set of candidate tags for which 7 k 1 5 9 13 17 21 25 Pr(σ) 0 0.05 0.1 0.15 0.2 Last.fm Greedy PageRank BiFolkRank* High degree Low degree True tags One step Random k 1 5 9 13 17 21 25 Pr(σ) 0 0.05 0.1 0.15 0.2 Delicious k 1 5 9 13 17 21 25 Pr(σ) 0 0.05 0.1 0.15 0.2 0.25 Movielens Figure 1: The probability of reaching a focal item σ under a budget of k tags for various methods. transitions to the item were allowed. We focused on items which were ranked first in at least 10 of their 100 candidate tags, giving a total of 18,167 focal items for comparison. For each such item, our task was to choose the k tags which maximize the probability of reaching the focal item. Transition probabilities from tags to items were set to be proportional to the item weights - number of listens for artists in Last.fm, tag counts for bookmarks in Delicious, and averaged ratings for movies in Movielens. As the datasets do not include explicit weights for tags, we used uniform transition probabilities from items to tags. The initial distribution was set to be uniform over the set of candidate tags, and the transition probability from items to ∅was set to ϵ = 0.1. We compared the performance of our greedy algorithm with several baselines. Random-walk based methods included PageRank and an adaptation2 of BiFolkRank [10], a state-of-the-art tag recommendation method that operates on item-tag relations. Heuristics included choosing tags with highest and lowest degree, true labels (for relevant k-s) sorted by weight, and random. To measure the added value of long random walks, we also display the probability of reaching σ in one step. Results for all three datasets are provided in Fig. 1, which shows the average probability of reaching the focal item for values of k ∈{1, . . . , 25}. As can be seen, the greedy method clearly outperforms other baselines. Considering paths of all lengths improves results by a considerable 20-30% for k = 1, and roughly 5% for k = 25. An interesting observation is that the performance of the true tags is rather poor. A plausible explanation for this is that the data we use are taken from collaborative tagging systems, where items can be tagged by any user. In such systems, tags typically play a categorical or hierarchical role, and as such are probably not optimal for promoting item popularity. The supplementary material includes an interesting case analysis. 9 Conclusions In this paper we introduced the problem of optimal tagging, along with the general problem of optimizing probability mass in Markov chains by adding links. We proved that the problem is NPhard, but can be (1 −1 e)-approximated due to the submodularity and monotonicity of the objective. Our efficient greedy algorithm can be used in practice for choosing optimal tags or keywords in various domains. Our experimental results show that simple heuristics and PageRank variants underperform our disciplined approach, and naïvely selecting the true tags can be suboptimal. In our work we assumed access to the transition probabilities between tags and items and vice versa. While the transition probabilities for existing items can be easily estimated by a system’s operator, estimating the probabilities from tags to new items is non-trivial. This is an interesting problem to pursue. Even so, users do not typically have access to the information required for estimation. Our results suggest that users can simply apply the greedy steps sequentially via trial-and-error [9]. Finally, since our task is of a counterfactual nature, it is hard to draw conclusions from the experiments as to the effectiveness of our method in real settings. It would be interesting to test it in realty, and compare it to strategies used by both lay users and experts. Especially interesting in this context are competitive domains such as ad placements and viral marketing. We leave this for future research. Acknowledgments: This work was supported by the ISF Centers of Excellence grant 2180/15, and by the Intel Collaborative Research Institute for Computational Intelligence (ICRI-CI). 2To apply the method to our setting, we used a uniform prior over user-tag relations. 8 References [1] Konstantin Avrachenkov and Nelly Litvak. The effect of new links on google pagerank. Stochastic Models, 22(2):319–331, 2006. [2] Sergey Brin and Lawrence Page. Reprint of: The anatomy of a large-scale hypertextual web search engine. Computer networks, 56(18):3825–3833, 2012. [3] Iván Cantador, Peter Brusilovsky, and Tsvi Kuflik. 2nd workshop on information heterogeneity and fusion in recommender systems (hetrec 2011). In Proceedings of the 5th ACM conference on Recommender systems, RecSys 2011, New York, NY, USA, 2011. ACM. [4] Balázs Csanád Csáji, Raphaël M Jungers, and Vincent D Blondel. Pagerank optimization in polynomial time by stochastic shortest path reformulation. In Algorithmic Learning Theory, pages 89–103. Springer, 2010. [5] Xiaomin Fang, Rong Pan, Guoxiang Cao, Xiuqiang He, and Wenyuan Dai. Personalized tag recommendation through nonlinear tensor factorization using gaussian kernel. In Twenty-Ninth AAAI Conference on Artificial Intelligence, 2015. [6] Aristides Gionis, Evimaria Terzi, and Panayiotis Tsaparas. Opinion maximization in social networks. In SDM, pages 387–395. SIAM, 2013. [7] Amit Goyal, Wei Lu, and Laks VS Lakshmanan. CELF++: optimizing the greedy algorithm for influence maximization in social networks. In Proceedings of the 20th international conference companion on World wide web, pages 47–48. ACM, 2011. [8] Andreas Hotho, Robert Jäschke, Christoph Schmitz, Gerd Stumme, and Klaus-Dieter Althoff. Folkrank: A ranking algorithm for folksonomies. In LWA, volume 1, pages 111–114, 2006. [9] David Kempe, Jon Kleinberg, and Éva 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, pages 137–146. ACM, 2003. [10] Heung-Nam Kim and Abdulmotaleb El Saddik. Personalized pagerank vectors for tag recommendations: inside folkrank. In Proceedings of the fifth ACM conference on Recommender systems, pages 45–52. ACM, 2011. [11] Andreas Krause, Ajit Singh, and Carlos Guestrin. Near-optimal sensor placements in gaussian processes: Theory, efficient algorithms and empirical studies. The Journal of Machine Learning Research, 9:235–284, 2008. [12] Charalampos Mavroforakis, Michael Mathioudakis, and Aristides Gionis. Absorbing randomwalk centrality: Theory and algorithms. arXiv preprint arXiv:1509.02533, 2015. [13] George L Nemhauser, Laurence A Wolsey, and Marshall L Fisher. An analysis of approximations for maximizing submodular set functions. Mathematical Programming, 14(1):265–294, 1978. [14] Martin Olsen. Maximizing pagerank with new backlinks. In International Conference on Algorithms and Complexity, pages 37–48. Springer, 2010. [15] Martin Olsen and Anastasios Viglas. On the approximability of the link building problem. Theoretical Computer Science, 518:96–116, 2014. [16] Martin Olsen, Anastasios Viglas, and Ilia Zvedeniouk. A constant-factor approximation algorithm for the link building problem. In Combinatorial Optimization and Applications, pages 87–96. Springer, 2010. [17] John Ker Reid. A sparsity-exploiting variant of the Bartels-Golub decomposition for linear programming bases. Mathematical Programming, 24(1):55–69, 1982. [18] Börkur Sigurbjörnsson and Roelof Van Zwol. Flickr tag recommendation based on collective knowledge. In Proceedings of the 17th international conference on World Wide Web, pages 327–336. ACM, 2008. 9 | 2016 | 461 |
6,396 | Fast and Flexible Monotonic Functions with Ensembles of Lattices K. Canini, A. Cotter, M. R. Gupta, M. Milani Fard, J. Pfeifer Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043 {canini,acotter,mayagupta,janpf,mmilanifard}@google.com Abstract For many machine learning problems, there are some inputs that are known to be positively (or negatively) related to the output, and in such cases training the model to respect that monotonic relationship can provide regularization, and makes the model more interpretable. However, flexible monotonic functions are computationally challenging to learn beyond a few features. We break through this barrier by learning ensembles of monotonic calibrated interpolated look-up tables (lattices). A key contribution is an automated algorithm for selecting feature subsets for the ensemble base models. We demonstrate that compared to random forests, these ensembles produce similar or better accuracy, while providing guaranteed monotonicity consistent with prior knowledge, smaller model size and faster evaluation. 1 Introduction A long-standing challenge in machine learning is to learn flexible monotonic functions [1] for classification, regression, and ranking problems. For example, all other features held constant, one would expect the prediction of a house’s cost to be an increasing function of the size of the property. A regression trained on noisy examples and many features might not respect this simple monotonic relationship everywhere, due to overfitting. Failing to capture such simple relationships is confusing for users. Guaranteeing monotonicity enables users to trust that the model will behave reasonably and predictably in all cases, and enables them to understand at a high-level how the model responds to monotonic inputs [2]. Prior knowledge about monotonic relationships can also be an effective regularizer [3]. 0.9 1.0 0.8 0.0 f1(x) feature 1 feature 2 0.0 1.0 0.5 0.0 f2(x) feature 3 feature 2 0.4 0.4 1.0 0.0 f3(x) feature 3 feature 4 0 0.2 0.4 0.6 0.8 1 Figure 1: Contour plots for an ensemble of three lattices, each of which is a linearly-interpolated look-up table. The first lattice f1 acts on features 1 and 2, the second lattice f2 acts on features 2 and 3, and f3 acts on features 3 and 4. Each 2×2 look-up table has four parameters: for example, for f1(x) the parameters are θ1 = [0, 0.9, 0.8, 1]. Each look-up table parameter is the function value for an extreme input, for example, f1([0, 1]) = θ1[2] = 0.9. The ensemble function f1 + f2 + f3 is monotonic with respect to features 1, 2 and 3, but not feature 4. 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Table 1: Key notation used in the paper. Symbol Definition D number of features D set of features 1, 2, . . . , D S number of features in each lattice L number of lattices in the ensemble sℓ⊂D ℓth lattice’s set of S feature indices (xi, yi) ∈[0, 1]D × R ith training example x[sℓ] ∈[0, 1]S x for feature subset sℓ Φ(x) : [0, 1]D →[0, 1]2D linear interpolation weights for x v ∈{0, 1}D a vertex of a 2D lattice θ ∈R2D parameter values for a 2D lattice Simple monotonic functions can be learned with a linear function forced to have positive coefficients, but learning flexible monotonic functions is challenging. For example, multi-dimensional isotonic regression has complexity O(n4) for n training examples [4]. Other prior work learned monotonic functions on small datasets and very low-dimensional problems; see [2] for a survey. The largest datasets used in recent papers on training monotonic neural nets included two features and 3434 examples [3], one feature and 30 examples [5], and six features and 174 examples [6]. Another approach that uses an ensemble of rules on a modified training set, scales poorly with the dataset size and does not provide monotonicity guarantees on test samples [7]. Recently, monotonic lattice regression was proposed [2], which extended lattice regression [8] to learn a monotonic interpolated look-up table by adding linear inequality constraints to constrain adjacent look-up table parameters to be monotonic. See Figure 1 for an illustration of three such lattice functions. Experiments on real-world problems with millions of training examples showed similar accuracy to random forests [9], which generally perform well [10], but with the benefit of guaranteed monotonicity. Monotonic functions on up to sixteen features were demonstrated, but that approach is fundamentally limited in its ability to scale to higher input dimensions, as the number of parameters for a lattice model scales as O(2D). In this paper, we break through previous barriers on D by proposing strategies to learn a monotonic ensemble of lattices. The main contributions of this paper are: (i) proposing different architectures for ensembles of lattices with different trade-offs for flexibility, regularization and speed, (ii) theorem showing lattices can be merged, (iii) an algorithm to automatically learn feature subsets for the base models, (iv) extensive experimental analysis on real data showing results that are similar to or better than random forests, while respecting prior knowledge about monotonic features. 2 Ensemble of Lattices Consider the usual supervised machine learning set-up of training sample pairs {(xi, yi)} for i = 1, . . . , n. The label is either a real-valued yi ∈R, or a binary classification label yi ∈{−1, 1}. We assume that sensible upper and lower bounds can be set for each feature, and without loss of generality, the feature is then scaled so that xi ∈[0, 1]D. Key notation is summarized in Table 1. We propose learning a weighted ensemble of L lattices: F(x) = α0 + L X ℓ=1 αℓf(x[sℓ]; θℓ), (1) where each lattice f(x[sℓ]; θℓ) is a lattice function defined on a subset of features sℓ⊂D, and x[sℓ] denotes the S × 1 vector with the components of x corresponding to the feature set sℓ. We require each lattice to have S features, i.e. |sl| = S and θl ∈R2S for all l. The ℓth lattice is a linearly interpolated look-up table defined on the vertices of the S-dimensional unit hypercube: f(x[sℓ]; θℓ) = θT ℓΦ(x[sℓ]), where θℓ∈R2S are the look-up table parameters, and Φ(x[s]) : [0, 1]S →[0, 1]2S are the linear interpolation weights for x in the ℓth lattice. See Appendix A for a review of multilinear and simplex interpolations. 2 2.1 Monotonic Ensemble of Lattices Define a function f to be monotonic with respect to feature d if f(x) ≥f(z) for any two feature vectors x, z ∈RD that satisfy x[d] ≥z[d] and x[m] = z[m] for m ̸= d. A lattice function is monotonic with respect to a feature if the look-up table parameters are nondecreasing as that feature increases, and a lattice can be constrained to be monotonic with an appropriate set of sparse linear inequality constraints [2]. To guarantee that an ensemble of lattices is monotonic with respect to feature d, it is sufficient that each lattice be monotonic in feature d and that we have positive weights αℓ≥0 for all ℓ, by linearity of the sum over lattices in (1). Constraining each base model to be monotonic provides only a subset of the possible monotonic ensemble functions, as there could exist monotonic functions of the form (1) that are not monotonic in each fℓ(x). In this paper, for notational simplicity and because we find it the most empirically useful case for machine learning, we only consider lattices that have two vertices along each dimension, so a look-up table on S features has 2S parameters. Generalization to larger look-up tables is trivial [11, 2]. 2.2 Ensemble of Lattices Can Be Merged into One Lattice We show that an ensemble of lattices as expressed by (1) is equivalent to a single lattice defined on all D features. This result is important for two practical reasons. First, it shows that training an ensemble over subsets of features is a regularized form of training one lattice with all D features. Second, this result can be used to merge small lattices that share many features into larger lattices on the superset of their features, which can be useful to reduce evaluation time and memory use of the ensemble model. Theorem 1 Let F(x) := PL l=1 αlθT l Φ(x[sl]) as described in (1) where Φ are either multilinear or simplex interpolation weights. Then there exists a θ ∈R2D such that F(x) = θT Φ(x) for all x ∈[0, 1]D. The proof and an illustration is given in the supplementary material. 3 Feature Subset Selection for the Base Models A key problem is which features should be combined in each lattice. The random subspace method [12] and many variants of random forests randomly sample subsets of features for the base models. Sampling the features to increase the likelihood of selecting combinations of features that better correlate with the label can produce better random forests [13]. Ye et al. first estimated the informativeness of each feature by fitting a linear model and dividing the features up into two groups based on the linear coefficients, then randomly sampled the features considered for each tree from both groups, to ensure strongly informative features occur in each tree [14]. Others take the random subset of features for each tree as a starting point, but then create more diverse trees. For example, one can increase the diversity of the features in a tree ensemble by changing the splitting criterion [15], or by maximizing the entropy of the joint distribution over the leaves [16]. We also consider randomly selecting the subset of S features for each lattice uniformly and independently without replacement from the set of D features, we refer to this as a random tiny lattice (RTL). To improve the accuracy of ensemble selection, we can draw K independent RTL ensembles using K different random seeds, train each ensemble independently, and select the one with the lowest training or validation or cross-validation error. This approach treats the random seed that generates the RTL as a hyper-parameter to optimize, and in the extreme of sufficiently large K, this strategy can be used to minimize the empirical risk. The computation scales linearly in K, but the K training jobs can be parallelized. 3.1 Crystals: An Algorithm for Selecting Feature Subsets As a more efficient alternative to randomly selecting feature subsets, we propose an algorithm we term Crystals to jointly optimize the selection of the L feature subsets. Note that linear interactions between features can be captured by the ensemble’s linear combination of base models, but nonlinear 3 interactions must be captured by the features occurring together in a base model. This motivates us to propose choosing the feature subsets for each base model based on the importance of pairwise nonlinear interactions between the features. To measure pairwise feature interactions, we first separately (and in parallel) train lattices on all possible pairs of features, that is L = D 2 lattices, each with S = 2 features. Then, we measure the nonlinearity of the interaction of any two features d and ˜d by the torsion of their lattice, which is the squared difference between the slopes of the lattice’s parallel edges [2]. Let θd, ˜d denote the parameters of the 2×2 lattice for features d and ˜d. The torsion of the pair (d, ˜d) is defined as: τd, ˜d def = (θd, ˜d[1] −θd, ˜d[0]) −(θd, ˜d[3] −θd, ˜d[2]) 2 . (2) If the lattice trained on features d and ˜d is just a linear function, its torsion is τd, ˜d = 0, whereas a large torsion value implies a nonlinear interaction between the features. Given the torsions of all pairs of features, we propose using the L feature subsets {sℓ} that maximize the weighted total pairwise torsion of the ensemble: H({sℓ}) def = L X ℓ=1 X d, ˜d∈sℓ d̸= ˜d τd, ˜d γ Pℓ−1 ℓ′=1 I(d, ˜d∈sℓ′), (3) where I is an indicator. The discount value γ is a hyperparameter that controls how much the value of a pair of features diminishes when repeated in multiple lattices. The extreme case γ = 1 makes the objective (3) optimized by the degenerate case that all L lattices include the same feature pairs that have the highest torsion. The other extreme of γ = 0 only counts the first inclusion of a pair of features in the ensemble towards the objective, and results in unnecessarily diverse lattices. We found a default of γ = 1 2 generally produces good, diverse lattices, but γ can also be optimized as a hyperparameter. In order to select the subsets {sℓ}, we first choose the number of times each feature is going to be used in the ensemble. We make sure each feature is used at least once and then assign the rest of the feature counts proportional to the median of each feature’s torsion with other features. We initialize a random ensemble that satisfies the selected feature counts and then try to maximize the objective in (3) using a greedy swapping method: We loop over all pairs of lattices, and swap any features between them that increase H({sℓ}), until no swaps improve the objective. This optimization takes a small fraction of the total training time for the ensemble. One can potentially improve the objective by using a stochastic annealing procedure, but we find our deterministic method already yields good solutions in practice. 4 Calibrating the Features Accuracy can be increased by calibrating each feature with a one-dimensional monotonic piecewise linear function (PLF) before it is combined with other features [17, 18, 2]. These calibration functions can approximate log, sigmoidal, and other useful feature pre-processing transformations, and can be trained as part of the model. For an ensemble, we consider two options. Either a set of D calibrators shared across the base models (one PLF per feature), or L sets of calibrators, one set of S calibrators for each base model, for a total of LS calibrators. Use of separate calibrators provides more flexibility, but increases the potential for overfitting, increases evaluation time, and removes the ability to merge lattices. Let c(x[sℓ]; νℓ) : [0, 1]S →[0, 1]S denote the vector-valued calibration function on the feature subset sℓwith calibration parameters νℓ. The ensemble function will thus be: Separate Calibration: F(x) = α0 + L X ℓ=1 αℓf(c(x[sℓ]; νℓ); θℓ) (4) Shared Calibration: F(x) = α0 + L X ℓ=1 αℓf(c(x[sℓ]; ν[sℓ]); θℓ), (5) 4 where ν is the set of all shared calibration parameters and ν[sℓ] is the subset corresponding to the feature set sℓ. Note that Theorem 1 holds for shared calibrators, but does not hold for separate calibrators. We implement these PLF’s as in [2]. The PLF’s are monotonic if the adjacent parameters in each PLF are monotonic, which can be enforced with additional linear inequality constraints [2]. By composition, if the calibration functions for monotonic features are monotonic, and the lattices are monotonic with respect to those features, then the ensemble with positive weights on the lattices is monotonic. 5 Training the Lattice Ensemble The key question in training the ensemble is whether to train the base models independently, as is usually done in random forests, or to train the base models jointly, akin to generalized linear models. 5.1 Joint Training of the Lattices In this setting, we optimize (1) jointly over all calibration and lattice parameters, in which case each αℓis subsumed by the corresponding base model parameters θℓand can therefore be ignored. Joint training allows the base models to specialize, and increases the flexibility, but can slow down training and is more prone to overfitting for the same choice of S. 5.2 Parallelized, Independent Training of the Lattices We can train the lattices independently in parallel much faster, and then fit the weights αt in (1) in a second post-fitting stage as described in Step 5 below. Step 1: Initialize the calibration function parameters ν and each tiny lattice’s parameters θℓ. Step 2: Train the L lattices in parallel; for the ℓth lattice, solve the monotonic lattice regression problem [2]: arg min θℓ n X i=1 L(f(c(xi[sℓ]; νℓ); θℓ), yi) + λR(θℓ), such that Aθ ≤0, (6) where Aθ ≤0 captures the linear inequality constraints needed to enforce monotonicity for whichever features are required, L is a convex loss function, and R denotes a regularizer on the lattice parameters. Step 3: If separate calibrators are used as per (4) their parameters can be optimized jointly with the lattice parameters in (6). If shared calibrators are used, we hold all lattice parameters fixed and optimize the shared calibration parameters ν: arg min ν n X i=1 L(F(xi ; θ, ν, α), yi), such that Bν ≤0. F is as defined in (5), and Bν ≤0 specifies the linear inequality constraints needed to enforce monotonicity of each of the piecewise linear calibration functions. Step 4: Loop on Steps 2 and 3 until convergence. Step 5: Post-fit the weights α ∈RL over the ensemble: arg min α n X i=1 L(F(xi ; θ, ν, α), yi) + γ ˜R(α), such that αℓ≥0 for all ℓ, (7) where ˜R(α) is a regularizer on α. For example, regularizing α with the ℓ1 norm encourages a sparser ensemble, which can be useful for improving evaluation speed. Regularizing α with a ridge regularizer makes the postfit more similar to averaging the base models, reducing variance. 6 Fast Evaluation The proposed lattice ensembles are fast to evaluate. The evaluation complexity of simplex interpolation of a lattice ensemble with L lattices each of size S is O(LS log S), but in practice one encounters 5 Table 2: Details for the datasets used in the experiments. Dataset Problem Features Monotonic Train Validation Test 1 Test 2 1 Classification 12 4 29 307 9769 9769 2 Regression 12 10 115 977 31 980 3 Classification 54 9 500 000 100 000 200 000 4 Classification 29 21 88 715 11 071 11 150 65 372 fixed costs, and caching efficiency that depends on the model size. For example, for Experiment 3 with D = 50 features, with C++ implementations of both Crystals and random forests both evaluating the base models sequentially, the random forests takes roughly 10× as long to evaluate, and takes roughly 10× as much memory as the Crystals. See Appendix C.5 for further discussions and more timing results. Evaluating calibration functions can add notably to the overall evaluation time. If evaluating the average calibration function takes time c, with shared calibrators the eval time is O(cD + LS log S) because the D calibrators can be evaluated just once, but with separate calibrators, the eval time is generally worse at O(LS(c + log S)). For practical problems, evaluating separate calibrators may be one-third of the total evaluation time, even when implemented with an efficient binary search. However, if evaluation can be efficiently parallelized with multi-threading, then there is little difference in evaluation time between shared and separate calibrators. If shared (or no) calibrators are used, merging the ensemble’s lattices into fewer larger lattices (see Sec. 2.2) can greatly reduce evaluation time. For example, for a problem D = 14 features, we found the accuracy was best if we trained an ensemble of 300 lattices with S = 9 features each. The resulting ensemble had 300×29 = 153 600 parameters. We then merged all 300 lattices into one equivalent 214 lattice with only 16 384 parameters, which reduced both the memory and the evaluation time by a factor of 10. 7 Experiments We demonstrate the proposals on four datasets. Dataset 1 is the ADULT dataset from the UCI Machine Learning Repository [19], and the other datasets are provided by product groups from Google, with monotonicity constraints for certain features given by the corresponding product group. See Table 2 for details. To efficiently handle the large number of linear inequality constraints (∼100 000 constraints for some of these problems) when training a lattice or ensemble of lattices, we used LightTouch [20]. We compared to random forests (RF) [9], an ensemble method that consistently performs well for datasets this size [10]. However, RF makes no attempt to respect the monotonicity constraints, nor is it easy to check if an RF is monotonic. We used a C++ package implementation for RF. All the hyper parameters were optimized on validation sets. Please see the supplemental for further experimental details. 7.1 Experiment 1 - Monotonicity as a Regularizer In the first experiment, we compare the accuracy of different models in predicting whether income is greater than $50k for the ADULT dataset (Dataset 1). We compare four models on this dataset: (I) random forest (RF), (II) single unconstrained lattice, (III) single lattice constrained to be monotonic in 4 features, (IV) an ensemble of 50 lattices with 5 features in each lattice and separate calibrators for each lattice, jointly trained. For the constrained models, we set the function to be monotonically increasing in capital-gain, weekly hours of work and education level, and the gender wage gap [21]. Results over 5 runs of each algorithm is shown in Table 3 demonstrate how monotonicity can act as a regularizer to improve the testing accuracy: the monotonic models have lower training accuracy, but higher test accuracy. The ensemble of lattices also improves accuracy over the single lattice, we hypothesize because the small lattices provide useful regularization, while the separate calibrators and ensemble provide helpful flexibility. See the appendix for a more detailed analysis of the results. 6 Table 3: Accuracy of different models on the ADULT dataset from UCI. Training Testing Accuracy Accuracy Random Forest 90.56 ± 0.03 85.21 ± 0.01 Unconstrained Lattice 86.34 ± 0.00 84.96 ± 0.00 Monotonic Lattice 86.29 ± 0.02 85.36 ± 0.03 Monotonic Crystals 86.25 ± 0.02 85.53 ± 0.04 7.2 Experiment 2 - Crystals vs. Random Search for Feature Subsets Selection The second experiment on Dataset 2 is a regression to score the quality of a candidate for a matching problem on a scale of [0, 4]. The training set consists of 115 977 past examples, and the testing set consists of 31 980 more recent examples (thus the samples are not IID). There are D = 12 features, of which 10 are constrained to be monotonic on all the models compared for this experiment. We use this problem with its small number of features to illustrate the effect of the feature subset choice, comparing to RTLs optimized over K = 10 000 different trained ensembles, each with different random feature subsets. All ensembles were restricted to S = 2 features per base model, so there were only 66 distinct feature subsets possible, and thus for a L = 8 lattice ensemble, there were 66 8 ≃5.7×109 possible feature subsets. Ten-fold cross-validation was used to select an RTL out of 1, 10, 100, 1000, or 10 000 RTLs whose feature subsets were randomized with different random seeds. We compared to a calibrated linear model and a calibrated single lattice on all D = 12 features. See the supplemental for further experimental details. Figure 2 shows the normalized mean squared error (MSE divided by label variance, which is 0 for the oracle model, and 1 for the best constant model). Results show that Crystals (orange line) is substantially better than a random draw of the feature subsets (light blue line), and for mid-sized ensembles (e.g. L = 32 lattices), Crystals can provide very large computational savings (1000×) over the RTL strategy of randomly considering different feature subsets. 7.3 Experiment 3 - Larger-Scale Classification: Crystals vs. Random Forest The third experiment on Dataset 3 is to classify whether a candidate result is a good match to a user. There are D = 54 features, of which 9 were constrained to be monotonic. We split 800k labelled samples based on time, using the 500k oldest samples for a training set, the next 100k samples for a validation set, and the most recent 200k samples for a testing set (so the three datasets are not IID). Results over 5 runs of each algorithm in Figure 3 show that Crystals ensemble is about 0.25% 0.30% more accurate on the testing set over a broad range of ensemble sizes. The best RF on the validation set used 350 trees with a leaf size of 1 and the best Crystals model used 350 lattices with 6 features per lattice. Because the RF hyperparameter validation chose to use a minimum leaf size of 1, 8 16 32 64 128 0.71 0.72 0.73 0.74 0.75 0.76 0.77 Number of 2D Lattices Mean Squared Error / Variance Linear Full lattice Crystals RTL × 1 RTL × 10 RTL × 100 RTL × 1,000 RTL × 10,000 . Figure 2: Comparison of normalized mean squared test error on Dataset 2. Average standard error is less than 10−4. 0 50 100 150 200 250 300 350 400 94.95 95 95.05 95.1 95.15 95.2 95.25 95.3 95.35 95.4 Number of Base Models Average Test Accuracy Crystals Random Forests Figure 3: Test accuracy on Dataset 3 over the number of base models (trees or lattices). Error bars are standard errors. 7 Table 4: Results on Dataset 4. Test Set 1 has the same distribution as the training set. Test Set 2 is a more realistic test of the task. Left: Crystals vs. random forests. Right: Comparison of different optimization algorithms. Test Set 1 Test Set 2 Accuracy Accuracy Random Forest 75.23 ± 0.06 90.51 ± 0.01 Crystals 75.18 ± 0.05 91.15 ± 0.05 Lattices Calibrators Test Set 1 Training Per Lattice Accuracy Joint Separate 74.78 ± 0.04 Independent Separate 72.80 ± 0.04 Joint Shared 74.48 ± 0.04 the size of the RF model for this dataset scaled linearly with the dataset size, to about 1GB. The large model size severely affects memory caching, and combined with the deep trees in the RF ensemble, makes both training and evaluation an order of magnitude slower than for Crystals. 7.4 Experiment 4 - Comparison of Optimization Algorithms The fourth experiment on Dataset 4 is to classify whether a specific visual element should be shown on a webpage. There are D = 29 features, of which 21 were constrained to be monotonic. The Train Set, Validation Set, and Test Set 1 were randomly split from one set of examples, whose sampling distribution was skewed to sample mostly difficult examples. In contrast, Test Set 2 was uniformly randomly sampled, with samples from a larger set of countries, making it a more accurate measure of the expected accuracy in practice. After optimizing the hyperparameters on the validation set, we independently trained 10 RF and 10 Crystal models, and report the mean test accuracy and standard error on the two test sets in Table 4. On Test Set 1, which was split off from the same set of difficult examples as the Train Set and Validation Set, the random forests and Crystals perform statistically similar. On Test Set 2, which is six times larger and was sampled uniformly and from a broader set of countries, the Crystals are statistically significantly better. We believe this demonstrates that the imposed monotonicity constraints effectively act as regularizers and help the lattice ensemble generalize better to parts of the feature space that were sparser in the training data. In a second experiment with Dataset 4, we used RTLs to illustrate the effects of shared vs. separate calibrators, and training the lattices jointly vs. independently. We first constructed an RTL model with 500 lattices of 5 features each and a separate set of calibrators for each lattice, and trained the lattices jointly as a single model. We then separately modified this model in two different ways: (1) training the lattices independently of each other and then learning an optimal linear combination of their predictions, and (2) using a single, shared set of calibrators for all lattices. All models were trained using logistic loss, mini-batch size of 100, and 200 loops. For each model, we chose the optimization algorithms’ step sizes by finding the power of 2 that maximized accuracy on the validation set. Table 4 (right) shows that joint training and separate calibrators for the different lattices can provide a notable and statistically significantly increase in accuracy, due to the greater flexibility. 8 Conclusions The use of machine learning has become increasingly popular in practice. That has come with a greater demand for machine learning that matches the intuitions of domain experts. Complex models, even when highly accurate, may not be accepted by users who worry the model may not generalize well to new samples. Monotonicity guarantees can provide an important sense of control and understanding on learned functions. In this paper, we showed how ensembles can be used to learn the largest and most complicated monotonic functions to date. We proposed a measure of pairwise feature interactions that can identify good feature subsets in a fraction of the computation needed for random feature selection. On real-world problems, we showed these monotonic ensembles provide similar or better accuracy, and faster evaluation time compared to random forests, which do not provide monotonicity guarantees. 8 References [1] Y. S. Abu-Mostafa. A method for learning from hints. In Advances in Neural Information Processing Systems, pages 73–80, 1993. [2] M. R. Gupta, A. Cotter, J. Pfeifer, K. Voevodski, K. Canini, A. Mangylov, W. Moczydlowski, and A. Van Esbroeck. Monotonic calibrated interpolated look-up tables. Journal of Machine Learning Research, 17(109):1–47, 2016. [3] C. Dugas, Y. Bengio, F. Bélisle, C. Nadeau, and R. Garcia. Incorporating functional knowledge in neural networks. Journal Machine Learning Research, 2009. [4] J. Spouge, H. Wan, and W. J. Wilbur. Least squares isotonic regression in two dimensions. Journal of Optimization Theory and Applications, 117(3):585–605, 2003. [5] Y.-J. Qu and B.-G. Hu. Generalized constraint neural network regression model subject to linear priors. IEEE Trans. on Neural Networks, 22(11):2447–2459, 2011. [6] H. Daniels and M. Velikova. Monotone and partially monotone neural networks. IEEE Trans. Neural Networks, 21(6):906–917, 2010. [7] W. Kotlowski and R. Slowinski. Rule learning with monotonicity constraints. In Proceedings of the 26th Annual International Conference on Machine Learning, pages 537–544. ACM, 2009. [8] E. K. Garcia and M. R. Gupta. Lattice regression. In Advances in Neural Information Processing Systems (NIPS), 2009. [9] L. Breiman. Random forests. Machine Learning, 45(1):5–32, 2001. [10] M. Fernandez-Delgado, E. Cernadas, S. Barro, and D. Amorim. Do we need hundreds of classifiers to solve real world classification problems? Journal Machine Learning Research, 2014. [11] E. K. Garcia, R. Arora, and M. R. Gupta. Optimized regression for efficient function evaluation. IEEE Trans. Image Processing, 21(9):4128–4140, Sept. 2012. [12] T. Ho. Random subspace method for constructing decision forests. IEEE Trans. on Pattern Analysis and Machine Intelligence, 20(8):832–844, 1998. [13] D. Amaratunga, J. Cabrera, and Y. S. Lee. Enriched random forests. Bioinformatics, 24(18), 2008. [14] Y. Ye, Q. Wu, J. Z. Huang, M. K. Ng, and X. Li. Stratified sampling for feature subspace selection in random forests for high-dimensional data. Pattern Recognition, 2013. [15] L. Zhang and P. N. Suganthan. Random forests with ensemble of feature spaces. Pattern Recognition, 2014. [16] H. Xu, G. Chen, D. Povey, and S. Khudanpur. Modeling phonetic context with non-random forests for speech recognition. Proc. Interspeech, 2015. [17] G. Sharma and R. Bala. Digital Color Imaging Handbook. CRC Press, New York, 2002. [18] A. Howard and T. Jebara. Learning monotonic transformations for classification. In Advances in Neural Information Processing Systems, 2007. [19] C. Blake and C. J. Merz. UCI repository of machine learning databases, 1998. [20] A. Cotter, M. R. Gupta, and J. Pfeifer. A Light Touch for heavily constrained SGD. In 29th Annual Conference on Learning Theory, pages 729–771, 2016. [21] D. Weichselbaumer and R. Winter-Ebmer. A meta-analysis of the international gender wage gap. Journal of Economic Surveys, 19(3):479–511, 2005. 9 | 2016 | 462 |
6,397 | A scaled Bregman theorem with applications Richard Nock†,‡,§ Aditya Krishna Menon†,‡ Cheng Soon Ong†,‡ †Data61, ‡the Australian National University and §the University of Sydney {richard.nock, aditya.menon, chengsoon.ong}@data61.csiro.au Abstract Bregman divergences play a central role in the design and analysis of a range of machine learning algorithms through a handful of popular theorems. We present a new theorem which shows that “Bregman distortions” (employing a potentially non-convex generator) may be exactly re-written as a scaled Bregman divergence computed over transformed data. This property can be viewed from the standpoints of geometry (a scaled isometry with adaptive metrics) or convex optimization (relating generalized perspective transforms). Admissible distortions include geodesic distances on curved manifolds and projections or gauge-normalisation. Our theorem allows one to leverage to the wealth and convenience of Bregman divergences when analysing algorithms relying on the aforementioned Bregman distortions. We illustrate this with three novel applications of our theorem: a reduction from multi-class density ratio to class-probability estimation, a new adaptive projection free yet norm-enforcing dual norm mirror descent algorithm, and a reduction from clustering on flat manifolds to clustering on curved manifolds. Experiments on each of these domains validate the analyses and suggest that the scaled Bregman theorem might be a worthy addition to the popular handful of Bregman divergence properties that have been pervasive in machine learning. 1 Introduction: Bregman divergences as a reduction tool Bregman divergences play a central role in the design and analysis of a range of machine learning (ML) algorithms. In recent years, Bregman divergences have arisen in procedures for convex optimisation [4], online learning [9, Chapter 11] clustering [3], matrix approximation [13], classprobability estimation [7, 26, 29, 28], density ratio estimation [35], boosting [10], variational inference [18], and computational geometry [5]. Despite these being very different applications, many of these algorithms and their analyses basically rely on three beautiful analytic properties of Bregman divergences, properties that we summarize for differentiable scalar convex functions ϕ with derivative ϕ′, conjugate ϕ⋆, and divergence Dϕ: • the triangle equality: Dϕ(x∥y) + Dϕ(y∥z) −Dϕ(x∥z) = (ϕ′(z) −ϕ′(y))(x −y); • the dual symmetry property: Dϕ(x∥y) = Dϕ⋆(ϕ′(y)∥ϕ′(x)); • the right-centroid (population minimizer) is the average: arg minµ E[Dϕ(X∥µ)] = E[X]. Casting a problem as a Bregman minimisation allows one to employ these properties to simplify analysis; for example, by interpreting mirror descent as applying a particular Bregman regulariser, Beck and Teboulle [4] relied on the triangle equality above to simplify its proof of convergence. Another intriguing possibility is that one may derive reductions amongst learning problems by connecting their underlying Bregman minimisations. Menon and Ong [24] recently established how (binary) density ratio estimation (DRE) can be exactly reduced to class-probability estimation (CPE). This was facilitated by interpreting CPE as a Bregman minimisation [7, Section 19], and a new property of Bregman divergences — Menon and Ong [24, Lemma 2] showed that for any twice 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. Problem A Problem B that Theorem 1 reduces A to Reference Multiclass density-ratio estimation Multiclass class-probability estimation §3, Lemma 2 Online optimisation on Lq ball Convex unconstrained online learning §4, Lemma 4 Clustering on curved manifolds Clustering on flat manifolds §5, Lemma 5 Table 1: Applications of our scaled Bregman Theorem (Theorem 1) — “Reduction” encompasses shortcuts on algorithms and on analyses (algorithm/proof A uses algorithm/proof B as subroutine). differentiable scalar convex ϕ, for g(x) = 1 + x and ˇϕ(x) .= g(x) · ϕ(x/g(x)), g(x) · Dϕ(x/g(x)∥y/g(y)) = D ˇϕ(x∥y) , ∀x, y. (1) Since the binary class-probability function η(x) = Pr(Y = 1|X = x) is related to the classconditional density ratio r(x) = Pr(X = x|Y = 1)/ Pr(X = x|Y = −1) via Bayes’ rule as η(x) = r(x)/g(r(x)) ([24] assume Pr(Y = 1) = 1/2), any ˆη with small Dϕ(η∥ˆη) implicitly produces an ˆr with low D ˇϕ(r∥ˆr) i.e. a good estimate of the density ratio. The Bregman property of eq. (1) thus establishes a reduction from DRE to CPE. Two questions arise from this analysis: can we generalise eq. (1) to other g(·), and if so, can we similarly relate other problems to each other? This paper presents a new Bregman identity (Theorem 1), the scaled Bregman theorem, a significant generalisation of Menon and Ong [24, Lemma 2]. It shows that general distortions D ˇϕ – which are not necessarily convex, positive, bounded or symmetric – may be re-expressed as a Bregman divergence Dϕ computed over transformed data, and thus inherit their good properties despite appearing prima facie to be a very different object. This transformation can be as simple as a projection or normalisation by a gauge, or more involved like the exponential map on lifted coordinates for a curved manifold. Our theorem can be summarized in two ways. The first is geometric as it specializes to a scaled isometry involving adaptive metrics. The second calls to a fundamental object of convex analysis, generalized perspective transforms [11, 22, 23]. Indeed, our theorem states when "the perspective of a Bregman divergence equals the distortion of a perspective", for a perspective ( ˇϕ in eq. 1) which is analytically a generalized perspective transform but does not rely on the same convexity and sign requirements as in Maréchal [22, 23]. We note that the perspective of a Bregman divergence (the left-hand side of eq. 1) is a special case of conformal divergence [27], yet to our knowledge it has never been formally defined. As with the aforementioned key properties of Bregman divergences, Theorem 1 has potentially wide implications for ML. We give three such novel applications to vastly different problems (see Table 1): • a reduction of multiple density ratio estimation to multiclass-probability estimation (§3), generalising the results of [24] for the binary label case, • a projection-free yet norm-enforcing mirror gradient algorithm (enforced norms are those of mirrored vectors and of the offset) with guarantees for adaptive filtering (§4), and • a seeding approach for clustering on positively or negatively (constant) curved manifolds based on a popular seeding for flat manifolds and with the same approximation guarantees (§5). Experiments on each of these domains (§6) validate our analysis. The Supplementary Material (SM) details the proofs of all results, provides the experimental results in extenso and some additional (nascent) applications to exponential families and computational information geometry. 2 Main result: the scaled Bregman theorem In the remaining, [k] .= {0, 1, ..., k} and [k]∗ .= {1, 2, ..., k} for k ∈N. For any differentiable (but not necessarily convex) ϕ : X →R, we define the Bregman distortion Dϕ as Dϕ(x∥y) .= ϕ(x) −ϕ(y) −(x −y)⊤∇ϕ(y) . (2) If ϕ is convex, Dϕ is the familiar Bregman divergence with generator ϕ. Without further ado, we present our main result. Theorem 1 Let, ϕ : X →R be convex differentiable, and g : X →R∗be differentiable. Then, g(x) · Dϕ (1/g(x)) · x
(1/g(y)) · y = D ˇϕ x
y , ∀x, y ∈X , (3) where ˇϕ(x) .= g(x) · ϕ ((1/g(x)) · x) , (4) 2 X Dϕ (x∥y) D ˇϕ (x∥y) g(x) Rd 1 2 · ∥x −y∥2 2 ∥x∥2 · (1 −cos ∠x, y) ∥x∥2 Rd 1 2 · (∥x∥2 q −∥y∥2 q) −P i (xi−yi)·sign(yi)·|yi|q−1 ∥y∥q−2 q W · ∥x∥q −W · P i xi·sign(yi)·|yi|q−1 ∥y∥q−1 q ∥x∥q/W Rd × R 1 2 · ∥xS −yS∥2 2 ∥x∥2 sin ∥x∥2 · (1 −cos DG(x, y)) ∥x∥2/ sin ∥x∥2 Rd × C 1 2 · ∥xH −yH∥2 2 − ∥x∥2 sinh ∥x∥2 · (cosh DG(x, y) −1) −∥x∥2/ sinh ∥x∥2 Rd + P i xi log xi yi −1⊤(x −y) P i xi log xi yi −d · E[X] · log E[X] E[Y] 1⊤x Rd + P i xi yi −P i log xi yi −d P i xi(Q j yj)1/d yi −d(Q j xj)1/d Q i x1/d i S(d) tr (X log X −X log Y) −tr (X) + tr (Y) tr (X log X −X log Y) −tr (X) · log tr(X) tr(Y) tr (X) S(d) tr XY−1 −log det(XY−1) −d det(Y1/d)tr XY−1 −d · det(X1/d) det(X1/d) Table 2: Examples of (Dϕ, D ˇϕ, g) for which eq. (3) holds. Function xS .= f(x) : Rd →Rd+1 and xH .= f(x) : Rd →Rd × C are the Sphere and Hyperbolic lifting maps defined in SM, eqs. 51, 62. W > 0 is a constant. DG denotes the Geodesic distance on the sphere (for xS) or the hyperboloid (for xH). S(d) is the set of symmetric real matrices. Related proofs are in SM, Section III. if and only if (i) g is affine on X, or (ii) for every z ∈Xg .= {(1/g(x)) · x : x ∈X}, ϕ (z) = z⊤∇ϕ(z) . (5) Table 2 presents some examples of (sometimes involved) triplets (Dϕ, D ˇϕ, g) for which eq. (3) holds; related proofs are in Appendix III. Depending on ϕ and g, there are at least two ways to summarize Theorem 1. One is geometric: Theorem 1 sometimes states a scaled isometry between X and Xg. The other one comes from convex optimisation: Theorem 1 defines generalized perspective transforms on Bregman divergences and roughly states the identity between the perspective transform of a Bregman divergence and the Bregman distortion of the perspective transform. Appendix VIII gives more details for both properties. We refer to Theorem 1 as the scaled Bregman theorem. Remark. If Xg is a vector space, ϕ satisfies eq. (5) if and only if it is positive homogeneous of degree 1 on Xg (i.e. ϕ(αz) = α · ϕ(z) for any α > 0) from Euler’s homogenous function theorem. When Xg is not a vector space, this only holds for α such that αz ∈Xg as well. We thus call the gradient condition of eq. (5) “restricted positive homogeneity” for simplicity. Remark. Appendix IV gives a “deep composition” extension of Theorem 1. For the special case where X = R, and g(x) = 1 + x, Theorem 1 is exactly [24, Lemma 2] (c.f. eq. 1). We wish to highlight a few points with regard to our more general result. First, the “distortion” generator ˇϕ may be1 non-convex, as the following illustrates. Example. Suppose ϕ(x) = (1/2)∥x∥2 2, the generator for squared Euclidean distance. Then, for g(x) = 1 + 1⊤x, we have ˇϕ(x) = (1/2) · ∥x∥2 2/(1 + 1⊤x), which is non-convex on X = Rd. When ˇϕ is non-convex, the right hand side in eq. (3) is an object that ostensibly bears only a superficial similarity to a Bregman divergence; it is somewhat remarkable that Theorem 1 shows this general “distortion” between a pair (x, y) to be entirely equivalent to a (scaling of a) Bregman divergence between some transformation of the points. Second, when g is linear, eq. (3) holds for any convex ϕ (This was the case considered in [24]). When g is non-linear, however, ϕ must be chosen carefully so that (ϕ, g) satisfies the restricted homogeneity conditon2 of eq. (5). In general, given a convex ϕ, one can “reverse engineer” a suitable g, as illustrated by the following example. Example. Suppose3 ϕ(x) = (1 + ∥x∥2 2)/2. Then, eq. (5) requires that ∥x∥2 2 = 1 for every x ∈Xg, i.e. Xg is (a subset of) the unit sphere. This is afforded by the choice g(x) = ∥x∥2. Third, Theorem 1 is not merely a mathematical curiosity: we now show that it facilitates novel results in three very different domains, namely estimating multiclass density ratios, constrained online optimisation, and clustering data on a manifold with non-zero curvature. We discuss nascent applications to exponential families and computational geometry in Appendices V and VI. 1Evidently, ˇϕ is convex iff g is non-negative, by eq. (3) and the fact that a function is convex iff its Bregman “distortion” is nonnegative [6, Section 3.1.3]. 2We stress that this condition only needs to hold on Xg ⊆X; it would not be really interesting in general for ϕ to be homogeneous everywhere in its domain, since we would basically have ˇϕ = ϕ. 3The constant 1/2 added in ϕ does not change Dϕ, since a Bregman divergence is invariant to affine terms; removing this however would make the divergences Dϕ and D ˇ ϕ differ by a constant. 3 3 Multiclass density-ratio estimation via class-probability estimation Given samples from a number of densities, density ratio estimation concerns estimating the ratio between each density and some reference density. This has applications in the covariate shift problem wherein the train and test distributions over instances differ [33]. Our first application of Theorem 1 is to show how density ratio estimation can be reduced to class-probability estimation [7, 29]. To proceed, we fix notation. For some integer C ≥1, consider a distribution P(X, Y) over an (instance, label) space X × [C]. Let ({Pc}C c=1, π) be densities giving P(X|Y = c) and P(Y = c) respectively, and M giving P(X) accordingly. Fix c∗∈[C] a reference class, and suppose for simplicity that c∗= C. Let ˜π ∈△C−1 such that ˜πc .= πc/(1 −πC). Density ratio estimation [35] concerns inferring the vector r(x) ∈RC−1 of density ratios relative to C, with rc(x) .= P(X = x|Y = c)/P(X = x|Y = C) , while class-probability estimation [7] concerns inferring the vector η(x) ∈RC−1 of class-probabilities, with ηc(x) .= P(Y = c|X = x)/˜πc . In both cases, we estimate the respective quantities given an iid sample S ∼P(X, Y)m (m is the training sample size). The genesis of the reduction from density ratio to class-probability estimation is the fact that r(x) = (πC/(1 −πC)) · η(x)/ηC(x). In practice one will only have an estimate ˆη, typically derived by minimising a suitable loss on the given S [37], with a canonical example being multiclass logistic regression. Given ˆη, it is natural to estimate the density ratio via: ˆr(x) = ˆη(x)/ˆηC(x) . (6) While this estimate is intuitive, to establish a formal reduction we must relate the quality of ˆr to that of ˆη. Since the minimisation of a suitable loss for class-probability estimation is equivalent to a Bregman minimisation [7, Section 19], [37, Proposition 7], this is however immediate by Theorem 1: Lemma 2 Given a class-probability estimator ˆη: X →[0, 1]C−1, let the density ratio estimator ˆr be as per Equation 6. Then for any convex differentiable ϕ: [0, 1]C−1 →R, EX∼M[Dϕ(η(X)∥ˆη(X))] = (1 −πC) · EX∼PC Dϕ†(r(X)∥ˆr(X)) (7) where ϕ† is as per Equation 4 with g(x) .= πC/(1 −πC) + ˜π⊤x . Lemma 2 generalises [24, Proposition 3], which focussed on the binary case with π = 1/2 (See Appendix VII for a review of that result). Unpacking the Lemma, the LHS in Equation 7 represents the object minimised by some suitable loss for class-probability estimation. Since g is affine, we can use any convex, differentiable ϕ, and so can use any suitable class-probability loss to estimate ˆη. Lemma 2 thus implies that producing ˆη by minimising any class-probability loss equivalently produces an ˆr as per Equation 6 that minimises a Bregman divergence to the true r. Thus, Theorem 1 provides a reduction from density ratio to multiclass probability estimation. We now detail two applications where g(·) is no longer affine, and ϕ must be chosen more carefully. 4 Dual norm mirror descent: projection-free online learning on Lp balls A substantial amount of work in the intersection of ML and convex optimisation has focused on constrained optimisation within a ball [32, 14]. This optimisation is typically via projection operators that can be expensive to compute [17, 19]. We now show that gauge functions can be used as an inexpensive alternative, and that Theorem 1 easily yields guarantees for this procedure in online learning. We consider the adaptive filtering problem, closely related to the online least squares problem with linear predictors [9, Chapter 11]. Here, over a sequence of T rounds, we observe some xt ∈X. We must then predict a target value ˆyt = w⊤ t−1xt using our current weight vector wt−1. The true target yt = u⊤xt +ϵt is then revealed, where ϵt is some unknown noise, and we may update our weight to wt. Our goal is to minimise the regret of the sequence {wt}T t=0, R(w1:T |u) .= T X t=1 u⊤xt −w⊤ t−1xt 2 − T X t=1 u⊤xt −yt 2 . (8) Let q ∈(1, 2] and p be such that 1/p + 1/q = 1. For ϕ .= (1/2) · ∥x∥2 q and loss ℓt(w) = (1/2) · (yt −w⊤xt)2, the p-LMS algorithm [20] employs the stochastic mirror gradient updates: wt .= argmin w ηt · ℓt(w) + Dϕ(w∥wt−1) = (∇ϕ)−1 (∇ϕ(wt−1) −ηt · ∇ℓt) , (9) 4 where ηt is a learning rate to be specified by the user. [20, Theorem 2] shows that for appropriate ηt, one has R(w1:T |u) ≤(p −1) · maxx∈X ∥x∥2 p · ∥u∥2 q. The p-LMS updates do not provide any explicit control on ∥wt∥, i.e. there is no regularisation. Experiments (Section §6) suggest that leaving ∥wt∥uncontrolled may not be a good idea as the increase of the norm sometimes prevents (significant) updates (eq. (9)). Also, the wide success of regularisation in ML calls for regularised variants that retain the regret guarantees and computational efficiency of p-LMS. (Adding a projection step to eq. (9) would not achieve both.) We now do just this. For fixed W > 0, let ϕ .= (1/2) · (W 2 + ∥x∥2 q), a translation of that used in p-LMS. Invoking Theorem 1 with the admissible gq(x) = ||x||q/W yields ˇϕ .= ˇϕq = W∥x∥q (see Table 2). Using the fact that Lp and Lq norms are dual of each other, we replace eq. (9) by: wt .= ∇ˇϕp (∇ˇϕq(wt−1) −ηt · ∇ℓt) . (10) See Lemma A of the Appendix for the simple forms of ∇ˇϕ{p,q}. We call update (10) the dual norm p-LMS (DN-p-LMS) algorithm, noting that the dual refers to the polar transform of the norm, and g stems from a gauge normalization for Bq(W), the closed Lq ball with radius W > 0. Namely, we have γGAU(x) = W/∥x∥q = g(x)−1 for the gauge γGAU(x) .= sup{z ≥0 : z · x ∈Bq(W)}, so that ˇϕq implicitly performs gauge normalisation of the data. This update is no more computationally expensive than eq. (9) — we simply need to compute the p- and q-norms of appropriate terms — but, crucially, automatically constrains the norms of wt and its image by ∇ˇϕq. Lemma 3 For the update in eq. (10), ∥wt∥q = ∥∇ˇϕq(wt)∥p = W, ∀t > 0. Lemma 3 is remarkable, since nowhere in eq. (10) do we project onto the Lq ball. Nonetheless, for the DN-p-LMS updates to be principled, we need a similar regret guarantee to the original p-LMS. Fortunately, this may be done using Theorem 1 to exploit the original proof of [20]. For any u ∈Rd, define the q-normalised regret of {wt}T t=0 by Rq(w1:T |u) .= T X t=1 (1/gq(u)) · u⊤xt −w⊤ t−1xt 2 − T X t=1 (1/gq(u)) · u⊤xt −yt 2 .(11) We have the following bound on Rq for the DN-p-LMS updates (We cannot expect a bound on the unnormalised R(·) of eq. (8), since by Lemma 3 we can only compete against norm W vectors). Lemma 4 Pick any u ∈Rd, p, q satisfying 1/p + 1/q = 1 and p > 2, and W > 0. Suppose ∥xt∥p ≤Xp and |yt| ≤Y, ∀t ≤T. Let {wt} be as per eq. (10), using learning rate ηt .= γt · W 4(p −1) max{W, Xp}XpW + |yt −w⊤ t−1xt|Xp , (12) for any desired γt ∈[1/2, 1]. Then, Rq(w1:T |u) ≤ 4(p −1)X2 pW 2 + (16p −8) max{W, Xp}X2 pW + 8Y X2 p . (13) Several remarks can be made. First, the bound depends on the maximal signal value Y , but this is the maximal signal in the observed sequence, so it may not be very large in practice; if it is comparable to W, then our bound is looser than [20] by just a constant factor. Second, the learning rate is adaptive in the sense that its choice depends on the last mistake made. There is a nice way to represent the “offset” vector ηt · ∇ℓt in eq. (10), since we have, for Q′′ .= 4(p −1) max{W, Xp}XpW, ηt · ∇ℓt = W · |yt −w⊤ t−1xt|Xp Q′′ + |yt −w⊤ t−1xt|Xp · sign(yt −w⊤ t−1xt) · 1 Xp · x , (14) so the Lp norm of the offset is actually equal to W · Q, where Q ∈[0, 1] is all the smaller as the vector w. gets better. Hence, the update in eq. (10) controls in fact all norms (that of w., its image by ∇ˇϕq and the offset). Third, because of the normalisation of u, the bound actually does not depend on u, but on the radius W chosen for the Lq ball. 5 Sphere Hyperboloid x Sd Lifting map Rd+1 Spherical k-means (in Sd) (in Rd+1) k-means(++) xS expq(x) TqSd q Sphere Sd c Rd y DG(y, c) Drec(y, c) (in Rd+1) k-means(++) xH Im(xd+1) Lifting map Figure 1: (L) Lifting map into Rd × R for clustering on the sphere with k-means++. (M) Drec in Eq. (15) in vertical thick red line. (R) Lifting map into Rd × C for the hyperboloid. 5 Clustering on a curved manifold via clustering on a flat manifold Our final application can be related to two problems that have received a steadily growing interest over the past decade in unsupervised ML: clustering on a non-linear manifold [12], and subspace custering [36]. We consider two fundamental manifolds investigated by [16] to compute centers of mass from relativistic theory: the sphere Sd and the hyperboloid Hd, the former being of positive curvature, and the latter of negative curvature. Applications involving these specific manifolds are numerous in text processing, computer vision, geometric modelling, computer graphics, to name a few [8, 12, 15, 21, 30, 34]. We emphasize the fact that the clustering problem has significant practical impact for d as small as 2 in computer vision [34]. The problem is non-trivial for two separate reasons. First, the ambient space, i.e. the space of registration of the input data, is often implicitly Euclidean and therefore not the manifold [12]: if the mapping to the manifold is not carefully done, then geodesic distances measured on the manifold may be inconsistent with respect to the ambient space. Second, the fact that the manifold has non-zero curvature essentially prevents the direct use of Euclidean optimization algorithms [38] — put simply, the average of two points that belong to a manifold does not necessarily belong to the manifold, so we have to be careful on how to compute centroids for hard clustering [16, 27, 30, 31]. What we show now is that Riemannian manifolds with constant sectional curvature may be clustered with the k-means++ seeding for flat manifolds [2], without even touching a line of the algorithm. To formalise the problem, we need three key components of Riemannian geometry: tangent planes, exponential map and geodesics [1]. We assume that the ambient space is a tangent plane to the manifold M, which conveniently makes it look Euclidean (see Figure 1). The point of tangency is called q, and the tangent plane TqM. The exponential map, expq : TqM →M, performs a distance preserving mapping: the geodesic length between q and expq(x) in M is the same as the Euclidean length between q and x in TqM. Our clustering objective is to find C .= {c1, c2, ...ck} ⊂M such that Drec(S : C) = infC′⊂M,|C′|=k Drec(S, C′), with Drec(S, C) .= P i∈[m]∗minj∈[k]∗Drec(expq(xi), cj) , (15) where Drec is a reconstruction loss, a function of the geodesic distance between expq(xi) and cj. We use two loss functions defined from [16] and used in ML for more than a decade [12]: R+ ∋Drec(y, c) .= 1 −cos DG(y, c) for M = Sd cosh DG(y, c) −1 for M = Hd . (16) Here, DG(y, c) is the corresponding geodesic distance of M between y and c. Figure 1 shows that Drec(y, c) is the orthogonal distance between TcM and y when M = Sd. The solution to the clustering problem in eq. (15) is therefore the one that minimizes the error between tangent planes defined at the centroids, and points on the manifold. It turns out that both distances in 16 can be engineered as Bregman divergences via Theorem 1, as seen in Table 2. Furthermore, they imply the same ϕ, which is just the generator of Mahalanobis distortion, but a different g. The construction involves a third party, a lifting map (lift(.)) that increases the dimension by one. The Sphere lifting map Rd ∋x 7→xS ∈Rd+1 is indicated in Table 3 (left). The new coordinate depends on the norm of x. The Hyperbolic lifting map, Rd ∋x 7→xH ∈Rd × C, involves a pure imaginary additional coordinate, is indicated in in Table 3 (right, with a slight abuse of notation) and Figure 1. Both xS and xH live on a d-dimensional manifold, depicted in Figure 1. 6 (Sphere) Sk-means++(S, k) (Hyperboloid) Hk-means++(S, k) Input: dataset S ⊂TqSd, k ∈N∗; Step 1: S+ ←{g−1 S (xS) · xS : xS ∈lift(S)}; Step 2: C+ ←k-means++_seeding(S+, k); Step 3: C ←exp−1 q (C+); Output: Cluster centers C ∈TqSd; Input: dataset S ⊂TqHd, k ∈N∗; Step 1: S+ ←{g−1 H (xH)·xH : xH ∈lift(S)}; Step 2: C+ ←k-means++_seeding(S+, k); Step 3: C ←exp−1 q (C+); Output: Cluster centers C ∈TqHd; xS .= [x1 x2 · · · xd ∥x∥2 cot ∥x∥2] xH .= [x1 x2 · · · xd i∥x∥2 coth ∥x∥2] gS(xS) .= ∥x∥2/ sin ∥x∥2 gH(xH) .= −∥x∥2/ sinh ∥x∥2 Table 3: How to use k-means++ to cluster points on the sphere (left) or the hyperboloid (right). (p, q) = (1.17, 6.9) (p, q) = (2.0, 2.0) (p, q) = (6.9, 1.17) (p, q) = (1.17, 6.9) (p, q) = (2.0, 2.0) (p, q) = (6.9, 1.17) -10 0 10 20 30 40 50 60 70 0 20000 40000 -25 -20 -15 -10 -5 0 5 0 20000 40000 -25 -20 -15 -10 -5 0 5 0 20000 40000 -8 -6 -4 -2 0 2 4 6 8 10 12 0 20000 40000 -30 -25 -20 -15 -10 -5 0 5 0 20000 40000 -16 -14 -12 -10 -8 -6 -4 -2 0 0 20000 40000 ρ = 1.0 ρ = 1.0 ρ = 1.0 ρ = 0.5 ρ = 1.3 ρ = 0.2 Table 4: Summary of the experiments displaying (y) the error of p-LMS minus error of DN-p-LMS (when > 0, DN-p-LMS beats p-LMS) as a function of t, in the setting of [20], for various values of (p, q) (columns). Left panel: (D)ense target; Right panel: (S)parse target. When they are scaled by the corresponding g.(.), they happen to be mapped to Sd or Hd, respectively, by what happens to be the manifold’s exponential map for the original x (see Appendix III). Theorem 1 is interesting in this case because ϕ corresponds to a Mahalanobis distortion: this shows that k-means++ seeding [2, 25] can be used directly on the scaled coordinates (g−1 {S,H}(x{S,H}) · x{S,H}) to pick centroids that yield an approximation of the global optimum for the clustering problem on the manifold which is just as good as the original Euclidean approximation bound [2]. Lemma 5 The expected potential of Sk-means++ seeding over the random choices of C+ satisfies: E[Drec(S : C)] ≤ 8(2 + log k) · inf C′∈Sd Drec(S : C′) . (17) The same approximation bounds holds for Hk-means++ seeding on the hyperboloid (C′, C+ ∈Hd). Lemma 5 is notable since it was only recently shown that such a bound is possible for the sphere [15], and to our knowledge, no such approximation quality is known for clustering on the hyperboloid [30, 31]. Notice that Lloyd iterations on non-linear manifolds would require repetitive renormalizations to keep centers on the manifold [12], an additional disadvantage compared to clustering on flat manifolds that {G, K}-means++ seedings do not bear. 6 Experimental validation We present some experiments validating our theoretical analysis for the applications above. Multiple density ratio estimation. See Appendix IX for experiments in this domain. Dual norm p-LMS (DN-p-LMS). We ran p-LMS and the DN-p-LMS of §4 on the experimental setting of [20]. We refer to that paper for an exhaustive description of the experimental setting, which we briefly summarize: it is a noisy signal processing setting, involving a dense or a sparse target. We compute, over the signal received, the error of our predictor on the signal. We keep all parameters as they are in [20], except for one: we make sure that data are scaled to fit in a Lp ball of prescribed radius, to test the assumption related in [20] that fixing the learning rate ηt is not straightforward in p-LMS. Knowing the true value of Xp, we then scale it by a misestimation factor ρ, typically in [0.1, 1.7]. We use the same misestimation in DN-p-LMS. Thus, both algorithms suffer the same source of uncertainty. Also, we periodically change the signal (each 1000 iterations), to assess the performances of the algorithms in tracking changes in the signal. Experiments, given in extenso in Appendix X, are sumarized in Table 4. The following trends emerge: in the mid to long run, DN-p-LMS is never beaten by p-LMS by more than a fraction of percent. On the other hand, DN-p-LM can beat p-LMS by very significant differences (exceeding 40%), in particular when p < 2, i.e. when we are outside the regime of the proof of [20]. This indicates that 7 -10 0 10 20 30 40 50 60 0 5 10 15 20 25 30 35 40 45 50 rel. improvement (%) k 0 10 20 30 40 50 60 70 80 90 100 0 5 10 15 20 25 30 35 40 45 50 rel. improvement (%) k Table 5: (L) Relative improvement (decrease) in k-means potential of SKM◦Sk-means++ compared to SKM alone. (R) Relative improvement of Sk-means++ over Forgy initialization on the sphere. 40 50 60 70 80 90 100 0 5 10 15 20 25 30 35 40 45 50 prop (%) DM beats GKM k 0 5 10 15 20 25 30 35 40 45 50 55 0 5 10 15 20 25 30 35 40 45 50 iteration# k 0 5 10 15 20 25 30 35 40 45 50 0 5 10 15 20 25 30 35 40 45 50 iteration# k Table 6: (L) % of the number of runs of SKM whose output (when it has converged) is better than Sk-means++. (C) Maximal # of iterations for SKM after which it beats Sk-means++ (ignoring runs of SKM that do not beat Sk-means++). (R) Average # of iterations for SKM to converge. significantly stronger and more general results than the one of Lemma 4 may be expected. Also, it seems that the problem of p-LMS lies in an “exploding” norm problem: in various cases, we observe that ∥wt∥(in any norm) blows up with t, and this correlates with a very significant degradation of its performances. Clearly, DN-p-LMS does not have this problem since all relevant norms are under tight control. Finally, even when the norm does not explode, DN-p-LMS can still beat p-LMS, by less important differences though. Of course, the output of p-LMS can repeatedly be normalised, but the normalisation would escape the theory of [20] and it is not clear which normalisation would be best. Clustering on the sphere. For k ∈[50]∗, we simulate on T0S2 a mixture of spherical Gaussian and uniform densities in random rectangles with 2k components. We run three algorithms: (i) SKM [12] on the data embedded on S2 with random (Forgy) initialization, (ii), Sk-means++ and (iii) SKM with Sk-means++ initialisation. Results are averaged over the algorithms’ runs. Table 5 (left) displays that using Sk-means++ as initialization for SKM brings a very significant gain over SKM alone, since we almost divide the k-means potential by a factor 2 on some runs. The right plot of Table 5 shows that S-k-means++ consistently reduces the k-means potential by at least a factor 2 over Forgy. The left plot in Table 6 displays that even when it has converged, SKM does not necessarily beat Sk-means++. Finally, the center+right plots in Table 6 display that even when it does beat Sk-means++ when it has converged, the iteration number after which SKM beats Sk-means++ increases with k, and in the worst case may exceed the average number of iterations needed for SKM to converge (we stopped SKM if relative improvement is not above 1o/oo). 7 Conclusion We presented a new scaled Bregman identity, and used it to derive novel results in several fields of machine learning: multiple density ratio estimation, adaptive filtering, and clustering on curved manifolds. We believe that, like other known key properties of Bregman divergences, there is potential for other applications of the result; Appendices V, VI present preliminary thoughts in this direction. 8 Acknowledgments The authors wish to thank Bob Williamson and the reviewers for insightful comments. References [1] S.-I. Amari and H. Nagaoka. Methods of Information Geometry. Oxford University Press, 2000. 8 [2] D. Arthur and S. Vassilvitskii. k-means++ : the advantages of careful seeding. In 19 th SODA, 2007. [3] A. Banerjee, S. Merugu, I. Dhillon, and J. Ghosh. Clustering with Bregman divergences. JMLR, 6:1705– 1749, 2005. [4] A. Beck and M. Teboulle. Mirror descent and nonlinear projected subgradient methods for convex optimization. Operations Research Letters, 31(3):167–175, 2003. [5] J.-D. Boissonnat, F. Nielsen, and R. Nock. Bregman Voronoi diagrams. DCG, 44(2):281–307, 2010. [6] S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge University Press, 2004. [7] A. Buja, W. Stuetzle, and Y. Shen. Loss functions for binary class probability estimation and classification: Structure and applications, 2005. Unpublished manuscript. [8] S.-R. Buss and J.-P. Fillmore. Spherical averages and applications to spherical splines and interpolation. ACM Transactions on Graphics, 20:95–126, 2001. [9] N. Cesa-Bianchi and G. Lugosi. Prediction, Learning and Games. Cambridge University Press, 2006. [10] M. Collins, R. Schapire, and Y. Singer. Logistic regression, AdaBoost and Bregman distances. MLJ, 2002. [11] B. Dacorogna and P. Maréchal. The role of perspective functions in convexity, polyconvexity, rank-one convexity and separate convexity. J. Convex Analysis, 15:271–284, 2008. [12] I. Dhillon and D.-S. Modha. Concept decompositions for large sparse text data using clustering. MLJ, 42:143–175, 2001. [13] I.-S. Dhillon and J.-A. Tropp. Matrix nearness problems with Bregman divergences. SIAM Journal on Matrix Analysis and Applications, 29(4):1120–1146, 2008. [14] J. Duchi, S. Shalev-Shwartz, Y. Singer, and T. Chandra. Efficient projections onto the ℓ1-ball for learning in high dimensions. In ICML ’08, pages 272–279, New York, NY, USA, 2008. ACM. [15] Y. Endo and S. Miyamoto. Spherical k-means++ clustering. In Proc. of the 12th MDAI, pages 103–114, 2015. [16] G.-A. Galperin. A concept of the mass center of a system of material points in the constant curvature spaces. Communications in Mathematical Physics, 154:63–84, 1993. [17] E. Hazan and S. Kale. Projection-free online learning. In John Langford and Joelle Pineau, editors, ICML ’12, pages 521–528, New York, NY, USA, 2012. ACM. [18] M. Hernández-Lobato, Y. Li, M. Rowland, D. Hernández-Lobato, T. Bui, and R.-E. Turner. Black-box alpha-divergence minimization. In 33rd ICML, 2016. [19] M. Jaggi. Revisiting Frank-Wolfe: Projection-free sparse convex optimization. In 30th ICML, 2013. [20] J. Kivinen, M. Warmuth, and B. Hassibi. The p-norm generalization of the LMS algorithm for adaptive filtering. IEEE Trans. SP, 54:1782–1793, 2006. [21] D. Kuang, S. Yun, and H. Park. SymNMF: nonnegative low-rank approximation of a similarity matrix for graph clustering. J. Global Optimization, 62:545–574, 2014. [22] P. Maréchal. On a functional operation generating convex functions, part 1: duality. J. of Optimization Theory and Applications, 126:175–189, 2005. [23] P. Maréchal. On a functional operation generating convex functions, part 2: algebraic properties. J. of Optimization Theory and Applications, 126:375–366, 2005. [24] A.-K. Menon and C.-S. Ong. Linking losses for class-probability and density ratio estimation. In ICML, 2016. [25] R. Nock, P. Luosto, and J. Kivinen. Mixed Bregman clustering with approximation guarantees. In ECML, 2008. [26] R. Nock and F. Nielsen. Bregman divergences and surrogates for learning. IEEE PAMI, 31:2048–2059, 2009. [27] R. Nock, F. Nielsen, and S.-I. Amari. On conformal divergences and their population minimizers. IEEE Trans. IT, 62:527–538, 2016. [28] M. Reid and R. Williamson. Information, divergence and risk for binary experiments. JMLR, 12:731–817, 2011. [29] M.-D. Reid and R.-C. Williamson. Composite binary losses. JMLR, 11:2387–2422, 2010. [30] G. Rong, M. Jin, and X. Guo. Hyperbolic centroidal Voronoi tessellation. In 14 th ACM SPM, 2010. [31] O. Schwander and F. Nielsen. Matrix Information Geometry, chapter Learning Mixtures by Simplifying Kernel Density Estimators, pages 403–426. Springer Berlin Heidelberg, 2013. [32] S. Shalev-Shwartz, Y. Singer, and N. Srebro. Pegasos: Primal estimated sub-gradient solver for SVM. In ICML ’08, page 807–814. ACM, 2007. [33] H. Shimodaira. Improving predictive inference under covariate shift by weighting the log-likelihood function. Journal of Statistical Planning and Inference, 90(2):227 – 244, 2000. [34] J. Straub, G. Rosman, O. Freifeld, J.-J. Leonard, and J.-W. Fisher III. A mixture of Manhattan frames: Beyond the Manhattan world. In Proc. of the 27th IEEE CVPR, pages 3770–3777, 2014. [35] M. Sugiyama, T. Suzuki, and T. Kanamori. Density-ratio matching under the Bregman divergence: a unified framework of density-ratio estimation. AISM, 64(5):1009–1044, 2012. [36] R. Vidal. Subspace clustering. IEEE Signal Processing Magazine, 28:52–68, 2011. [37] R.-C. Williamson, E. Vernet, and M.-D. Reid. Composite multiclass losses, 2014. Unpublished manuscript. [38] H. Zhang and S. Sra. First-order methods for geodesically convex optimization. CoRR, abs/1602.06053, 2016. 9 | 2016 | 463 |
6,398 | The Product Cut Xavier Bresson Nanyang Technological University Singapore xavier.bresson@ntu.edu.sg Thomas Laurent Loyola Marymount University Los Angeles tlaurent@lmu.edu Arthur Szlam Facebook AI Research New York aszlam@fb.com James H. von Brecht California State University, Long Beach Long Beach james.vonbrecht@csulb.edu Abstract We introduce a theoretical and algorithmic framework for multi-way graph partitioning that relies on a multiplicative cut-based objective. We refer to this objective as the Product Cut. We provide a detailed investigation of the mathematical properties of this objective and an effective algorithm for its optimization. The proposed model has strong mathematical underpinnings, and the corresponding algorithm achieves state-of-the-art performance on benchmark data sets. 1 Introduction We propose the following model for multi-way graph partitioning. Let G = (V, W) denote a weighted graph, with V its vertex set and W its weighted adjacency matrix. We define the Product Cut of a partition P = (A1, . . . , AR) of the vertex set V as Pcut(P) = QR r=1 Z(Ar, Ac r) eH(P) , H(P) = − R X r=1 θr log θr, (1) where θr = |Ar|/|V | denotes the relative size of a set. This model provides a distinctive way to incorporate classical notions of a quality partition. The non-linear, non-local function Z(Ar, Ac r) of a set measures its intra- and inter-connectivity with respect to the graph. The entropic balance H(P) measures deviations of the partition P from a collection of sets (A1, . . . , AR) with equal size. In this way, the Product Cut optimization parallels the classical Normalized Cut optimization [10, 15, 13] in terms of its underlying notion of cluster, and it arises quite naturally as a multiplicative version of the Normalized Cut. Nevertheless, the two models strongly diverge beyond the point of this superficial similarity. We provide a detailed analysis to show that (1) settles the compromise between cut and balance in a fundamentally different manner than classical objectives, such as the Normalized Cut or the Cheeger Cut. The sharp inequalities 0 ≤Ncut(P) ≤1 e−H(P) ≤Pcut(P) ≤1 (2) succinctly capture this distinction; the Product Cut exhibits a non-vanishing lower bound while the Normalized Cut does not. We show analytically and experimentally that this distinction leads to superior stability properties and performance. From an algorithmic point-of-view, we show how to cast the minimization of (1) as a convex maximization program. This leads to a simple, exact continuous relaxation of the discrete problem that has a clear mathematical structure. We leverage this formulation to develop a monotonic algorithm for optimizing (1) via a sequence of linear programs, and we introduce a randomized version of this strategy that leads to a simple yet highly effective 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. algorithm. We also introduce a simple version of Algebraic Multigrid (AMG) tailored to our problem that allows us to perform each step of the algorithm at very low cost. On graphs that contain reasonably well-balanced clusters of medium scale, the algorithm provides a strong combination of accuracy and efficiency. We conclude with an experimental evaluation and comparison of the algorithm on real world data sets to validate these claims. 2 The Product Cut Model We begin by introducing our notation and by describing the rationale underlying our model. We use G = (V, W) to denote a graph on n vertices V = {v1, . . . , vn} with weighted edges W = {wij}n i,j=1 that encode similarity between vertices. We denote partitions of the vertex set into R subsets as P = (A1, . . . , AR), with the understanding that the Ar ⊂V satisfy the covering A1 ∪. . .∪AR = V constraint, the non-overlapping Ar ∩As = ∅, (r ̸= s) constraint and the non-triviality Ar ̸= ∅ constraint. We use f, g, h, u, v to denote vertex functions f : V →R, which we view as functions f(vi) and n-vectors f ∈Rn interchangeably. For a A ⊂V we use |A| for its cardinality and 1A for its indicator function. Finally, for a given graph G = (V, W) we use D := diag(W1V ) to denote the diagonal matrix of weighted vertex degrees. The starting point for our model arises from a well-known and widely used property of the random walk on a graph. Namely, a random walker initially located in a cluster A is unlikely to leave that cluster quickly [8]. Different approaches of quantifying this intuition then lead to a variety of multi-way partitioning strategies for graphs [11, 12, 1]. The personalized page-rank methodology provides an example of this approach. Following [1], given a scalar 0 < α < 1 and a non-empty vertex subset A we define prA := M −1 α 1A/|A| Mα := Id −αWD−1 /(1 −α) (3) as its personalized page-rank vector. As 1A/|A| is the uniform distribution on the set A and WD−1 is the transition matrix of the random walk on the graph, prA corresponds to the stationary distribution of a random walker that, at each step, moves with probability α to a neighboring vertex by a usual random walk, and has a probability (1 −α) to teleport to the set A. If A has a reasonable cluster structure, then prA will concentrate on A and assign low probabilities to its complement. Given a high-quality partition P = (A1, . . . , AR) of V , we therefore expect that σi,r := prAr(vi) should achieve its maximal value over 1 ≤r ≤R when r = r(i) is the class of the ith vertex. Viewed from this perspective, we can formulate an R-way graph partitioning problem as the task of selecting P = (A1, . . . , AR) to maximize some combination of the collection {σi,r(i) : i ∈V } of page-rank probabilities generated by the partition. Two intuitive options immediately come to mind, the arithmetic and geometric means of the collection: Maximize 1 n P r P vi∈Ar prAr(vi) over all partitions (A1, . . . , AR) of V into R sets. (4) Maximize Q r Q vi∈Ar prAr(vi) 1/n over all partitions (A1, . . . , AR) of V into R sets. (5) The first option corresponds to a straightforward variant of the classical Normalized Cut. The second option leads to a different type of cut-based objective that we term the Product Cut. The underlying reason for considering (5) is quite natural. If we view each prAr as a probability distribution, then (5) corresponds to a formal likelihood of the partition. This proves quite analogous to re-formulating the classical k-means objective for partitioning n data points (x1, . . . , xn) into R clusters (A1, . . . , AR) in terms of maximizing a likelihood QR r=1 Q vi∈Ar exp(−∥xi−mr∥2 2σ2r ) of Gaussian densities. While the Normalized Cut variant (4) is certainly popular, we show that it suffers from several defects that the Product Cut resolves. As the Product Cut can be effectively optimized and generally leads to higher quality partitions, it therefore provides a natural alternative. To make these ideas precise, let us define the α-smoothed similarity matrix as Ωα := M −1 α and use {ωij}n i,j=1 to denote its entries. Thus ωij = (M −1 α 1vj)i = pr{vj}(vi), and so ωij gives a non-local measure of similarity between the vertices vi and vj by means of the personalized page-rank diffusion process. The matrix Ωα is column stochastic, non-symmetric, non-sparse, and has diagonal entries 2 greater than (1 −α). Given a partition P = (A1, . . . , AR), we define Pcut(P) := QR r=1 Z(Ar, Ac r)1/n eH(P) and Ncut(P) := 1 R R X r=1 Cut(Ar, Ac r) Vol(Ar) (6) as its Product Cut and Normalized Cut, respectively. The non-linear, non-local function Z(A, Ac) := Y vi∈Ar 1 + P j∈Ac ωij P j∈A ωij (7) of a set measures its intra- and inter-connectivity with respect to the graph while H(P) denotes the entropic balance (1). The definitions of Cut(A, Ac) = P i∈Acr P j∈Ar ωij and Vol(A) = P i∈V P j∈Ar ωij are standard. A simple computation then shows that maximizing the geometric average (5) is equivalent to minimizing the Product Cut, while maximizing the arithmetic average (4) is equivalent to minimizing the Normalized Cut. At a superficial level, both models wish to achieve the same goal. The numerator of the Product Cut aims at a partition in which each vertex is weakly connected to vertices from other clusters and strongly connected with vertices from its own cluster. The denominator H(P) is maximal when |A1| = |A2| = . . . = |AR|, and so aims at a well-balanced partition of the vertices. The objective (5) therefore promotes partitions with strongly intra-connected clusters and weakly inter-connected clusters that have comparable size. The Normalized Cut, defined here on Ωα but usually posed over the original similarity matrix W, is exceedingly well-known [10, 15] and also aims at finding a good balance between low cut value and clusters of comparable sizes. Despite this apparent parallel between the Product and Normalized Cuts, the two objectives behave quite differently both in theory and in practice. To illustrate this discrepancy at a high level, note first that the following sharp bounds 0 ≤Ncut(P) ≤1 (8) hold for the Normalized Cut. The lower bound is attained for partitions P in which the clusters are mutually disconnected. For the Product Cut, we have Theorem 1 The following inequality holds for any partition P: e−H(P) ≤Pcut(P) ≤1. (9) Moreover the lower bound is attained for partitions P in which the clusters are mutually disconnected. The lower bound in (9) can be directly read from (6) and (7), while the upper bound is non-trivial and proved in the supplementary material. This theorem goes at the heart of the difference between the Product and Normalized Cuts. To illustrate this, let P(k) denote a sequence of partitions. Then (9) shows that lim k→∞H(P(k)) = 0 ⇒lim k→∞Pcut(P(k)) = 1. (10) In other words, an arbitrarily ill-balanced partition leads to arbitrarily poor values of its Product Cut. The Normalized Cut does not possess this property. As an extreme but easy-to-analyze example, consider the case where G = (V, W) is a collection of isolated vertices. All possible partitions P consist of mutually disconnected clusters and the lower bound is reached for both (8) and (9). Thus Ncut(P) = 0 for all P and so all partitions are equivalent for the Normalized Cut. On the other hand Pcut(P) = e−H(P), which shows that, in the absence of “cut information,” the Product Cut will choose the partition that maximizes the entropic balance. So in this case, any partition P for which |A1| = . . . = |AR| will be a minimizer. In essence, this tighter lower bound for the Product Cut reflects its stronger balancing effect vis-a-vis the Normalized Cut. 2.1 (In-)Stability Properies of the Product Cut and Normalized Cut In practice, the stronger balancing effect of the Product Cut manifests as a stronger tolerance to perturbations. We now delve deeper and contrast the two objectives by analyzing their stability properties using experimental data as well as a simplified model problem that isolates the source of 3 (a) An in blue, Bn in green, C in red. (b) P0,good n = (An, Bn ∪C) (c) P0,bad n = (An ∪Bn, C) Figure 1: The graphs G0 n used for analyzing stability. the inherent difficulties. Invoking ideas from dynamical systems theory, we say an objective is stable if an infinitesimal perturbation of a graph G = (V, W) leads to an infinitesimal perturbation of the optimal partition. If an infinitesimal perturbation leads to a dramatic change in the optimal partition, then the objective is unstable. We use a simplified model to study stability of the Product Cut and Normalized Cut objectives. Consider a graph Gn = (Vn, Wn) made of two clusters An and Bn containing n vertices each. Each vertex in Gn has degree k and is connected to µk vertices in the opposite cluster, where 0 ≤µ ≤1. The graph G0 n is a perturbation of Gn constructed by adding a small cluster C of size n0 ≪n to the original graph. Each vertex of C has degree k0 and is connected to µ0k0 vertices in Bn and (1 −µ0)k0 vertices in C for some 0 ≤µ0 ≤1. In the perturbed graph G0 n, a total of n0 vertices in Bn are linked to C and have degree k + µ0k0. See figure 1(a). The main properties of Gn, G0 n are • Unperturbed graph Gn : |An| = |Bn| = n, CondGn(An) = µ, CondGn(Bn) = µ • Perturbed graph G0 n: |An| = |Bn| = n, CondG0n(An) = µ, CondG0n(Bn) ≈µ . |C| = n0 ≪n, CondG0n(C) = µ0. where CondG(A) = Cut(A, Ac)/ min(|A|, |Ac|) denotes the conductance of a set. If we consider the parameters µ, µ0, k, k0, n0 as fixed and look at the perturbed graph G0 n in the limit n →∞of a large number of vertices, then as n becomes larger the degree of the bulk vertices will remain constant while the size |C| of the perturbation becomes infinitesimal. To examine the influence of this infinitesimal perturbation for each model, let Pn = (An, Bn) denote the desired partition of the unperturbed graph Gn and let P0,good n = (An, Bn ∪C) and P0,bad n = (An ∪Bn, C) denote the partitions of the perturbed graph G0 n depicted in figure 1(b) and 1(c), respectively. As P0,good n ≈Pn, a stable objective will prefer P0,good n to P0,bad n while any objective preferring the converse is unstable. A detailed study of stability proves possible for this specific graph family. We summarize the conclusions of this analysis in the theorem below, which shows that the Normalized Cut is unstable in certain parameter regimes while the Product Cut is always stable. The supplementary material contains the proof. Theorem 2 Suppose that µ, µ0, k, k0, n0 are fixed. Then µ0 < 2µ ⇒ NcutG0n(P0,good n ) > NcutG0n(P0,bad n ) for n large enough. (11) PcutG0n(P0,good n ) < PcutG0n(P0,bad n ) for n large enough. (12) Statement (11) simply says that the large cluster An must have a conductance µ at least twice better than the conductance µ0 of the small perturbation cluster C in order to prevent instability. Thus adding an infinitesimally small cluster with mediocre conductance (up to two times worse the conductance of the main structure) has the potential of radically changing the partition selected by the Normalized Cut. Moreover, this result holds for the classical Normalized Cut, its smoothed variant (4) as well as for similar objectives such as the Cheeger Cut and Ratio Cut. Conversely, (12) shows that adding an infinitesimally small cluster will not affect the partition selected by the 4 aa Partition P of Partition P of Partition P of Partition P of WEBKB4 found by WEBKB4 found by CITESEER found by CITESEER found by the Pcut algo. the Ncut algo. the Pcut algo. the Ncut algo. e−H(P) .2506 .7946 .1722 .7494 Pcut(P) .5335 .8697 .4312 .8309 Ncut(P) .5257 .5004 .5972 .5217 Figure 2: The Product and Normalized Cuts on WEBKB4 (R = 4 clusters) and CITESEER (R = 6 clusters). The pie charts visually depict the sizes of the clusters in each partition. In both cases, NCut returns a super-cluster while PCut returns a well-balanced partition. The NCut objective prefers the ill-balanced partitions while the PCut objective dramatically prefers the balanced partitions. Product Cut. The proof, while lengthy, is essentially just theorem 1 in disguise. To see this, note that the sequence of partitions P0,bad n becomes arbitrarily ill-balanced, which from (10) implies limn→∞PcutG0n(P0,bad n ) = 1. However, the unperturbed graph Gn grows in a self-similar fashion as n →∞and so the Product Cut of Pn remains approximately a constant, say γ, for all n. Thus PcutGn(Pn) ≈γ < 1 for n large enough, and PcutG0n(P0,good n ) ≈PcutGn(Pn) since |C| is infinitesimal. Therefore PcutG0n(P0,good n ) ≈γ < 1. Comparing this upper-bound with the fact limn→∞PcutG0n(P0,bad n ) = 1, we see that the Product Cut of P0,bad n becomes eventually larger than the Product Cut of P0,good n . While we execute this program in full only for the example above, this line of argument is fairly general and similar stability estimates are possible for more general families of graphs. This general contrast between the Product Cut and the Normalized Cut extends beyond the realm of model problems, as the user familiar with off-the-shelf NCut codes likely knows. When provided with “dirty” graphs, for example an e-mail network or a text data set, NCut has the aggravating tendency to return a super-cluster. That is, NCut often returns a partition P = (A1, . . . , AR) where a single set |Ar| contains the vast majority of the vertices. Figure 2 illustrates this phenomenon. It compares the partitions obtained for NCut (computed on Ωα using a modification of the standard spectral approximation from [15]) and for PCut (computed using the algorithm presented in the next section) on two graphs constructed from text data sets. The NCut algorithm returns highly ill-balanced partitions containing a super-cluser, while PCut returns an accurate and well-balanced partition. Other strategies for optimizing NCut obtain similarly unbalanced partitions. As an example, using the algorithm from [9] with the original sparse weight matrix W leads to relative cluster sizes of 99.2%, 0.5%, 0.2% and 0.1% for WEBKB4 and 98.5%, 0.4%, 0.3%, 0.3%, 0.3% and 0.2% for CITESEER. As our theoretical results indicate, these unbalanced partitions result from the normalized cut criterion itself and not the algorithm used to minimize it. 3 The Algorithm Our strategy for optimizing the Product Cut relies on a popular paradigm for discrete optimization, i.e. exact relaxation. We begin by showing that the discrete, graph-based formulation (5) can be relaxed to a continuous optimization problem, specifically a convex maximization program. We then prove that this relaxation is exact, in the sense that optimal solutions of the discrete and continuous problems coincide. With an exact relaxation in hand, we may then appeal to continuous optimization strategies (rather than discrete or greedy ones) for optimizing the Product Cut. This general idea of exact relaxation is intimately coupled with convex maximization. Assume that the graph G = (V, W) is connected. Then by taking the logarithm of (5) we see that (5) is equivalent to the problem Maximize PR r=1 P i∈Ar log (Ωα1Ar )i |Ar| over all partitions P = (A1, . . . , AR) of V into R non-empty subsets. ) (P) 5 The relaxation of (P) then follows from the usual approach. We first encode sets Ar ⊊V as binary vertex functions 1Ar, then relax the binary constraint to arrive at a continuous program. Given a vertex function f ∈Rn + with non-negative entries, we define the continuous energy e(f) as e(f) := f, log Ωαf/ ⟨f, 1V ⟩ if f ̸= 0, and e(0) = 0, where ⟨·, ·⟩denotes the usual dot product in Rn and the logarithm applies entriwise. As (Ωαf)i > 0 whenever f ̸= 0, the continuous energy is well-defined. After noting that P r e(1Ar) is simply the objective value in problem (P), we arrive to the following continuous relaxation Maximize PR r=1 e(fr) over all (f1, . . . , fR) ∈Rn + × . . . × Rn + satisfying PR r=1 fr = 1V ) , (P-rlx) where the non-negative cone Rn + consists of all vectors in Rn with non-negative entries. The following theorem provides the theoretical underpinning for our algorithmic approach. It establishes convexity of the relaxed objective for connected graphs. Theorem 3 Assume that G = (V, W) is connected. Then the energy e(f) is continuous, positive 1-homogeneous and convex on Rn +. Moreover, the strict convexity property e(θf + (1 −θ)g) < θe(f) + (1 −θ)e(g) for all θ ∈(0, 1) holds whenever f, g ∈Rn + are linearly independent. The continuity of e(f) away from the origin as well as the positive one-homogeneity are obvious, while the continuity of e(f) at the origin is easy to prove. The proof of convexity of e(f), provided in the supplementary material, is non-trivial and heavily relies on the particular structure of Ωα itself. With convexity of e(f) in hand, we may prove the main theorem of this section. Theorem 4 ( Equivalence of (P) and (P-rlx) ) Assume that G = (V, W) is connected and that V contains at least R vertices. If P = (A1, . . . , AR) is a global optimum of (P) then (1A1, . . . , 1AR) is a global optimum of (P-rlx) . Conversely, if (f1, . . . , fR) is a global optimum of (P-rlx) then (f1, . . . , fR) = (1A1, . . . , 1AR) where (A1, . . . , AR) is a global optimum of (P). Proof. By strict convexity, the solution of the maximization (P-rlx) occurs at the extreme points of the constraint set Σ = {(f1, . . . , fR) : fr ∈RN + and PR r=1 fr = 1}. Any such extreme point takes the form (1A1, . . . , 1AR), where necessarily A1 ∪. . . ∪AR = V and Ar ∩As = ∅(r ̸= s) hold. It therefore suffices to rule out extreme points that have an empty set of vertices. But if A ̸= B are non-empty then 1A, 1B are linearly independent, and so the inequality e(1A +1B) < e(1A)+e(1B) holds by strict convexity and one-homogeneity. Thus given a partition of the vertices into R −1 non-empty subsets and one empty subset, we can obtain a better energy by splitting one of the non-empty vertex subsets into two non-empty subsets. Thus any globally maximal partition cannot contain empty subsets. □ With theorems 3 and 4 in hand, we may now proceed to optimize (P) by searching for optima of its exact relaxation. We tackle the latter problem by leveraging sequential linear programming or gradient thresholding strategies for convex maximization. We may write (P-rlx) as Maximize E(F) subject to F ∈C and ψi(F) = 0 for i = 1, . . . , n (13) where F = (f1, . . . , fR) is the optimization variable, E(F) is the convex energy to be maximized, C is the bounded convex set [0, 1]n × . . . × [0, 1]n and the n affine constraints ψi(F) = 0 correspond to the row-stochastic constraints PR r=1 fi,r = 1. Given a current feasible estimate F k of the solution, we obtain the next estimate F k+1 by solving the linear program Maximize Lk(F) subject to F ∈C and ψi(F) = 0 for i = 1, . . . , n (14) where Lk(F) = E(F k) + ⟨∇E(F (k)), F −F k⟩is the linearization of the energy E(F) around the current iterate. By convexity of E(F), this strategy monotonically increases E(F k) since E(F k+1) ≥ Lk(F k+1) ≥Lk(F k) = E(F k). The iterates F k therefore encode a sequence of partitions of V that monotonically increase the energy at each step. Either the current iterate maximizes the linear form, in which case first-order optimality holds, or else the subsequent iterate produces a partition with a 6 Algorithm 1 Randomized SLP for PCut Initialization: (f 0 1 , . . . , f 0 R) = (1A1, . . . , 1AR) for (A1, . . . , AR) a random partition of V for k = 0 to maxiter do for r = 1 to R do Set ˆfr = f k r /(Pn i=1 f k i,r) then solve Mαur = ˆfr Set gi,r = fi,r/ui,r for i = 1, . . . n then solve M T α vr = gr Set hr = log ur + vr −1 end for Choose at random sk vertices and let I ⊂V be these vertices. for all i ∈V do If i ∈I then f k+1 i,r = 1 if r = arg maxs his 0 otherwise, if i /∈I then f k+1 i,r = 1 if hi,r > 0 0 otherwise. end for end for strictly larger objective value. The latter case can occur only a finite number of times, as only a finite number of partitions exist. Thus the sequence F k converges after a finite number of iterations. While simple and easy to implement, this algorithm suffers from a severe case of early termination. When initialized from a random partition, the iterates F k almost immediately converge to a poorquality solution. We may rescue this poor quality algorithm and convert it to a highly effective one, while maintaining its simplicity, by randomizing the LP (14) at each step in the following way. At step k we solve the LP maximize Lk(F) subject to F ∈C and ψi(F) = 0 for i ∈Ik, (15) where the set Ik is a random subset of {1, 2, . . . , n} obtained by drawing sk constraints uniformly at random without replacement. The LP (15) is therefore version of LP (14) in which we have dropped a random set of constraints. If we start by enforcing a small number sk of constraints and slowly increment this number sk+1 = sk + ∆sk as the algorithm progresses, we allow the algorithm time to explore the energy landscape. Enforcing more constraints as the iterates progress ensures that (15) eventually coincides with (14), so convergence of the iterates F k of the randomized algorithm is still guaranteed. The attraction is that LP (15) has a simple, closed-form solution given by a variant of gradient thresholding. We derive the closed form solution of LP (15) in section 1 of the supplementary material, and this leads to Algorithm 1 above. The overall effectiveness of this strategy relies on two key ingredients. The first is a proper choice of the number of constraints sk to enforce at each step. Selecting the rate at which sk increases is similar, in principle, to selecting a learning rate schedule for a stochastic gradient descent algorithm. If sk increases too quickly then the algorithm will converge to poor-quality partitions. If sk increases too slowly, the algorithm will find a quality solution but waste computational effort. A good rule of thumb is to linearly increase sk at some constant rate ∆sk ≡λ until all constraints are enforced, at which point we switch to the deterministic algorithm and terminate the process at convergence. The second key ingredient involves approximating solutions to the linear system Mαx = b quickly. We use a simple Algebraic Multigrid (AMG) technique, i.e. a stripped-down version of [7] or [6], to accomplish this. The main insight here is that exact solutions of Mαx = b are not needed, but not all approximate solutions are effective. We need an approximate solution x that has non-zero entries on all of |V | for thresholding to succeed, and this can be accomplished by AMG at very little cost. 4 Experiments We conclude our study of the Product Cut model by presenting extensive experimental evaluation of the algorithm1. We intend these experiments to highlight the fact that, in addition to a strong theoretical model, the algorithm itself leads to state-of-the-art performance in terms of cluster purity on a variety of real world data sets. We provide experimental results on four text data sets (20NEWS, RCV1, WEBKB4, CITESEER) and four data sets containing images of handwritten digits (MNIST, PENDIGITS, USPS, OPTDIGITS). We provide the source for these data sets and details on their 1The code is available at https://github.com/xbresson/pcut 7 Table 1: Algorithmic Comparison via Cluster Purity. 20NE RCV1 WEBK CITE MNIS PEND USPS OPTI size 20K 9.6K 4.2K 3.3K 70K 11K 9.3K 5.6K R 20 4 4 6 10 10 10 10 RND 6 30 39 22 11 12 17 12 NCUT 27 38 40 23 77 80 72 91 LSD 34 38 46 53 76 86 70 91 MTV 36 43 45 43 96 87 85 95 GRACLUS 42 42 49 54 97 85 87 94 NMFR 61 43 58 63 97 87 86 98 PCut (.9,λ1) 61 53 58 63 97 87 89 98 PCut (.9,λ2) 60 50 57 64 96 84 89 95 construction in the supplementary material. We compare our method against partitioning algorithms that, like the Product Cut, rely on graph-cut objective principles and that partition the graph in a direct, non-recursive manner. The NCut algorithm [15] is a widely used spectral algorithm that relies on a post-processing of the eigenvectors of the graph Laplacian to optimize the Normalized Cut energy. The NMFR algorithm [14] uses a graph-based random walk variant of the Normalized Cut. The LSD algorithm [2] provides a non-negative matrix factorization algorithm that relies upon a trace-based relaxation of the Normalized Cut objective. The MTV algorithm from [3] and the balanced k-cut algorithm from [9] provide total-variation based algorithms that attempt to find an optimal multi-way Cheeger cut of the graph by using ℓ1 optimization techniques. Both algorithms optimize the same objective and achieve similar purity values. We report results for [3] only. The GRACLUS algorithm [4, 5] uses a multi-level coarsening approach to optimize the NCut objective as formulated in terms of kernel k-means. Table 1 reports the accuracy obtained by these algorithms for each data set. We use cluster purity to quantify the quality of the calculated partition, defined according to the relation: Purity = 1 n PR r=1 max1<i<R mr,i. Here mr,i denotes the number of data points in the rth cluster that belong to the ith ground-truth class. The third row of the table (RND) provides a base-line purity for reference, i.e. the purity obtained by assigning each data point to a class from 1 to R uniformly at random. The PCut, MTV and GRACLUS algorithms rely on randomization, so for these algorithms we report the average purity achieved over 500 different runs. For the PCut algorithm, we use α = .9 when defining Ωα. Also, in order to illustrate the tradeoff when selecting the rate at which the number of enforced constraints sk increases, we report accuracy results for the linear rates ∆sk = 10−4 × n := λ1 and ∆sk = 5 × 10−4 × n := λ2 where n denotes the total number of vertices in the data set. By and large both PCut and NMFR consistently outperform the other algorithms in terms of accuracy. Table 2: Computational Time MNIST 20NEWS NMFR PCut (.9,λ1) PCut (.9,λ2) NMFR PCut (.9,λ1) PCut (.9,λ2) 4.6mn 11s 10s 3.7mn 1.3mn 16s (92%) (92%) (91%) (58%) (58%) (57%) In addition to the accuracy comparisons, table 2 records the time required for PCut and NMFR to reach 95% of their limiting purity value on the two largest data sets, 20NEWS and MNIST. Each algorithm is implemented in a fair and consistent way, and the experiments were all performed on the same architecture. Timing results on the smaller data sets from table 1 are consistent with those obtained for 20NEWS and MNIST. In general we observe that PCut runs significantly faster. Additionally, as we expect for PCut, the slower rate λ1 generally leads to more accurate results while the larger rate λ2 typically converges more quickly. When taken together, our theoretical and experimental results clearly reveal that the model provides a promising method for graph partitioning. The algorithm consistently achieves state-of-the-art results, and typically runs significantly faster than other algorithms that achieve a comparable level of accuracy. Additionally, both the model and algorithmic approach rely upon solid mathematical foundations that are frequently missing in the multi-way clustering literature. Acknowledgements: TL was supported by NSF DMS-1414396. 8 References [1] Reid Andersen, Fan Chung, and Kevin Lang. Local graph partitioning using pagerank vectors. In Proceedings of the 47th Annual Symposium on Foundations of Computer Science (FOCS ’06), pages 475–486, 2006. [2] Raman Arora, M Gupta, Amol Kapila, and Maryam Fazel. Clustering by left-stochastic matrix factorization. In International Conference on Machine Learning (ICML), pages 761–768, 2011. [3] Xavier Bresson, Thomas Laurent, David Uminsky, and James von Brecht. Multiclass total variation clustering. In Advances in Neural Information Processing Systems (NIPS), 2013. [4] Inderjit S. Dhillon, Yuqiang Guan, and Brian Kulis. Weighted graph cuts without eigenvectors: A multilevel approach. IEEE Transactions on Pattern Analysis and Machine Intelligence, 29(11):1944–1957, 2007. [5] George Karypis and Vipin Kumar. A fast and high quality multilevel scheme for partitioning irregular graphs. SIAM J. Sci. Comput., 20(1):359–392, 1998. [6] Dilip Krishnan, Raanan Fattal, and Richard Szeliski. Efficient preconditioning of laplacian matrices for computer graphics. ACM Transactions on Graphics (TOG), 32(4):142, 2013. [7] Oren E Livne and Achi Brandt. Lean algebraic multigrid (lamg): Fast graph laplacian linear solver. SIAM Journal on Scientific Computing, 34(4):B499–B522, 2012. [8] László Lovász and Miklós Simonovits. Random walks in a convex body and an improved volume algorithm. Random structures & algorithms, 4(4):359–412, 1993. [9] Syama Sundar Rangapuram, Pramod Kaushik Mudrakarta, and Matthias Hein. Tight continuous relaxation of the balanced k-cut problem. In Advances in Neural Information Processing Systems, pages 3131–3139, 2014. [10] J. Shi and J. Malik. Normalized Cuts and Image Segmentation. IEEE Transactions on Pattern Analysis and Machine Intelligence (PAMI), 22(8):888–905, 2000. [11] Daniel A. Spielman and Shang-Hua Teng. Nearly-linear time algorithms for graph partitioning, graph sparsification, and solving linear systems. In Proceedings of the thirty-sixth annual ACM symposium on Theory of computing, pages 81–90, 2004. [12] Daniel A. Spielman and Shang-Hua Teng. A local clustering algorithm for massive graphs and its application to nearly linear time graph partitioning. SIAM Journal on Computing, 42(1):1–26, 2013. [13] U. von Luxburg. A tutorial on spectral clustering. Statistics and Computing, 17(4):395–416, 2007. [14] 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 (NIPS), pages 1088–1096, 2012. [15] Stella X. Yu and Jianbo Shi. Multiclass spectral clustering. in international conference on computer vision. In International Conference on Computer Vision, 2003. 9 | 2016 | 464 |
6,399 | Learning from Rational Behavior: Predicting Solutions to Unknown Linear Programs Shahin Jabbari, Ryan Rogers, Aaron Roth, Zhiwei Steven Wu University of Pennsylvania {jabbari@cis, ryrogers@sas, aaroth@cis, wuzhiwei@cis}.upenn.edu Abstract We define and study the problem of predicting the solution to a linear program (LP) given only partial information about its objective and constraints. This generalizes the problem of learning to predict the purchasing behavior of a rational agent who has an unknown objective function, that has been studied under the name “Learning from Revealed Preferences". We give mistake bound learning algorithms in two settings: in the first, the objective of the LP is known to the learner but there is an arbitrary, fixed set of constraints which are unknown. Each example is defined by an additional known constraint and the goal of the learner is to predict the optimal solution of the LP given the union of the known and unknown constraints. This models the problem of predicting the behavior of a rational agent whose goals are known, but whose resources are unknown. In the second setting, the objective of the LP is unknown, and changing in a controlled way. The constraints of the LP may also change every day, but are known. An example is given by a set of constraints and partial information about the objective, and the task of the learner is again to predict the optimal solution of the partially known LP. 1 Introduction We initiate the systematic study of a general class of multi-dimensional prediction problems, where the learner wishes to predict the solution to an unknown linear program (LP), given some partial information about either the set of constraints or the objective. In the special case in which there is a single known constraint that is changing and the objective that is unknown and fixed, this problem has been studied under the name learning from revealed preferences [1, 2, 3, 16] and captures the following scenario: a buyer, with an unknown linear utility function over d goods u : Rd ! R defined as u(x) = c · x faces a purchasing decision every day. On day t, she observes a set of prices pt 2 Rd ≥0 and buys the bundle of goods that maximizes her unknown utility, subject to a budget b: x(t) = argmax x c · x such that pt · x b In this problem, the goal of the learner is to predict the bundle that the buyer will buy, given the prices that she faces. Each example at day t is specified by the vector pt 2 Rd ≥0 (which fixes the constraint), and the goal is to accurately predict the purchased bundle x(t) 2 [0, 1]d that is the result of optimizing the unknown linear objective. It is also natural to consider the class of problems in which the goal is to predict the outcome to a LP broadly e.g. suppose the objective c · x is known but there is an unknown set of constraints Ax b. An instance is again specified by a changing known constraint (pt, bt) and the goal is to predict: x(t) = argmax x c · x such that Ax b and pt · x bt. (1) 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. This models the problem of predicting the behavior of an agent whose goals are known, but whose resource constraints are unknown. Another natural generalization is the problem in which the objective is unknown, and may vary in a specified way across examples, and in which there may also be multiple arbitrary known constraints which vary across examples. Specifically, suppose that there are n distinct, unknown linear objective functions v1, . . . , vn. An instance on day t is specified by a subset of the unknown objective functions, St ✓[n] := {1, . . . , n} and a convex feasible region Pt, and the goal is to predict: x(t) = argmax x X i2St vi · x such that x 2 Pt. (2) When the changing feasible regions Pt correspond simply to varying prices as in the revealed preferences problem, this models a setting in which at different times, purchasing decisions are made by different members of an organization, with heterogeneous preferences — but are still bound by an organization-wide budget. The learner’s problem is, given the subset of decision makers and the prices at day t, to predict which bundle they will purchase. This generalizes some of the preference learning problems recently studied by Blum et al [6]. Of course, in this generality, we may also consider a richer set of changing constraints which represent things beyond prices and budgets. In all of the settings we study, the problem can be viewed as the task of predicting the behavior of a rational decision maker, who always chooses the action that maximizes her objective function subject to a set of constraints. Some part of her optimization problem is unknown, and the goal is to learn, through observing her behavior, that unknown part of her optimization problem sufficiently so that we may reliably predict her future actions. 1.1 Our Results We study both variants of the problem (see below) in the strong mistake bound model of learning [13]. In this model, the learner encounters an arbitrary adversarially chosen sequence of examples online and must make a prediction for the optimal solution in each example before seeing future examples. Whenever the learner’s prediction is incorrect, the learner encounters a mistake, and the goal is to prove an upper bound on the number of mistakes the learner can make, in the worst case over the sequence of examples. Mistake bound learnability is stronger than (and implies) PAC learnability [15]. Known Objective and Unknown Constraints We first study this problem under the assumption that there is a uniform upper bound on the number of bits of precision used to specify the constraint defining each example. In this case, we show that there is a learning algorithm with both running time and mistake bound linear in the number of edges of the polytope formed by the unknown constraint matrix Ax b. We note that this is always polynomial in the dimension d when the number of unknown constraints is at most d + O(1). (In the supplementary material, we show that by allowing the learner to run in time exponential in d, we can give a mistake bound that is always linear in the dimension and the number of rows of A, but we leave as an open question whether or not this mistake bound can be achieved by an efficient algorithm.) We then show that our bounded precision assumption is necessary — i.e. we show that when the precision to which constraints are specified need not be uniformly upper bounded, then no algorithm for this problem in dimension d ≥3 can have a finite mistake bound. This lower bound motivates us to study a PAC style variant of the problem, where the examples are not chosen in an adversarial manner, but instead are drawn independently at random from an arbitrary unknown distribution. In this setting, we show that even if the constraints can be specified to arbitrary (even infinite) precision, there is a learner that requires sample complexity only linear in the number of edges of the unknown constraint polytope. This learner can be implemented efficiently when the constraints are specified with finite precision. Known Constraints and Unknown Objective For the variant of the problem in which the objective is unknown and changing and the constraints are known but changing, we give an algorithm that has a mistake bound and running time polynomial in the dimension d. Our algorithm uses the Ellipsoid algorithm to learn the coefficients of the unknown objective by implementing a separation oracle that generates separating hyperplanes given examples on which our algorithm made a mistake. 2 We leave the study of either of our problems under natural relaxations (e.g. under a less demanding loss function) and whether it is possible to substantially improve our results in these relaxations as an interesting open problem. 1.2 Related Work Beigman and Vohra [3] were the first to study revealed preference problems (RPP) as a learning problems and to relate them to multi-dimensional classification. They derived sample complexity bounds for such problems by computing the fat shattering dimension of the class of target utility functions, and showed that the set of Lipschitz-continuous valuation functions had finite fat-shattering dimension. Zadimoghaddam and Roth [16] gave efficient algorithms with polynomial sample complexity for PAC learning of the RPP over the class of linear (and piecewise linear) utility functions. Balcan et al. [2] showed a connection between RPP and the structured prediction problem of learning d-dimensional linear classes [7, 8, 12], and use an efficient variant of the compression techniques given by Daniely and Shalev-Shwartz [9] to give efficient PAC algorithms with optimal sample complexity for various classes of economically meaningful utility functions. Amin et al. [1] study the RPP for linear valuation functions in the mistake bound model, and in the query model in which the learner gets to set prices and wishes to maximize profit. Roth et al. [14] also study the query model of learning and give results for strongly concave objective functions, leveraging an algorithm of Belloni et al. [4] for bandit convex optimization with adversarial noise. All of the works above focus on the setting of predicting the optimizer of a fixed unknown objective function, together with a single known, changing constraint representing prices. This is the primary point of departure for our work — we give algorithms for the more general settings of predicting the optimizer of a LP when there may be many unknown constraints, or when the unknown objective function is changing. Finally, the literature on preference learning (see e.g. [10]) has similar goals, but is technically quite distinct: the canonical problem in preference learning is to learn a ranking on distinct elements. In contrast, the problem we consider here is to predict the outcome of a continuous optimization problem as a function of varying constraints. 2 Model and Preliminaries We first formally define the geometric notions used throughout this paper. A hyperplane and a halfspace in Rd are the set of points satisfying the linear equation a1x1 + . . . adxd = b and the linear inequality a1x1 + . . . + adxd b for a set of ais respectively, assuming that not all ai’s are simultaneously zero. A set of hyperplanes are linearly independent if the normal vectors to the hyperplanes are linearly independent. A polytope (denoted by P ✓Rd) is the bounded intersection of finitely many halfspaces, written as P = {x | Ax b}. An edge-space e of a polytope P is a one dimensional subspace that is the intersection of d −1 linearly independent hyperplanes of P, and an edge is the intersection between an edge-space e and the polytope P.We denote the set of edges of polytope P by EP. A vertex of P is a point where d linearly independent hyperplanes of P intersect. Equivalently, P can be written as the convex hull of its vertices V denoted by Conv(V ). Finally, we define a set of points to be collinear if there exists a line that contains all the points in the set. We study an online prediction problem with the goal of predicting the optimal solution of a changing LP whose parameters are only partially known. Formally, in each day t = 1, 2, . . . an adversary chooses a LP specified by a polytope P(t) (a set of linear inequalities) and coefficients c(t) 2 Rd of the linear objective function. The learner’s goal is to predict the solution x(t) where x(t) = argmaxx2P(t) c(t) · x. After making the prediction ˆx(t), the learner observes the optimal x(t) and learns whether she has made a mistake (ˆx(t) 6= x(t)). The mistake bound is defined as follows. Definition 1. Given a LP with feasible polytope P and objective function c, let σ(t) denote the parameters of the LP that are revealed to the learner on day t. A learning algorithm A takes as input the sequence {σ(t)}t, the known parameters of an adaptively chosen sequence {(P(t), c(t))}t of LPs and outputs a sequence of predictions {ˆx(t)}t. We say that A has mistake bound M if max{(P(t),c(t))}t " ⌃1 t=11 ⇥ˆx(t) 6= x(t)⇤ M, where x(t) = argmaxx2P(t) c(t) · x on day t. We consider two different instances of the problem described above. First, in Section 3, we study the problem given in (1) in which c(t) = c is fixed and known to the learner but the polytope P(t) = 3 P \ N (t) consists of an unknown fixed polytope P and a new constraint N (t) = {x | p(t) · x b(t)} which is revealed to the learner on day t i.e. σ(t) = (N (t), c). We refer to this as the Known Objective problem. Then, in Section 4, we study the problem in which the polytope P(t) is changing and known but the objective function c(t) = P i2S(t) vi is unknown and changing as in (2) where the set S(t) is known i.e. σ(t) = (P(t), S(t)). We refer to this as the Known Constraints problem. In order for our prediction problem to be well defined, we make Assumption 1 about the observed solution x(t) in each day. Assumption 1 guarantees that each solution is on a vertex of P(t). Assumption 1. The optimal solution to the LP: maxx2P(t) c(t) · x is unique for all t. 3 The Known Objective Problem In this section, we focus on the Known Objective Problem where the coefficients of the objective function c are fixed and known to the learner but the feasible region P(t) on day t is unknown and changing. In particular, P(t) is the intersection of a fixed and unknown polytope P = {x | Ax b, A ✓Rm⇥d} and a known halfspace N (t) = {x | p(t) · x b(t)} i.e. P(t) = P \ N (t). Throughout this section we make the following assumptions. First, we assume w.l.o.g. (up to scaling) that the points in P have `1-norm bounded by 1. Assumption 2. The unknown polytope P lies inside the unit `1-ball i.e. P ✓{x | ||x||1 1}. We also assume that the coordinates of the vertices in P can be written with finite precision (this is implied if the halfspaces defining P can be described with finite precision). 1 Assumption 3. The coordinates of each vertex of P can be written with N bits of precision. We show in Section 3.3 that Assumption 3 is necessary — without any upper bound on precision, there is no algorithm with a finite mistake bound. Next, we make some non-degeneracy assumptions on polytopes P and P(t), respectively. We require these assumptions to hold on each day. Assumption 4. Any subset of d −1 rows of A have rank d −1 where A is the constraint matrix in P = {x | Ax b}. Assumption 5. Each vertex of P(t) is the intersection of exactly d-hyperplanes of P(t). The rest of this section is organized as follows. We present LearnEdge for the Known Objective Problem and analyze its mistake bound in Sections 3.1 and 3.2, respectively. Then in Section 3.3, we prove the necessity of Assumption 3 to get a finite mistake bound. Finally in Section 3.4, we present the LearnHull in a PAC style setting where the new constraint each day is drawn i.i.d. from an unknown distribution, rather than selected adversarially. 3.1 LearnEdge Algorithm In this section we introduce LearnEdge and show in Theorem 1 that the number of mistakes of LearnEdge depends linearly on the number of edges EP and the precision parameter N and only logarithmically on the dimension d. We defer all the missing proofs to the supplementary material. Theorem 1. The number of mistakes and per day running time of LearnEdge in the Known Objective Problem are O(|EP|N log(d)) and poly(m, d, |EP|) respectively when A ✓Rm⇥d. At a high level, LearnEdge maintains a set of prediction information I(t) about the prediction history up to day t, and makes prediction in each day based on I(t) and a set of prediction rules (P.1 −P.4). After making a mistake, LearnEdge updates the information with a set of update rules (U.1 −U.4). Prediction Information It is natural to ask “What information is useful for prediction?" Lemma 2 establishes the importance of the set of edges EP by showing that all the observed solutions will be on an element of EP. 1Lemma 6.2.4 from Grotschel et al. [11] states that if each constraint in P ✓Rd has encoding length at most N then each vertex of P has encoding length at most 4d2N. Typically the finite precision assumption is made on the constraints of the LP. However, since this assumption implies that the vertices can be described with finite precision, for simplicity, we make our assumption directly on the vertices. 4 Lemma 2. On any day t, the observed solution x(t) lies on an edge in EP. In the proof of Lemma 2 we also show that when x(t) does not bind the new constraint N (t), then x(t) is the solution for the underlying LP: argmaxx2P c · x. Corollary 1. If x(t) 2 {x | p(t)x < b(t)} then x(t) = x⇤⌘argmaxx2P c · x. We then show how an edge-space e of P can be recovered after seeing 3 collinear observed solutions. Lemma 3. Let x, y, z be 3 distinct collinear points on edges of P. Then they are all on the same edge of P and the 1-dimensional subspace containing them is an edge-space of P. Given the relation between observed solutions and edges, the information I(t) is stored as follows: Fe Qe 0 Me 0 Ye 0 Ye 1 Me 1 Qe 1 } } } } } Figure 1: Regions on an edge-space e: feasible region Fe (blue), questionable intervals Q0 e and Q1 e (green) with their mid-points M 0 e and M 1 e and infeasible regions Y 0 e and Y 1 e (dashed). I.1 (Observed Solutions) LearnEdge keeps track of the set of observed solutions that were predicted incorrectly so far X(t) = {x(⌧) : ⌧t ˆx(⌧) 6= x(⌧)} and also the solution for the underlying unknown polytope x⇤⌘argmaxx2P c · x if it is observed. I.2 (Edges) LearnEdge keeps track of the set of edge-spaces E(t) given by any 3 collinear points in X(t). For each e 2 E(t), it also maintains the regions on e that are certainly feasible or infeasible. The remaining parts of e called the questionable region is where LearnEdge cannot classify as infeasible or feasible with certainty (see Figure 1). Formally, 1. (Feasible Interval) The feasible interval Fe is an interval along e that is identified to be on the boundary of P. More formally, Fe = Conv(X(t) \ e). 2. (Infeasible Region) The infeasible region Ye = Y 0 e [ Y 1 e is the union of two disjoint intervals Y 0 e and Y 1 e that are identified to be outside of P. By Assumption 2, we initialize the infeasible region Ye to {x 2 e | kxk1 > 1} for all e. 3. (Questionable Region) The questionable region Qe = Q0 e [ Q1 e on e is the union of two disjoint questionable intervals along e. Formally, Qe = e \ (Fe [ Ye). The points in Qe cannot be certified to be either inside or outside of P by LearnEdge. 4. (Midpoints in Qe) For each questionable interval Qi e, let M i e denote the midpoint of Qi e. We add the superscript (t) to show the dependence of these quantities on days. Furthermore, we eliminate the subscript e when taking the union over all elements in E(t), e.g. F (t) = S e2E(t) F (t) e . So the information I(t) can be written as follows: I(t) = ( X(t), E(t), F (t), Y (t), Q(t), M (t)) . Prediction Rules We now focus on the prediction rules of LearnEdge. On day t, let e N (t) = {x | p(t) · x = b(t)} be the hyperplane specified by the additional constraint N (t). If x(t) /2 e N (t), then x(t) = x⇤by Corollary 1. So whenever the algorithm observes x⇤, it will store x⇤and predict it in the future days when x⇤2 N (t). This is case P.1. So in the remaining cases we know x⇤/2 N (t). The analysis of Lemma 2 shows that x(t) must be in the intersection between e N (t) and the edges EP, so x(t) = argmaxx2 e N (t)\EP c · x. Hence, LearnEdge can restrict its prediction to the following candidate set: Cand(t) = {(E(t) [ X(t)) \ ¯E(t)} \ e N (t) where ¯E(t) = {e 2 E(t) | e ✓e N (t)}. As we show in Lemma 4, x(t) will not be in ¯E(t), so it is safe to remove ¯E(t) from Cand(t). Lemma 4. Let e be an edge-space of P such that e ✓e N (t), then x(t) 62 e. However, Cand(t) can be empty or only contain points in the infeasible regions of the edge-spaces. If so, then there is simply not enough information to predict a feasible point in P. Hence, LearnEdge predicts an arbitrary point outside of Cand(t). This is case P.2. 5 Otherwise Cand(t) contains points from the feasible and questionable regions of the edge-spaces. LearnEdge predicts from a subset of Cand(t) called the extended feasible region Ext(t) instead of directly predicting from Cand(t). Ext(t) contains the whole feasible region and only parts of the questionable region on all the edge-spaces in E(t) \ ¯E(t). We will show later that this guarantees LearnEdge makes progress in learning the true feasible region on some edge-space upon making a mistake. More formally, Ext(t) is the intersection of e N (t) with the union of intervals between the two mid-points (M 0 e )(t) and (M 1 e )(t) on every edge-space e 2 E(t) \ ¯E(t) and all points in X(t): Ext(t) = " X(t) [ " [e2E(t)\ ¯ E(t)Conv ( (M 0 e )(t), (M 1 e )(t)) \ e N (t). In P.3, if Ext(t) 6= ; then LearnEdge predicts the point with the highest objective value in Ext(t). Finally, if Ext(t) = ;, then we know e N (t) only intersects within the questionable regions of the learned edge-spaces. In this case, LearnEdge predicts the intersection point with the lowest objective value, which corresponds to P.4. Although it might seem counter-intuitive to predict the point with the lowest objective value, this guarantees that LearnEdge makes progress in learning the true feasible region on some edge-space upon making a mistake. The prediction rules are summarized as follows: P.1 First, if x⇤is observed and x⇤2 N (t), then predict ˆx(t) x⇤; P.2 Else if Cand = ; or Cand(t) ✓S e2E(t) Y (t) e , then predict any point outside Cand(t); P.3 Else if Ext(t) 6= ;, then predict ˆx(t) = argmaxx2Ext(t) c · x; P.4 Else, predict ˆx(t) = argminx2Cand(t) c · x. Update Rules Next we describe how LearnEdge updates its information. Upon making a mistake, LearnEdge adds x(t) to the set of previously observed solutions X(t) i.e. X(t+1) X(t) [ {x(t)}. Then it performs one of the following four mutually exclusive update rules (U.1-U.4) in order. U.1 If x(t) /2 e N (t), then LearnEdge records x(t) as the unconstrained optimal solution x⇤. U.2 Then if x(t) is not on any learned edge-space in E(t), LearnEdge will try to learn a new edge-space by checking the collinearity of x(t) and any couple of points in X(t). So after this update LearnEdge might recover a new edge-space of the polytope. If the previous updates were not invoked, then x(t) was on some learned edge-space e. LearnEdge then compares the objective values of ˆx(t) and x(t) (we know c · ˆx(t) 6= c · x(t) by Assumption 1): U.3 If c · ˆx(t) > c · x(t), then ˆx(t) must be infeasible and LearnEdge then updates the questionable and infeasible regions for e. U.4 If c · ˆx(t) < c · x(t) then x(t) was outside of the extended feasible region of e. LearnEdge then updates the questionable region and feasible interval on e. In both of U.3 and U.4, LearnEdge will shrink some questionable interval substantially till the interval has length less than 2−N in which case Assumption 3 implies that the interval contains no points. So LearnEdge can update the adjacent feasible region and infeasible interval accordingly. 3.2 Analysis of LearnEdge Whenever LearnEdge makes a mistake, one of the update rules U.1 - U.4 is invoked. So the number of mistakes of LearnEdge is bounded by the number of times each update rule is invoked. The mistake bound of LearnEdge in Theorem 1 is hence the sum of mistakes bounds in Lemmas 5-7. Lemma 5. Update U.1 is invoked at most 1 time. Lemma 6. Update U.2 is invoked at most 3|EP| times. 2 Lemma 7. Updates U.3 and U.4 are invoked at most O(|EP|N log(d)) times. 2The dependency on |EP| can be improved by replacing it with the set of edges of P on which an optimal solution is observed. This applies to all the dependencies on |EP| in our bounds. 6 3.3 Necessity of the Precision Bound We show the necessity of Assumption 3 by showing that the dependence on the precision parameter N in our mistake bound is tight. We show that subject to Assumption 3, there exist a polytope and a sequence of additional constraints such that any learning algorithm will make ⌦(N) mistakes. This implies that without any upper bound on precision, it is impossible to learn with finite mistakes. Theorem 8. For any learning algorithm A in the Known Objective Problem and any d ≥3, there exists a polytope P and a sequence of additional constraints {N (t)}t such that the number of mistakes made by A is at least ⌦(N). 3 3.4 Stochastic Setting Given the lower bound in Theorem 8, we ask “In what settings we can still learn without an upper bound on the precision to which constraints are specified?” The lower bound implies we must abandon the adversarial setting so we consider a PAC style variant. In this variant, the additional constraint at each day t is drawn i.i.d. from some fixed but unknown distribution D over Rd ⇥R such that each point (p, b) drawn from D corresponds to the halfspace N = {x | p · x b}. We make no assumption on the form of D and require our bounds to hold in the worst case over all choices of D. We describe LearnHull an algorithm based on the following high level idea: LearnHull keeps track of the convex hull C(t−1) of all the solutions observed up to day t. LearnHull then behaves as if this convex hull is the entire feasible region. So at day t, given the constraint N (t) = {x | p(t) ·x b(t)}, LearnHull predicts ˆx(t) where ˆx(t) = argmaxx2C(t−1)\N (t) c · x. LearnHull’s hypothetical feasible region is therefore always a subset of the true feasible region – i.e. it can never make a mistake because its prediction was infeasible, but only because its prediction was sub-optimal. Hence, whenever LearnHull makes a mistake, it must have observed a point that expands the convex hull. Hence, whenever it fails to predict x(t), LearnHull will enlarge its feasible region by adding the point x(t) to the convex hull: C(t) Conv(C(t−1) [ {x(t)}), otherwise it will simply set C(t) C(t−1) for the next day. We show that the expected number of mistakes of LearnHull over T days is linear in the number of edges of P and only logarithmic in T. 4 Theorem 9. For any T > 0 and any constraint distribution D, the expected number of mistakes of LearnHull after T days is bounded by O (|EP| log(T)). To prove Theorem 9, first in Lemma 10 we bound the probability that the solution observed at day t falls outside of the convex hull of the previously observed solutions. This is the only event that can cause LearnHull to make a mistake. In Lemma 10, we abstract away the fact that the point observed at each day is the solution to some optimization problem. Lemma 10. Let P be a polytope and D a distribution over points on EP. Let X = {x1, . . . , xt−1} be t−1 i.i.d. draws from D and xt an additional independent draw from D. Then Pr[xt 62 Conv(X)] 2|EP|/t where the probability is taken over the draws of points x1, . . . , xt from D. Finally in Theorem 11 we convert the bound on the expected number of mistakes of LearnHull in Theorem 9 to a high probability bound. 5 Theorem 11. There exists a deterministic procedure such that after T = O (|EP| log (1/δ)) days, the probability (over the randomness of the additional constraint) that the procedure makes a mistake on day T + 1 is at most δ for any δ 2 (0, 1/2). 4 The Known Constraints Problem We now consider the Known Constraints Problem in which the learner observes the changing constraint polytope P(t) at each day, but does not know the changing objective function which we 3 We point out that the condition d ≥3 is necessary in the statement of Theorem 8 since there exists learning algorithms for d = 1 and d = 2 with finite mistake bounds independent of N. See the supplementary material. 4LearnHull can be implemented efficiently in time poly(T, N, d) if all of the coefficients in the unknown constraints in P are represented in N bits. Note that given the observed solutions so far and a new point, a separation oracle can be implemented in time poly(T, N, d) using a LP solver. 5LearnEdge fails to give any non-trivial mistake bound in the adversarial setting. 7 assume to be written as c(t) = P i2S(t) vi, where {vi}i2[n] are fixed but unknown. Given P(t) and the subset S(t) ✓[n], the learner must make a prediction ˆx(t) on each day. Inspired by Bhaskar et al. [5], we use the Ellipsoid algorithm to learn the coefficients {vi}i2[n], and show that the mistake bound of the resulting algorithm is bounded by the (polynomial) running time of the Ellipsoid. We use V 2 Rd⇥n to denote the matrix whose columns are vi and make the following assumption on V . Assumption 6. Each entry in V can be written with N bits of precision. Also w.l.o.g. ||V ||F 1. Similar to Section 3 we assume the coordinates of P(t)’s vertices can be written with finite precision.6 Assumption 7. The coordinates of each vertex of P(t) can be written with N bits of precision. We first observe that the coefficients of the objective function represent a point that is guaranteed to lie in a region F (described below) which may be written as the intersection of possibly infinitely many halfspaces. Given a subset S ✓[n] and a polytope P, let xS,P denote the optimal solution to the instance defined by S and P. Informally, the halfspaces defining F ensure that for any problem instance defined by arbitrary choices of S and P, the objective value of the optimal solution xS,P must be at least as high as the objective value of any feasible point in P. Since the convergence rate of the Ellipsoid algorithm depends on the precision to which constraints are specified, we do not in fact consider a hyperplane for every feasible solution but only for those solutions that are vertices of the feasible polytope P. This is not a relaxation, since LPs always have vertex-optimal solutions. We denote the set of all vertices of polytope P by vert(P), and the set of polytopes P satisfying Assumption 7 by Φ. We then define F as follows: F = ( W = (w1, . . . , wn) 2 Rn⇥d | 8S ✓[n], 8P 2 Φ, X i2S wi · ( xS,P −x ) ≥0, 8x 2 vert(P) ) The idea behind our LearnEllipsoid algorithm is that we will run a copy of the Ellipsoid algorithm with variables w 2 Rd⇥n, as if we were solving the feasibility LP defined by the constraints defining F. We will always predict according to the centroid of the ellipsoid maintained by the Ellipsoid algorithm (i.e. its candidate solution). Whenever a mistake occurs, we are able to find one of the constraints that define F such that our prediction violates the constraint – exactly what is needed to take a step in solving the feasibility LP. Since we know F is non-empty (at least the true objective function V lies within it) we know that the LP we are solving is feasible. Given the polynomial convergence time of the Ellipsoid algorithm, this gives a polynomial mistake bound for our algorithm. The Ellipsoid algorithm will generate a sequence of ellipsoids with decreasing volume such that each one contains feasible region F. Given the ellipsoid E(t) at day t, LearnEllipsoid uses the centroid of E(t) as its hypothesis for the objective function W (t) = ( (w1)(t), . . . , (wn)(t)) . Given the subset S(t) and polytope P(t), LearnEllipsoid predicts ˆx(t) 2 argmaxx2P(t){P i2S(t)(wi)(t) · x}. When a mistake occurs, LearnEllipsoid finds the hyperplane H(t) = " W = (w1, . . . , wn) 2 Rn⇥d : P i2S(t) wi · (x(t) −ˆx(t)) > 0 that separates the centroid of the current ellipsoid (the current candidate objective) from F. After the update, we use the Ellipsoid algorithm to compute the minimum-volume ellipsoid E(t+1) that contains H(t) \ E(t). On day t + 1, LearnEllipsoid sets W (t+1) to be the centroid of E(t+1). We left the procedure used to solve the LP in the prediction rule of LearnEllipsoid unspecified. To simplify our analysis, we use a specific LP solver to obtain a prediction ˆx(t) which is a vertex of P(t). Theorem 12 (Theorem 6.4.12 and Remark 6.5.2 [11]). There exists a LP solver that runs in time polynomial in the length of its input and returns an exact solution that is a vertex of P(t). In Theorem 13, we show that the number of mistakes made by LearnEllipsoid is at most the number of updates that the Ellipsoid algorithm makes before it finds a point in F and the number of updates of the Ellipsoid algorithm can be bounded by well-known results from the literature on LP. Theorem 13. The total number of mistakes and the running time of LearnEllipsoid in the Known Constraints Problem is at most poly(n, d, N). 6We again point out that this is implied if the halfspaces defining the polytope are described with finite precision [11]. 8 References [1] AMIN, K., CUMMINGS, R., DWORKIN, L., KEARNS, M., AND ROTH, A. Online learning and profit maximization from revealed preferences. In Proceedings of the 29th AAAI Conference on Artificial Intelligence (2015), pp. 770–776. [2] BALCAN, M., DANIELY, A., MEHTA, R., URNER, R., AND VAZIRANI, V. Learning economic parameters from revealed preferences. In Proceeding of the 10th International Conference on Web and Internet Economics (2014), pp. 338–353. [3] BEIGMAN, E., AND VOHRA, R. Learning from revealed preference. In Proceedings of the 7th ACM Conference on Electronic Commerce (2006), pp. 36–42. [4] BELLONI, A., LIANG, T., NARAYANAN, H., AND RAKHLIN, A. Escaping the local minima via simulated annealing: Optimization of approximately convex functions. In Proceeding of the 28th Conference on Learning Theory (2015), pp. 240–265. [5] BHASKAR, U., LIGETT, K., SCHULMAN, L., AND SWAMY, C. Achieving target equilibria in network routing games without knowing the latency functions. In Proceeding of the 55th IEEE Annual Symposium on Foundations of Computer Science (2014), pp. 31–40. [6] BLUM, A., MANSOUR, Y., AND MORGENSTERN, J. Learning what’s going on: Reconstructing preferences and priorities from opaque transactions. In Proceedings of the 16th ACM Conference on Economics and Computation (2015), pp. 601–618. [7] COLLINS, M. Discriminative reranking for natural language parsing. In Proceedings of the 17th International Conference on Machine Learning (2000), Morgan Kaufmann, pp. 175–182. [8] COLLINS, M. Discriminative training methods for hidden Markov models: Theory and experiments with perceptron algorithms. In Proceedings of the ACL-02 Conference on Empirical Methods in Natural Language Processing (2002), pp. 1–8. [9] DANIELY, A., AND SHALEV-SHWARTZ, S. Optimal learners for multiclass problems. In Proceedings of the 27th Conference on Learning Theory (2014), pp. 287–316. [10] FÜRNKRANZ, J., AND HÜLLERMEIER, E. Preference learning. Springer, 2010. [11] GRÖTSCHEL, M., LOVÁSZ, L., AND SCHRIJVER, A. Geometric Algorithms and Combinatorial Optimization, second corrected ed., vol. 2 of Algorithms and Combinatorics. Springer, 1993. [12] LAFFERTY, J., MCCALLUM, A., AND PEREIRA, F. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. In Proceedings of the 18th International Conference on Machine Learning (2001), pp. 282–289. [13] LITTLESTONE, N. Learning quickly when irrelevant attributes abound: A new linear-threshold algorithm. Machine Learning 2, 4 (1988), 285–318. [14] ROTH, A., ULLMAN, J., AND WU, Z. Watch and learn: Optimizing from revealed preferences feedback. In Proceedings of the 48th Annual ACMSymposium on Theory of Computing (2016), pp. 949–962. [15] VALIANT, L. A theory of the learnable. Communications of the ACM 27, 11 (1984), 1134–1142. [16] ZADIMOGHADDAM, M., AND ROTH, A. Efficiently learning from revealed preference. In Proceedings of the 8th International Workshop on Internet and Network Economics (2012), pp. 114–127. 9 | 2016 | 465 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.